From 9dfa379a29ad986254ffd966ed6e886ffb176543 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sun, 21 Jul 2019 03:07:14 +0200 Subject: Make menu icon preference apply to Layers and Objects dialogs Also fix "show-icons" attribute inheritance in menus.xml and make it apply to canvas icons. --- src/ui/contextmenu.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/ui/contextmenu.cpp') diff --git a/src/ui/contextmenu.cpp b/src/ui/contextmenu.cpp index 1424ba4ab..4286bc70e 100644 --- a/src/ui/contextmenu.cpp +++ b/src/ui/contextmenu.cpp @@ -68,18 +68,17 @@ ContextMenu::ContextMenu(SPDesktop *desktop, SPItem *item) : _desktop = desktop; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - int show_icons_pref = prefs->getInt("/theme/menuIcons", 0); - bool show_icon = show_icons_pref >= 0 ? true : false; + bool show_icons = prefs->getInt("/theme/menuIcons_canvas", true); - AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_UNDO), show_icon); - AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_REDO), show_icon); + AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_UNDO), show_icons); + AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_REDO), show_icons); AddSeparator(); - AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_CUT), show_icon); - AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_COPY), show_icon); - AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_PASTE), show_icon); + AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_CUT), show_icons); + AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_COPY), show_icons); + AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_PASTE), show_icons); AddSeparator(); - AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_DUPLICATE), show_icon); - AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_DELETE), show_icon); + AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_DUPLICATE), show_icons); + AppendItemFromVerb(Inkscape::Verb::get(SP_VERB_EDIT_DELETE), show_icons); positionOfLastDialog = 10; // 9 in front + 1 for the separator in the next if; used to position the dialog menu entries below each other /* Item menu */ -- cgit v1.2.3