[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig

Caolán McNamara caolanm at redhat.com
Tue Apr 18 10:28:55 UTC 2017


 dbaccess/source/ui/inc/dbu_resource.hrc        |    1 -
 dbaccess/source/ui/querydesign/TableWindow.cxx |   11 ++++-------
 dbaccess/source/ui/querydesign/query.src       |   13 -------------
 dbaccess/uiconfig/ui/jointablemenu.ui          |   17 +++++++++++++++++
 4 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 057cde3f8aedc48401bfe864a5b03ef29dd8b641
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 18 11:27:07 2017 +0100

    convert join table view menu to .ui
    
    Change-Id: I249cf0ba1ffcc7e2736ac7270bc988a0916947dd

diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 52d6aefd3373..563eb9a88b71 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -124,7 +124,6 @@
 // menus
 
 #define RID_QUERYFUNCTION_POPUPMENU     RID_MENU_START +  6
-#define RID_MENU_JOINVIEW_TABLE         RID_MENU_START + 17
 
 // strings
 #define STR_TBL_TITLE                       RID_STR_GEN_START
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index fc18fe0e166a..e186e6b1a1f2 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -585,13 +585,10 @@ void OTableWindow::Command(const CommandEvent& rEvt)
                         ptWhere = m_xTitle->GetPosPixel();
                 }
 
-                ScopedVclPtrInstance<PopupMenu> aContextMenu(ModuleRes(RID_MENU_JOINVIEW_TABLE));
-                switch (aContextMenu->Execute(this, ptWhere))
-                {
-                    case SID_DELETE:
-                        Remove();
-                        break;
-                }
+                VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/jointablemenu.ui", "");
+                VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
+                if (aContextMenu->Execute(this, ptWhere))
+                    Remove();
             }
             break;
         }
diff --git a/dbaccess/source/ui/querydesign/query.src b/dbaccess/source/ui/querydesign/query.src
index e18a19d5936d..4914830cebf6 100644
--- a/dbaccess/source/ui/querydesign/query.src
+++ b/dbaccess/source/ui/querydesign/query.src
@@ -21,19 +21,6 @@
 #include "browserids.hxx"
 #include "dbaccess_helpid.hrc"
 
-Menu RID_MENU_JOINVIEW_TABLE
-{
-    ItemList =
-    {
-        MenuItem
-        {
-            Identifier = SID_DELETE ;
-            Command = ".uno:Delete" ;
-            Text [ en-US ] = "~Delete" ;
-        };
-     };
-};
-
 Bitmap BMP_PRIMARY_KEY
 {
     File = "jo01.png";
diff --git a/dbaccess/uiconfig/ui/jointablemenu.ui b/dbaccess/uiconfig/ui/jointablemenu.ui
new file mode 100644
index 000000000000..b9df6f291084
--- /dev/null
+++ b/dbaccess/uiconfig/ui/jointablemenu.ui
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
+<interface>
+  <requires lib="gtk+" version="3.10"/>
+  <object class="GtkMenu" id="menu">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkMenuItem" id="delete">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">_Delete</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list