[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 21 21:01:44 UTC 2020
dbaccess/source/ui/tabledesign/TEditControl.cxx | 12 +++++++-----
dbaccess/uiconfig/ui/querycolmenu.ui | 2 +-
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 46ac4c3916ac6544eb1834e714eaa676c2af8bd5
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Dec 21 10:21:57 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 21 22:00:53 2020 +0100
weld querycolmenu
Change-Id: If13436a99c80b619c9deb8d559a617accee64040
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108091
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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>
More information about the Libreoffice-commits
mailing list