From 057cde3f8aedc48401bfe864a5b03ef29dd8b641 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 18 Apr 2017 11:27:07 +0100 Subject: convert join table view menu to .ui Change-Id: I249cf0ba1ffcc7e2736ac7270bc988a0916947dd --- 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(-) create mode 100644 dbaccess/uiconfig/ui/jointablemenu.ui (limited to 'dbaccess') 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 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 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 @@ + + + + + + True + False + + + True + False + _Delete + True + + + + -- cgit