diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-07-21 01:07:14 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-07-21 01:07:14 +0000 |
| commit | 9dfa379a29ad986254ffd966ed6e886ffb176543 (patch) | |
| tree | 14ea92afaa4a251a966e0381b2c561aeb2435227 /src/ui/dialog/objects.cpp | |
| parent | Simplify code for context menu items of Layers and Objects dialogs (diff) | |
| download | inkscape-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/dialog/objects.cpp')
| -rw-r--r-- | src/ui/dialog/objects.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp index 38fd2eba2..f0f99c219 100644 --- a/src/ui/dialog/objects.cpp +++ b/src/ui/dialog/objects.cpp @@ -257,7 +257,7 @@ Gtk::MenuItem& ObjectsPanel::_addPopupItem( SPDesktop *desktop, unsigned int cod Gtk::Label *label = Gtk::manage(new Gtk::Label(action->name, true)); label->set_xalign(0.0); - if (action->image) { + if (_show_contextmenu_icons && action->image) { item->set_name("ImageMenuItem"); // custom name to identify our "ImageMenuItems" Gtk::Image *icon = Gtk::manage(sp_get_icon_image(action->image, Gtk::ICON_SIZE_MENU)); @@ -1853,6 +1853,9 @@ ObjectsPanel::ObjectsPanel() : //Set up the pop-up menu // ------------------------------------------------------- { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + _show_contextmenu_icons = prefs->getBool("/theme/menuIcons_objects", true); + _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_RENAME, (int)BUTTON_RENAME ) ); _watching.push_back( &_addPopupItem( targetDesktop, SP_VERB_LAYER_NEW, (int)BUTTON_NEW ) ); |
