cui/uiconfig/ui/spellingdialog.ui | 2 +- vcl/inc/bitmaps.hlst | 2 ++ vcl/source/window/builder.cxx | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-)
New commits: commit 34e1eb170e394b464b9686cfbc0a56fb07d85893 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jun 15 20:03:47 2020 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Wed Jun 17 12:31:49 2020 +0200 support gtk-copy and gtk-paste stock ids Change-Id: I0d9dc30c62bdfb5976c86bc5a08d5f030eb216e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit baa55eca0b653d4f661c08f5b6593caa3b186e89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96418 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/cui/uiconfig/ui/spellingdialog.ui b/cui/uiconfig/ui/spellingdialog.ui index 6e437a1145b2..7673d262e21c 100644 --- a/cui/uiconfig/ui/spellingdialog.ui +++ b/cui/uiconfig/ui/spellingdialog.ui @@ -272,7 +272,7 @@ <property name="can_focus">False</property> <property name="label" translatable="yes" context="spellingdialog|paste">Paste</property> <property name="use_underline">True</property> - <property name="icon_name">cmd/sc_paste.png</property> + <property name="stock_id">gtk-paste</property> </object> <packing> <property name="expand">False</property> diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst index 5ce994a0c384..68f23533eae0 100644 --- a/vcl/inc/bitmaps.hlst +++ b/vcl/inc/bitmaps.hlst @@ -138,6 +138,8 @@ #define IMG_INFO "dbaccess/res/exinfo.png" #define IMG_ADD "extensions/res/scanner/plus.png" #define IMG_REMOVE "extensions/res/scanner/minus.png" +#define IMG_COPY "cmd/sc_copy.png" +#define IMG_PASTE "cmd/sc_paste.png" #define RID_BMP_TREENODE_COLLAPSED "res/plus.png" #define RID_BMP_TREENODE_EXPANDED "res/minus.png" diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 8410e67871a3..dd57672d8b18 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -95,6 +95,10 @@ namespace return IMG_ADD; else if (sType == "gtk-remove") return IMG_REMOVE; + else if (sType == "gtk-copy") + return IMG_COPY; + else if (sType == "gtk-paste") + return IMG_PASTE; return OUString(); } @@ -1066,6 +1070,18 @@ namespace return sIconName; } + OUString extractStockId(VclBuilder::stringmap &rMap) + { + OUString sIconName; + VclBuilder::stringmap::iterator aFind = rMap.find(OString("stock-id")); + if (aFind != rMap.end()) + { + sIconName = aFind->second; + rMap.erase(aFind); + } + return sIconName; + } + OUString getStockText(const OUString &rType) { if (rType == "gtk-ok") @@ -2384,6 +2400,8 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & pToolBox->SetQuickHelpText(nItemId, sTooltip); OUString sIconName(extractIconName(rMap)); + if (sIconName.isEmpty()) + sIconName = mapStockToImageResource(extractStockId(rMap)); if (!sIconName.isEmpty()) pToolBox->SetItemImage(nItemId, FixedImage::loadThemeImage(sIconName)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits