svx/source/stbctrls/xmlsecctrl.cxx |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit c75bc340346cd75c03cd87da66c46bf0c8482df8
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Dec 19 21:02:39 2020 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Dec 20 17:19:05 2020 +0100

    weld xmlsecstatmenu
    
    Change-Id: Ic3e2df5b11b5f7ff8938913472ac60aecc0e2c2b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108034
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svx/source/stbctrls/xmlsecctrl.cxx 
b/svx/source/stbctrls/xmlsecctrl.cxx
index bd351e4be3c4..20c6e7d50ed4 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -18,12 +18,12 @@
  */
 
 
-#include <vcl/status.hxx>
-#include <vcl/builder.hxx>
-#include <vcl/menu.hxx>
-#include <vcl/image.hxx>
 #include <vcl/commandevent.hxx>
+#include <vcl/image.hxx>
 #include <vcl/event.hxx>
+#include <vcl/status.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/weldutils.hxx>
 #include <sfx2/signaturestate.hxx>
 #include <sfx2/module.hxx>
 
@@ -101,9 +101,11 @@ void XmlSecStatusBarControl::Command( const CommandEvent& 
rCEvt )
 {
     if( rCEvt.GetCommand() == CommandEventId::ContextMenu )
     {
-        VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), 
"svx/ui/xmlsecstatmenu.ui", "");
-        VclPtr<PopupMenu> aPopupMenu(aBuilder.get_menu("menu"));
-        if (aPopupMenu->Execute(&GetStatusBar(), rCEvt.GetMousePosPixel()))
+        tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1));
+        weld::Window* pPopupParent = weld::GetPopupParent(GetStatusBar(), 
aRect);
+        std::unique_ptr<weld::Builder> 
xBuilder(Application::CreateBuilder(pPopupParent, "svx/ui/xmlsecstatmenu.ui"));
+        std::unique_ptr<weld::Menu> xPopMenu(xBuilder->weld_menu("menu"));
+        if (!xPopMenu->popup_at_rect(pPopupParent, aRect).isEmpty())
         {
             css::uno::Any a;
             SfxUInt16Item aState( GetSlotId(), 0 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to