diff options
55 files changed, 289 insertions, 272 deletions
diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index 1a8e2b12bd44..1f2e9307de01 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -117,6 +117,14 @@ sub check_whitespaces($) { bad_line("use translation context 'stock' and the English string as button label instead", $_, "ui"); } + if (/<property name="stock[-_]id"/ ) + { + bad_line("use an icon-name listed at https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html", $_, "ui"); + } + if (/<property name="stock"/ ) + { + bad_line("use an icon-name listed at https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html", $_, "ui"); + } if ((/translatable="yes"/) and not(/context=/)) { bad_line("translatable .ui file line without context", $_, "ui"); diff --git a/bin/ui-converter-skeleton.py b/bin/ui-converter-skeleton.py index 01d3bad26105..c9d6cc0daa1a 100755 --- a/bin/ui-converter-skeleton.py +++ b/bin/ui-converter-skeleton.py @@ -97,6 +97,71 @@ def replace_button_use_stock(current): if isbutton and use_stock != None: do_replace_button_use_stock(current, use_stock, use_underline, label, insertpos) +def do_replace_image_stock(current, stock): + attributes = stock.attrib + attributes["name"] = "icon-name" + if stock.text == 'gtk-add': + stock.text = "list-add" + elif stock.text == 'gtk-remove': + stock.text = "list-remove" + elif stock.text == 'gtk-paste': + stock.text = "edit-paste" + elif stock.text == 'gtk-index': + stock.text = "vcl/res/index.png" + elif stock.text == 'gtk-refresh': + stock.text = "view-refresh" + elif stock.text == 'gtk-dialog-error': + stock.text = "dialog-error" + elif stock.text == 'gtk-apply': + stock.text = "sw/res/sc20558.png" + elif stock.text == 'gtk-missing-image': + stock.text = "missing-image" + elif stock.text == 'gtk-copy': + stock.text = "edit-copy" + elif stock.text == 'gtk-go-back': + stock.text = "go-previous" + elif stock.text == 'gtk-go-forward': + stock.text = "go-next" + elif stock.text == 'gtk-go-down': + stock.text = "go-down" + elif stock.text == 'gtk-go-up': + stock.text = "go-up" + elif stock.text == 'gtk-goto-first': + stock.text = "go-first" + elif stock.text == 'gtk-goto-last': + stock.text = "go-last" + elif stock.text == 'gtk-new': + stock.text = "document-new" + elif stock.text == 'gtk-media-stop': + stock.text = "media-playback-stop" + elif stock.text == 'gtk-media-play': + stock.text = "media-playback-start" + elif stock.text == 'gtk-media-next': + stock.text = "media-skip-forward" + elif stock.text == 'gtk-media-previous': + stock.text = "media-skip-backward" + elif stock.text == 'gtk-close': + stock.text = "window-close" + elif stock.text == 'gtk-help': + stock.text = "help-browser" + else: + raise("unknown stock name") + +def replace_image_stock(current): + stock = None + isimage = current.get('class') == "GtkImage" + for child in current: + replace_image_stock(child) + if not isimage: + continue + if child.tag == "property": + attributes = child.attrib + if attributes.get("name") == "stock": + stock = child + + if isimage and stock != None: + do_replace_image_stock(current, stock) + with open(sys.argv[1], encoding="utf-8") as f: header = f.readline() firstline = f.readline() @@ -121,6 +186,7 @@ with open(sys.argv[1], encoding="utf-8") as f: if not sys.argv[1].endswith('/multiline.ui'): # let this one alone not truncate multiline pastes add_truncate_multiline(root) replace_button_use_stock(root) +replace_image_stock(root) with open(sys.argv[1], 'wb') as o: # without encoding='unicode' (and the matching encode("utf8")) we get &#XXXX replacements for non-ascii characters diff --git a/chart2/uiconfig/ui/columnfragment.ui b/chart2/uiconfig/ui/columnfragment.ui index f020427d2924..4f6be9d81def 100644 --- a/chart2/uiconfig/ui/columnfragment.ui +++ b/chart2/uiconfig/ui/columnfragment.ui @@ -9,7 +9,7 @@ <object class="GtkImage" id="image"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/chart2/uiconfig/ui/dlg_InsertErrorBars.ui b/chart2/uiconfig/ui/dlg_InsertErrorBars.ui index dcb7abeeb173..b5b0e578e58e 100644 --- a/chart2/uiconfig/ui/dlg_InsertErrorBars.ui +++ b/chart2/uiconfig/ui/dlg_InsertErrorBars.ui @@ -361,7 +361,7 @@ <object class="GtkImage" id="FI_BOTH"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -372,7 +372,7 @@ <object class="GtkImage" id="FI_POSITIVE"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -383,7 +383,7 @@ <object class="GtkImage" id="FI_NEGATIVE"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> diff --git a/chart2/uiconfig/ui/imagefragment.ui b/chart2/uiconfig/ui/imagefragment.ui index 97cd5985eb86..ab83099fdcf4 100644 --- a/chart2/uiconfig/ui/imagefragment.ui +++ b/chart2/uiconfig/ui/imagefragment.ui @@ -10,7 +10,7 @@ <object class="GtkImage" id="image"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">True</property> diff --git a/chart2/uiconfig/ui/tp_DataSource.ui b/chart2/uiconfig/ui/tp_DataSource.ui index 1e2843127df4..635314c07e95 100644 --- a/chart2/uiconfig/ui/tp_DataSource.ui +++ b/chart2/uiconfig/ui/tp_DataSource.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-up</property> + <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> </object> <object class="GtkImage" id="imageIMB_RANGE_CAT"> <property name="visible">True</property> diff --git a/chart2/uiconfig/ui/tp_ErrorBars.ui b/chart2/uiconfig/ui/tp_ErrorBars.ui index c8b8cacf672b..1f46cc6b0480 100644 --- a/chart2/uiconfig/ui/tp_ErrorBars.ui +++ b/chart2/uiconfig/ui/tp_ErrorBars.ui @@ -301,7 +301,7 @@ <object class="GtkImage" id="FI_BOTH"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -312,7 +312,7 @@ <object class="GtkImage" id="FI_POSITIVE"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -323,7 +323,7 @@ <object class="GtkImage" id="FI_NEGATIVE"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> diff --git a/chart2/uiconfig/ui/tp_Trendline.ui b/chart2/uiconfig/ui/tp_Trendline.ui index 6ea994de883f..825ff019dffe 100644 --- a/chart2/uiconfig/ui/tp_Trendline.ui +++ b/chart2/uiconfig/ui/tp_Trendline.ui @@ -288,7 +288,7 @@ <object class="GtkImage" id="imageLinear"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -299,7 +299,7 @@ <object class="GtkImage" id="imageLogarithmic"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -310,7 +310,7 @@ <object class="GtkImage" id="imageExponential"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -321,7 +321,7 @@ <object class="GtkImage" id="imagePower"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> @@ -332,7 +332,7 @@ <object class="GtkImage" id="imagePolynomial"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">2</property> @@ -343,7 +343,7 @@ <object class="GtkImage" id="imageMovingAverage"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">2</property> diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui index 43eb294a3032..0d8ebf8a5635 100644 --- a/cui/uiconfig/ui/aboutdialog.ui +++ b/cui/uiconfig/ui/aboutdialog.ui @@ -5,7 +5,7 @@ <object class="GtkImage" id="imCopy"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-copy</property> + <property name="icon-name">edit-copy</property> </object> <object class="GtkDialog" id="AboutDialog"> <property name="can-focus">False</property> diff --git a/cui/uiconfig/ui/comment.ui b/cui/uiconfig/ui/comment.ui index 07ab6f548dea..9dc63848fd11 100644 --- a/cui/uiconfig/ui/comment.ui +++ b/cui/uiconfig/ui/comment.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkDialog" id="CommentDialog"> <property name="can_focus">False</property> diff --git a/cui/uiconfig/ui/hyphenate.ui b/cui/uiconfig/ui/hyphenate.ui index 6b652209675d..ef1f5c871b25 100644 --- a/cui/uiconfig/ui/hyphenate.ui +++ b/cui/uiconfig/ui/hyphenate.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkDialog" id="HyphenateDialog"> <property name="can_focus">False</property> diff --git a/cui/uiconfig/ui/menuassignpage.ui b/cui/uiconfig/ui/menuassignpage.ui index d55f286f7519..2c6f075a0ba4 100644 --- a/cui/uiconfig/ui/menuassignpage.ui +++ b/cui/uiconfig/ui/menuassignpage.ui @@ -5,23 +5,23 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-up</property> + <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> <property name="icon_size">3</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> <property name="icon_size">3</property> </object> <object class="GtkImage" id="image7"> diff --git a/cui/uiconfig/ui/movemenu.ui b/cui/uiconfig/ui/movemenu.ui index 5a88127e42ec..43b582625e60 100644 --- a/cui/uiconfig/ui/movemenu.ui +++ b/cui/uiconfig/ui/movemenu.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-up</property> + <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> </object> <object class="GtkTreeStore" id="liststore1"> <columns> diff --git a/cui/uiconfig/ui/spellingdialog.ui b/cui/uiconfig/ui/spellingdialog.ui index 6d6697a1078e..c90f02e3d40e 100644 --- a/cui/uiconfig/ui/spellingdialog.ui +++ b/cui/uiconfig/ui/spellingdialog.ui @@ -295,7 +295,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="stock_id">gtk-paste</property> + <property name="icon-name">edit-paste</property> </object> <packing> <property name="expand">False</property> diff --git a/cui/uiconfig/ui/textanimtabpage.ui b/cui/uiconfig/ui/textanimtabpage.ui index 1984e2980141..d5de8388f9c9 100644 --- a/cui/uiconfig/ui/textanimtabpage.ui +++ b/cui/uiconfig/ui/textanimtabpage.ui @@ -20,22 +20,22 @@ <object class="GtkImage" id="imageDOWN"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> </object> <object class="GtkImage" id="imageLEFT"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="imageRIGHT"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkImage" id="imageUP"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-up</property> + <property name="icon-name">go-up</property> </object> <object class="GtkBox" id="TextAnimation"> <property name="visible">True</property> diff --git a/cui/uiconfig/ui/thesaurus.ui b/cui/uiconfig/ui/thesaurus.ui index bcad1fb7483c..1707167f23b0 100644 --- a/cui/uiconfig/ui/thesaurus.ui +++ b/cui/uiconfig/ui/thesaurus.ui @@ -5,7 +5,7 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkTreeStore" id="liststore3"> <columns> diff --git a/cui/uiconfig/ui/toolbarmodedialog.ui b/cui/uiconfig/ui/toolbarmodedialog.ui index ee67e49d1293..d8b777f52f85 100644 --- a/cui/uiconfig/ui/toolbarmodedialog.ui +++ b/cui/uiconfig/ui/toolbarmodedialog.ui @@ -5,7 +5,7 @@ <object class="GtkImage" id="imgApply"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-apply</property> + <property name="icon-name">sw/res/sc20558.png</property> </object> <object class="GtkDialog" id="ToolbarmodeDialog"> <property name="can-focus">False</property> @@ -306,7 +306,7 @@ <property name="can-focus">False</property> <property name="valign">start</property> <property name="vexpand">True</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/fpicker/uiconfig/ui/explorerfiledialog.ui b/fpicker/uiconfig/ui/explorerfiledialog.ui index 1d984b064e81..69cce298755c 100644 --- a/fpicker/uiconfig/ui/explorerfiledialog.ui +++ b/fpicker/uiconfig/ui/explorerfiledialog.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-add</property> + <property name="icon-name">list-add</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-remove</property> + <property name="icon-name">list-remove</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index 53b7c3b5eed2..dd75d71b8579 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -109,6 +109,8 @@ public: /// Pre-loads all modules containing UI information static void preload(); + static SymbolType mapStockToSymbol(std::u16string_view icon_name); + private: VclBuilder(const VclBuilder&) = delete; VclBuilder& operator=(const VclBuilder&) = delete; @@ -237,14 +239,7 @@ private: static void mungeAdjustment(ScrollBar &rTarget, const Adjustment &rAdjustment); static void mungeAdjustment(Slider &rTarget, const Adjustment &rAdjustment); - struct stockinfo - { - OUString m_sStock; - int m_nSize; - stockinfo() : m_nSize(4) {} - }; - - typedef std::map<OString, stockinfo> StockMap; + typedef std::map<OString, int> ImageSizeMap; struct SizeGroup { @@ -274,7 +269,7 @@ private: std::map<OString, Adjustment> m_aAdjustments; std::vector<ButtonImageWidgetMap> m_aButtonImageWidgetMaps; - StockMap m_aStockMap; + ImageSizeMap m_aImageSizeMap; std::vector<ButtonMenuMap> m_aButtonMenuMaps; @@ -338,12 +333,13 @@ private: void connectNumericFormatterAdjustment(const OString &id, const OUString &rAdjustment); void connectFormattedFormatterAdjustment(const OString &id, const OUString &rAdjustment); + static int getImageSize(const stringmap &rMap); + void extractGroup(const OString &id, stringmap &rVec); void extractModel(const OString &id, stringmap &rVec); void extractBuffer(const OString &id, stringmap &rVec); static bool extractAdjustmentToMap(const OString &id, stringmap &rVec, std::vector<WidgetAdjustmentMap>& rAdjustmentMap); void extractButtonImage(const OString &id, stringmap &rMap, bool bRadio); - void extractStock(const OString &id, stringmap &rMap); void extractMnemonicWidget(const OString &id, stringmap &rMap); // either pParent or pAtkProps must be set, pParent for a child of a widget, pAtkProps for diff --git a/reportdesign/uiconfig/dbreport/ui/conditionwin.ui b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui index 33490b108ca9..6ad60616f028 100644 --- a/reportdesign/uiconfig/dbreport/ui/conditionwin.ui +++ b/reportdesign/uiconfig/dbreport/ui/conditionwin.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-up</property> + <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> </object> <object class="GtkBox" id="ConditionWin"> <property name="visible">True</property> diff --git a/sc/uiconfig/scalc/ui/conditionaliconset.ui b/sc/uiconfig/scalc/ui/conditionaliconset.ui index 861ddb3304c9..bf129a2c914c 100644 --- a/sc/uiconfig/scalc/ui/conditionaliconset.ui +++ b/sc/uiconfig/scalc/ui/conditionaliconset.ui @@ -60,7 +60,7 @@ <property name="can_focus">False</property> <property name="halign">center</property> <property name="valign">center</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> diff --git a/sc/uiconfig/scalc/ui/sheetprintpage.ui b/sc/uiconfig/scalc/ui/sheetprintpage.ui index 11901dbd9462..39f4381e20b9 100644 --- a/sc/uiconfig/scalc/ui/sheetprintpage.ui +++ b/sc/uiconfig/scalc/ui/sheetprintpage.ui @@ -182,7 +182,7 @@ <property name="margin-end">6</property> <property name="margin-top">6</property> <property name="margin-bottom">6</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/sd/uiconfig/simpress/ui/customanimationeffecttab.ui b/sd/uiconfig/simpress/ui/customanimationeffecttab.ui index 3bddbb805107..fa713f8e6417 100644 --- a/sd/uiconfig/simpress/ui/customanimationeffecttab.ui +++ b/sd/uiconfig/simpress/ui/customanimationeffecttab.ui @@ -10,7 +10,7 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-play</property> + <property name="icon-name">media-playback-start</property> </object> <object class="GtkBox" id="EffectTab"> <property name="visible">True</property> diff --git a/sd/uiconfig/simpress/ui/dockinganimation.ui b/sd/uiconfig/simpress/ui/dockinganimation.ui index 7503780648ed..454626bb5870 100644 --- a/sd/uiconfig/simpress/ui/dockinganimation.ui +++ b/sd/uiconfig/simpress/ui/dockinganimation.ui @@ -37,27 +37,27 @@ <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-first</property> + <property name="icon-name">go-first</property> </object> <object class="GtkImage" id="image6"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-previous</property> + <property name="icon-name">media-skip-backward</property> </object> <object class="GtkImage" id="image7"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-stop</property> + <property name="icon-name">media-playback-stop</property> </object> <object class="GtkImage" id="image8"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-next</property> + <property name="icon-name">media-skip-forward</property> </object> <object class="GtkImage" id="image9"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-last</property> + <property name="icon-name">go-last</property> </object> <object class="GtkBox" id="DockingAnimation"> <property name="visible">True</property> diff --git a/sfx2/uiconfig/ui/decktitlebar.ui b/sfx2/uiconfig/ui/decktitlebar.ui index 0e48eddd815f..68ecdc6469be 100644 --- a/sfx2/uiconfig/ui/decktitlebar.ui +++ b/sfx2/uiconfig/ui/decktitlebar.ui @@ -25,7 +25,7 @@ <property name="visible">True</property> <property name="can-focus">False</property> <property name="valign">center</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/sfx2/uiconfig/ui/documentinfopage.ui b/sfx2/uiconfig/ui/documentinfopage.ui index ce53a2064fdc..b2dd02630256 100644 --- a/sfx2/uiconfig/ui/documentinfopage.ui +++ b/sfx2/uiconfig/ui/documentinfopage.ui @@ -386,7 +386,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="valign">center</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="left_attach">0</property> diff --git a/sfx2/uiconfig/ui/infobar.ui b/sfx2/uiconfig/ui/infobar.ui index 50b1a7cc1d1d..3a9cc49a7f23 100644 --- a/sfx2/uiconfig/ui/infobar.ui +++ b/sfx2/uiconfig/ui/infobar.ui @@ -98,7 +98,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="valign">center</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/sfx2/uiconfig/ui/paneltitlebar.ui b/sfx2/uiconfig/ui/paneltitlebar.ui index 721abab47dfd..6fd621856b82 100644 --- a/sfx2/uiconfig/ui/paneltitlebar.ui +++ b/sfx2/uiconfig/ui/paneltitlebar.ui @@ -13,7 +13,7 @@ <property name="visible">True</property> <property name="can-focus">False</property> <property name="valign">center</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui index 78709ce7a47d..224678a970c8 100644 --- a/sfx2/uiconfig/ui/startcenter.ui +++ b/sfx2/uiconfig/ui/startcenter.ui @@ -423,7 +423,7 @@ <property name="halign">center</property> <property name="valign">center</property> <property name="margin-bottom">6</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/svtools/uiconfig/ui/fixedimagecontrol.ui b/svtools/uiconfig/ui/fixedimagecontrol.ui index 162ba17f63e3..1b462fa23d64 100644 --- a/svtools/uiconfig/ui/fixedimagecontrol.ui +++ b/svtools/uiconfig/ui/fixedimagecontrol.ui @@ -12,7 +12,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">True</property> diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui index 62627d0a3f90..8063acdf2d9c 100644 --- a/svtools/uiconfig/ui/placeedit.ui +++ b/svtools/uiconfig/ui/placeedit.ui @@ -10,7 +10,7 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-refresh</property> + <property name="icon-name">view-refresh</property> </object> <object class="GtkDialog" id="PlaceEditDialog"> <property name="can_focus">False</property> diff --git a/svtools/uiconfig/ui/tabbuttons.ui b/svtools/uiconfig/ui/tabbuttons.ui index 96dcfd71f318..82c5727c285a 100644 --- a/svtools/uiconfig/ui/tabbuttons.ui +++ b/svtools/uiconfig/ui/tabbuttons.ui @@ -5,31 +5,31 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-new</property> + <property name="icon-name">document-new</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-media-previous</property> + <property name="icon-name">media-skip-backward</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-media-next</property> + <property name="icon-name">media-skip-forward</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-goto-first</property> + <property name="icon-name">go-first</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-goto-last</property> + <property name="icon-name">go-last</property> <property name="icon_size">1</property> </object> <object class="GtkBox" id="TabButtons"> diff --git a/svtools/uiconfig/ui/tabbuttonsmirrored.ui b/svtools/uiconfig/ui/tabbuttonsmirrored.ui index 50effb83e558..926887af1c15 100644 --- a/svtools/uiconfig/ui/tabbuttonsmirrored.ui +++ b/svtools/uiconfig/ui/tabbuttonsmirrored.ui @@ -5,31 +5,31 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-new</property> + <property name="icon-name">document-new</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-media-previous</property> + <property name="icon-name">media-skip-backward</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-media-next</property> + <property name="icon-name">media-skip-forward</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-goto-first</property> + <property name="icon-name">go-first</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-goto-last</property> + <property name="icon-name">go-last</property> <property name="icon_size">1</property> </object> <object class="GtkBox" id="TabButtons"> diff --git a/svx/uiconfig/ui/grafctrlbox.ui b/svx/uiconfig/ui/grafctrlbox.ui index eec2fbbab284..c33e83cb2b9c 100644 --- a/svx/uiconfig/ui/grafctrlbox.ui +++ b/svx/uiconfig/ui/grafctrlbox.ui @@ -18,7 +18,7 @@ <property name="can_focus">False</property> <property name="halign">center</property> <property name="valign">center</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/svx/uiconfig/ui/navigationbar.ui b/svx/uiconfig/ui/navigationbar.ui index 7df39f6a7687..7810a763b27a 100644 --- a/svx/uiconfig/ui/navigationbar.ui +++ b/svx/uiconfig/ui/navigationbar.ui @@ -5,31 +5,31 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-first</property> + <property name="icon-name">go-first</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-previous</property> + <property name="icon-name">media-skip-backward</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-next</property> + <property name="icon-name">media-skip-forward</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-last</property> + <property name="icon-name">go-last</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-new</property> + <property name="icon-name">document-new</property> <property name="icon_size">1</property> </object> <object class="GtkBox" id="NavigationBar"> diff --git a/sw/uiconfig/swriter/ui/addressblockdialog.ui b/sw/uiconfig/swriter/ui/addressblockdialog.ui index 3a1ff56a212c..925b622b57d0 100644 --- a/sw/uiconfig/swriter/ui/addressblockdialog.ui +++ b/sw/uiconfig/swriter/ui/addressblockdialog.ui @@ -5,33 +5,33 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-up</property> + <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> </object> <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_text" translatable="yes" context="addressblockdialog|image5|tooltip_text">Add to address</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkImage" id="image6"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkTreeStore" id="liststore1"> <columns> diff --git a/sw/uiconfig/swriter/ui/cardmediumpage.ui b/sw/uiconfig/swriter/ui/cardmediumpage.ui index a8b16bbb614d..52818c5f1fac 100644 --- a/sw/uiconfig/swriter/ui/cardmediumpage.ui +++ b/sw/uiconfig/swriter/ui/cardmediumpage.ui @@ -12,7 +12,7 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkBox" id="CardMediumPage"> <property name="visible">True</property> diff --git a/sw/uiconfig/swriter/ui/columnpage.ui b/sw/uiconfig/swriter/ui/columnpage.ui index 8d15e3917448..51d09dfab6a2 100644 --- a/sw/uiconfig/swriter/ui/columnpage.ui +++ b/sw/uiconfig/swriter/ui/columnpage.ui @@ -54,13 +54,13 @@ <object class="GtkImage" id="image7"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image8"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> <property name="icon_size">1</property> </object> <!-- n-columns=1 n-rows=1 --> diff --git a/sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui b/sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui index 55cc5dd4b36f..689b5fa5a917 100644 --- a/sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui +++ b/sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-up</property> + <property name="icon-name">go-up</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> </object> <object class="GtkTreeStore" id="liststore2"> <columns> diff --git a/sw/uiconfig/swriter/ui/editfielddialog.ui b/sw/uiconfig/swriter/ui/editfielddialog.ui index be73f2a936c6..86b69a471f9c 100644 --- a/sw/uiconfig/swriter/ui/editfielddialog.ui +++ b/sw/uiconfig/swriter/ui/editfielddialog.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-previous</property> + <property name="icon-name">media-skip-backward</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-media-next</property> + <property name="icon-name">media-skip-forward</property> </object> <object class="GtkDialog" id="EditFieldDialog"> <property name="can_focus">False</property> diff --git a/sw/uiconfig/swriter/ui/envaddresspage.ui b/sw/uiconfig/swriter/ui/envaddresspage.ui index da21f38f904a..2eeb573896fc 100644 --- a/sw/uiconfig/swriter/ui/envaddresspage.ui +++ b/sw/uiconfig/swriter/ui/envaddresspage.ui @@ -5,7 +5,7 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkBox" id="EnvAddressPage"> <property name="visible">True</property> diff --git a/sw/uiconfig/swriter/ui/indexentry.ui b/sw/uiconfig/swriter/ui/indexentry.ui index de3bba70f1b2..8828a8d7207f 100644 --- a/sw/uiconfig/swriter/ui/indexentry.ui +++ b/sw/uiconfig/swriter/ui/indexentry.ui @@ -13,32 +13,32 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="stock">gtk-index</property> + <property name="icon-name">vcl/res/index.png</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-first</property> + <property name="icon-name">go-first</property> </object> <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-last</property> + <property name="icon-name">go-last</property> </object> <object class="GtkImage" id="image6"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-refresh</property> + <property name="icon-name">view-refresh</property> </object> <object class="GtkDialog" id="IndexEntryDialog"> <property name="can_focus">False</property> diff --git a/sw/uiconfig/swriter/ui/insertfootnote.ui b/sw/uiconfig/swriter/ui/insertfootnote.ui index 18d919a17f13..e8c8f9c2364b 100644 --- a/sw/uiconfig/swriter/ui/insertfootnote.ui +++ b/sw/uiconfig/swriter/ui/insertfootnote.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkDialog" id="InsertFootnoteDialog"> <property name="can_focus">False</property> diff --git a/sw/uiconfig/swriter/ui/insertscript.ui b/sw/uiconfig/swriter/ui/insertscript.ui index 9d1e5d3256a8..9263e0491c77 100644 --- a/sw/uiconfig/swriter/ui/insertscript.ui +++ b/sw/uiconfig/swriter/ui/insertscript.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkDialog" id="InsertScriptDialog"> <property name="can_focus">False</property> diff --git a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui index 9c71a7a07d21..7fe5fdd151f8 100644 --- a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui +++ b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui @@ -5,13 +5,13 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> <property name="icon_size">1</property> </object> <object class="GtkBox" id="MMAddressBlockPage"> diff --git a/sw/uiconfig/swriter/ui/mmsalutationpage.ui b/sw/uiconfig/swriter/ui/mmsalutationpage.ui index 59a41530545b..e6cb43fae5f4 100644 --- a/sw/uiconfig/swriter/ui/mmsalutationpage.ui +++ b/sw/uiconfig/swriter/ui/mmsalutationpage.ui @@ -5,13 +5,13 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> <property name="icon_size">1</property> </object> <object class="GtkBox" id="MMSalutationPage"> diff --git a/sw/uiconfig/swriter/ui/outlinebutton.ui b/sw/uiconfig/swriter/ui/outlinebutton.ui index efd7cd261d75..a0c2b9e5db82 100644 --- a/sw/uiconfig/swriter/ui/outlinebutton.ui +++ b/sw/uiconfig/swriter/ui/outlinebutton.ui @@ -5,13 +5,13 @@ <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image5"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="stock">gtk-go-down</property> + <property name="icon-name">go-down</property> <property name="icon_size">1</property> </object> <object class="GtkBox" id="OutlineButton"> diff --git a/sw/uiconfig/swriter/ui/tablecolumnpage.ui b/sw/uiconfig/swriter/ui/tablecolumnpage.ui index 7964582a1706..5f4bbc40a27a 100644 --- a/sw/uiconfig/swriter/ui/tablecolumnpage.ui +++ b/sw/uiconfig/swriter/ui/tablecolumnpage.ui @@ -46,13 +46,13 @@ <object class="GtkImage" id="image7"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image8"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> <property name="icon_size">1</property> </object> <!-- n-columns=1 n-rows=1 --> diff --git a/sw/uiconfig/swriter/ui/testmailsettings.ui b/sw/uiconfig/swriter/ui/testmailsettings.ui index eedc2f6471ab..ed6e78b2682a 100644 --- a/sw/uiconfig/swriter/ui/testmailsettings.ui +++ b/sw/uiconfig/swriter/ui/testmailsettings.ui @@ -152,7 +152,7 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-dialog-error</property> + <property name="icon-name">dialog-error</property> </object> <packing> <property name="expand">False</property> @@ -164,7 +164,7 @@ <object class="GtkImage" id="image3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-apply</property> + <property name="icon-name">sw/res/sc20558.png</property> </object> <packing> <property name="expand">False</property> @@ -186,7 +186,7 @@ <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-dialog-error</property> + <property name="icon-name">dialog-error</property> </object> <packing> <property name="expand">False</property> @@ -198,7 +198,7 @@ <object class="GtkImage" id="image4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-apply</property> + <property name="icon-name">sw/res/sc20558.png</property> </object> <packing> <property name="expand">False</property> diff --git a/sw/uiconfig/swriter/ui/tokenwidget.ui b/sw/uiconfig/swriter/ui/tokenwidget.ui index ed5f5a40ce67..df1cc5cf1ff5 100644 --- a/sw/uiconfig/swriter/ui/tokenwidget.ui +++ b/sw/uiconfig/swriter/ui/tokenwidget.ui @@ -5,12 +5,12 @@ <object class="GtkImage" id="image1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkBox" id="TokenWidget"> <property name="visible">True</property> diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst index 68f23533eae0..73e05c724ca2 100644 --- a/vcl/inc/bitmaps.hlst +++ b/vcl/inc/bitmaps.hlst @@ -54,7 +54,6 @@ #define SV_RESID_BITMAP_SCROLLV "vcl/res/scrollv.png" #define SV_RESID_BITMAP_SCROLLH "vcl/res/scrollh.png" #define SV_RESID_BITMAP_CLOSEDOC "vcl/res/closedoc.png" -#define SV_RESID_BITMAP_INDEX "vcl/res/index.png" #define SV_RESID_BITMAP_REFRESH "res/reload.png" #define SV_RESID_BITMAP_NOTEBOOKBAR "res/notebookbar.png" @@ -132,7 +131,6 @@ #define SPINNER_64_12 "vcl/res/spinner-64-12.png" //end, Throbber::getDefaultImageURLs -#define IMG_APPLY "sw/res/sc20558.png" #define IMG_WARN "dbaccess/res/exwarning.png" #define IMG_ERROR "dbaccess/res/exerror.png" #define IMG_INFO "dbaccess/res/exinfo.png" diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index a24e7b93182d..cdadb60b279f 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -91,67 +91,68 @@ namespace { OUString mapStockToImageResource(std::u16string_view sType) { - if (sType == u"gtk-index") - return SV_RESID_BITMAP_INDEX; - else if (sType == u"gtk-refresh") + if (sType == u"view-refresh") return SV_RESID_BITMAP_REFRESH; - else if (sType == u"gtk-apply") - return IMG_APPLY; - else if (sType == u"gtk-dialog-error") + else if (sType == u"dialog-error") return IMG_ERROR; - else if (sType == u"gtk-add") + else if (sType == u"list-add") return IMG_ADD; - else if (sType == u"gtk-remove") + else if (sType == u"list-remove") return IMG_REMOVE; - else if (sType == u"gtk-copy") + else if (sType == u"edit-copy") return IMG_COPY; - else if (sType == u"gtk-paste") + else if (sType == u"edit-paste") return IMG_PASTE; return OUString(); } - SymbolType mapStockToSymbol(std::u16string_view sType) - { - SymbolType eRet = SymbolType::DONTKNOW; - if (sType == u"gtk-media-next") - eRet = SymbolType::NEXT; - else if (sType == u"gtk-media-previous") - eRet = SymbolType::PREV; - else if (sType == u"gtk-media-play") - eRet = SymbolType::PLAY; - else if (sType == u"gtk-media-stop") - eRet = SymbolType::STOP; - else if (sType == u"gtk-goto-first") - eRet = SymbolType::FIRST; - else if (sType == u"gtk-goto-last") - eRet = SymbolType::LAST; - else if (sType == u"gtk-go-back") - eRet = SymbolType::ARROW_LEFT; - else if (sType == u"gtk-go-forward") - eRet = SymbolType::ARROW_RIGHT; - else if (sType == u"gtk-go-up") - eRet = SymbolType::ARROW_UP; - else if (sType == u"gtk-go-down") - eRet = SymbolType::ARROW_DOWN; - else if (sType == u"gtk-missing-image") - eRet = SymbolType::IMAGE; - else if (sType == u"gtk-help") - eRet = SymbolType::HELP; - else if (sType == u"gtk-close") - eRet = SymbolType::CLOSE; - else if (sType == u"gtk-new") - eRet = SymbolType::PLUS; - else if (!mapStockToImageResource(sType).isEmpty()) - eRet = SymbolType::IMAGE; - return eRet; - } +} - void setupFromActionName(Button *pButton, VclBuilder::stringmap &rMap, const css::uno::Reference<css::frame::XFrame>& rFrame); +SymbolType VclBuilder::mapStockToSymbol(std::u16string_view sType) +{ + SymbolType eRet = SymbolType::DONTKNOW; + if (sType == u"media-skip-forward") + eRet = SymbolType::NEXT; + else if (sType == u"media-skip-backward") + eRet = SymbolType::PREV; + else if (sType == u"media-playback-start") + eRet = SymbolType::PLAY; + else if (sType == u"media-playback-stop") + eRet = SymbolType::STOP; + else if (sType == u"go-first") + eRet = SymbolType::FIRST; + else if (sType == u"go-last") + eRet = SymbolType::LAST; + else if (sType == u"go-previous") + eRet = SymbolType::ARROW_LEFT; + else if (sType == u"go-next") + eRet = SymbolType::ARROW_RIGHT; + else if (sType == u"go-up") + eRet = SymbolType::ARROW_UP; + else if (sType == u"go-down") + eRet = SymbolType::ARROW_DOWN; + else if (sType == u"missing-image") + eRet = SymbolType::IMAGE; + else if (sType == u"help-browser") + eRet = SymbolType::HELP; + else if (sType == u"window-close") + eRet = SymbolType::CLOSE; + else if (sType == u"document-new") + eRet = SymbolType::PLUS; + else if (sType == u"pan-down-symbolic") + eRet = SymbolType::SPIN_DOWN; + else if (sType == u"pan-up-symbolic") + eRet = SymbolType::SPIN_UP; + else if (!mapStockToImageResource(sType).isEmpty()) + eRet = SymbolType::IMAGE; + return eRet; } -#if defined SAL_LOG_WARN namespace { + void setupFromActionName(Button *pButton, VclBuilder::stringmap &rMap, const css::uno::Reference<css::frame::XFrame>& rFrame); + +#if defined SAL_LOG_WARN bool isButtonType(WindowType nType) { return nType == WindowType::PUSHBUTTON || @@ -163,9 +164,10 @@ namespace nType == WindowType::MOREBUTTON || nType == WindowType::SPINBUTTON; } -} #endif +} + weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString &rUIFile, bool bMobile) { bool bUseJSBuilder = false; @@ -695,22 +697,25 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr continue; aImagesToBeRemoved.insert(elem.m_sValue); - VclBuilder::StockMap::iterator aFind = m_pParserState->m_aStockMap.find(elem.m_sValue.toUtf8()); - if (aFind == m_pParserState->m_aStockMap.end()) + if (!elem.m_bRadio) { - if (!elem.m_bRadio) + const Image& rImage = pImage->GetImage(); + SymbolType eSymbol = mapStockToSymbol(rImage.GetStock()); + if (eSymbol != SymbolType::IMAGE && eSymbol != SymbolType::DONTKNOW) { - const Image& rImage = pImage->GetImage(); - if (rImage.GetStock() == "pan-down-symbolic") - pTargetButton->SetSymbol(SymbolType::SPIN_DOWN); - else if (rImage.GetStock() == "pan-up-symbolic") - pTargetButton->SetSymbol(SymbolType::SPIN_UP); - else - pTargetButton->SetModeImage(rImage); + pTargetButton->SetSymbol(eSymbol); + //fdo#76457 keep symbol images small e.g. tools->customize->menu + //but images the right size. Really the PushButton::CalcMinimumSize + //and PushButton::ImplDrawPushButton are the better place to handle + //this, but its such a train-wreck + pTargetButton->SetStyle(pTargetButton->GetStyle() | WB_SMALLSTYLE); + } + else + { + pTargetButton->SetModeImage(rImage); if (pImage->GetStyle() & WB_SMALLSTYLE) { - pTargetButton->SetStyle(pTargetButton->GetStyle() | WB_SMALLSTYLE); - Size aSz(pTargetButton->GetModeImage().GetSizePixel()); + Size aSz(rImage.GetSizePixel()); aSz.AdjustWidth(6); aSz.AdjustHeight(6); if (pTargetButton->get_width_request() == -1) @@ -719,43 +724,24 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr pTargetButton->set_height_request(aSz.Height()); } } - else - pTargetRadio->SetModeRadioImage(pImage->GetImage()); } else + pTargetRadio->SetModeRadioImage(pImage->GetImage()); + + auto aFind = m_pParserState->m_aImageSizeMap.find(elem.m_sValue.toUtf8()); + if (aFind != m_pParserState->m_aImageSizeMap.end()) { - const stockinfo &rImageInfo = aFind->second; - SymbolType eType = mapStockToSymbol(rImageInfo.m_sStock); - SAL_WARN_IF(eType == SymbolType::DONTKNOW, "vcl", "missing stock image element for button"); - if (eType == SymbolType::DONTKNOW) - continue; - if (!elem.m_bRadio) - { - pTargetButton->SetSymbol(eType); - //fdo#76457 keep symbol images small e.g. tools->customize->menu - //but images the right size. Really the PushButton::CalcMinimumSize - //and PushButton::ImplDrawPushButton are the better place to handle - //this, but its such a train-wreck - if (eType != SymbolType::IMAGE) - pTargetButton->SetStyle(pTargetButton->GetStyle() | WB_SMALLSTYLE); - } - else - SAL_WARN_IF(eType != SymbolType::IMAGE, "vcl.builder", "unimplemented symbol type for radiobuttons"); - if (eType == SymbolType::IMAGE) - { - Image const aImage(StockImage::Yes, - mapStockToImageResource(rImageInfo.m_sStock)); - if (!elem.m_bRadio) - pTargetButton->SetModeImage(aImage); - else - pTargetRadio->SetModeRadioImage(aImage); - } - switch (rImageInfo.m_nSize) + switch (aFind->second) { case 1: pTarget->SetSmallSymbol(); break; + case 2: + assert(pImage->GetStyle() & WB_SMALLSTYLE); + pTarget->SetStyle(pTarget->GetStyle() | WB_SMALLSTYLE); + break; case 3: + pTarget->SetStyle(pTarget->GetStyle() | WB_SMALLSTYLE); // large toolbar, make bigger than normal (4) pTarget->set_width_request(pTarget->GetOptimalSize().Width() * 1.5); pTarget->set_height_request(pTarget->GetOptimalSize().Height() * 1.5); @@ -763,10 +749,10 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr case 4: break; default: - SAL_WARN("vcl.builder", "unsupported image size " << rImageInfo.m_nSize); + SAL_WARN("vcl.builder", "unsupported image size " << aFind->second); break; } - m_pParserState->m_aStockMap.erase(aFind); + m_pParserState->m_aImageSizeMap.erase(aFind); } } @@ -777,28 +763,6 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr delete_by_name(elem.toUtf8()); } - //fill in any stock icons in surviving images - for (auto const& elem : m_pParserState->m_aStockMap) - { - FixedImage *pImage = get<FixedImage>(elem.first); - SAL_WARN_IF(!pImage, "vcl", "missing elements of image/stock: " << elem.first); - if (!pImage) - continue; - - const stockinfo &rImageInfo = elem.second; - if (rImageInfo.m_sStock == "gtk-missing-image") - continue; - - SymbolType eType = mapStockToSymbol(rImageInfo.m_sStock); - SAL_WARN_IF(eType != SymbolType::IMAGE, "vcl", "unimplemented symbol type for images"); - if (eType != SymbolType::IMAGE) - continue; - - Image const aImage(StockImage::Yes, - mapStockToImageResource(rImageInfo.m_sStock)); - pImage->SetImage(aImage); - } - //Set button menus when everything has been imported for (auto const& elem : m_pParserState->m_aButtonMenuMaps) { @@ -1089,19 +1053,10 @@ namespace rMap.erase(aFind); } } - 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; + if (sIconName == "missing-image") + return OUString(); + OUString sReplace = mapStockToImageResource(sIconName); + return !sReplace.isEmpty() ? sReplace : sIconName; } WinBits extractRelief(VclBuilder::stringmap &rMap) @@ -1438,22 +1393,13 @@ void VclBuilder::extractBuffer(const OString &id, stringmap &rMap) } } -void VclBuilder::extractStock(const OString &id, stringmap &rMap) +int VclBuilder::getImageSize(const stringmap &rMap) { - VclBuilder::stringmap::iterator aFind = rMap.find(OString("stock")); - if (aFind == rMap.end()) - return; - - stockinfo aInfo; - aInfo.m_sStock = aFind->second; - rMap.erase(aFind); - aFind = rMap.find(OString("icon-size")); + int nSize = 4; + auto aFind = rMap.find(OString("icon-size")); if (aFind != rMap.end()) - { - aInfo.m_nSize = aFind->second.toInt32(); - rMap.erase(aFind); - } - m_pParserState->m_aStockMap[id] = aInfo; + nSize = aFind->second.toInt32(); + return nSize; } void VclBuilder::extractButtonImage(const OString &id, stringmap &rMap, bool bRadio) @@ -2052,8 +1998,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & OUString sIconName = extractIconName(rMap); if (!sIconName.isEmpty()) xFixedImage->SetImage(FixedImage::loadThemeImage(sIconName)); - else - extractStock(id, rMap); + m_pParserState->m_aImageSizeMap[id] = getImageSize(rMap); xWindow = xFixedImage; //such parentless GtkImages are temps used to set icons on buttons //default them to hidden to stop e.g. insert->index entry flicking temp @@ -2189,8 +2134,6 @@ 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)); diff --git a/vcl/uiconfig/ui/aboutbox.ui b/vcl/uiconfig/ui/aboutbox.ui index e435c0e9e8a5..c97ed6b9703a 100644 --- a/vcl/uiconfig/ui/aboutbox.ui +++ b/vcl/uiconfig/ui/aboutbox.ui @@ -13,7 +13,7 @@ <object class="GtkImage" id="logo"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui index 1acd51039a1e..f68e122f1797 100644 --- a/vcl/uiconfig/ui/printdialog.ui +++ b/vcl/uiconfig/ui/printdialog.ui @@ -41,22 +41,22 @@ <object class="GtkImage" id="imgBack"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-back</property> + <property name="icon-name">go-previous</property> </object> <object class="GtkImage" id="imgFirst"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-first</property> + <property name="icon-name">go-first</property> </object> <object class="GtkImage" id="imgForward"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-go-forward</property> + <property name="icon-name">go-next</property> </object> <object class="GtkImage" id="imgLast"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-goto-last</property> + <property name="icon-name">go-last</property> </object> <object class="GtkDialog" id="PrintDialog"> <property name="can_focus">False</property> @@ -799,7 +799,7 @@ <object class="GtkImage" id="collateimage"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="icon-name">missing-image</property> </object> <packing> <property name="expand">False</property> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 58940896d4b9..963f46f90b27 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -16555,6 +16555,12 @@ void ensure_disable_ctrl_page_up_down_bindings() } } +bool IsAllowedBuiltInIcon(std::u16string_view iconName) +{ + // limit the named icons to those known by VclBuilder + return VclBuilder::mapStockToSymbol(iconName) != SymbolType::DONTKNOW; +} + class GtkInstanceBuilder : public weld::Builder { private: @@ -16592,7 +16598,7 @@ private: if (icon_name) { OUString aIconName(icon_name, strlen(icon_name), RTL_TEXTENCODING_UTF8); - if (aIconName != "pan-up-symbolic" && aIconName != "pan-down-symbolic") + if (!IsAllowedBuiltInIcon(aIconName)) { if (GdkPixbuf* pixbuf = load_icon_by_name_theme_lang(aIconName, m_aIconTheme, m_aUILang)) { @@ -16608,7 +16614,7 @@ private: if (const gchar* icon_name = gtk_tool_button_get_icon_name(pToolButton)) { OUString aIconName(icon_name, strlen(icon_name), RTL_TEXTENCODING_UTF8); - if (aIconName != "pan-up-symbolic" && aIconName != "pan-down-symbolic") + if (!IsAllowedBuiltInIcon(aIconName)) { if (GdkPixbuf* pixbuf = load_icon_by_name_theme_lang(aIconName, m_aIconTheme, m_aUILang)) { |