diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 12 | ||||
-rw-r--r-- | dbaccess/uiconfig/ui/querycolmenu.ui | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index f585918cdfe6..fec166aa4cdb 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1386,11 +1386,13 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) if ( !IsColumnSelected( nColId ) ) SelectColumnId( nColId ); - VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", ""); - VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); - aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), false); - aContextMenu->RemoveDisabledEntries(true, true); - if (aContextMenu->Execute(this, aMenuPos) == aContextMenu->GetItemId("width")) + ::tools::Rectangle aRect(aMenuPos, Size(1, 1)); + weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/querycolmenu.ui")); + std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu")); + xContextMenu->remove("delete"); + xContextMenu->remove("separator"); + if (xContextMenu->popup_at_rect(pPopupParent, aRect) == "width") adjustBrowseBoxColumnWidth( this, nColId ); } } diff --git a/dbaccess/uiconfig/ui/querycolmenu.ui b/dbaccess/uiconfig/ui/querycolmenu.ui index 491f31f09a65..c7b99b689199 100644 --- a/dbaccess/uiconfig/ui/querycolmenu.ui +++ b/dbaccess/uiconfig/ui/querycolmenu.ui @@ -14,7 +14,7 @@ </object> </child> <child> - <object class="GtkSeparatorMenuItem" id="menuitem1"> + <object class="GtkSeparatorMenuItem" id="separator"> <property name="visible">True</property> <property name="can_focus">False</property> </object> |