summaryrefslogtreecommitdiffstats
path: root/src/ui/contextmenu.cpp
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-07-21 01:07:14 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-07-21 01:07:14 +0000
commit9dfa379a29ad986254ffd966ed6e886ffb176543 (patch)
tree14ea92afaa4a251a966e0381b2c561aeb2435227 /src/ui/contextmenu.cpp
parentSimplify code for context menu items of Layers and Objects dialogs (diff)
downloadinkscape-9dfa379a29ad986254ffd966ed6e886ffb176543.tar.gz
inkscape-9dfa379a29ad986254ffd966ed6e886ffb176543.zip
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.
Diffstat (limited to 'src/ui/contextmenu.cpp')
-rw-r--r--src/ui/contextmenu.cpp17
1 files changed, 8 insertions, 9 deletions
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 */