diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-07-28 17:02:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-07-29 07:20:15 +0000 |
| commit | 19b77eb696ef4675cb45a5ed9401f37f2df82e0c (patch) | |
| tree | e15cb2d03d1061d88378acb05c81c7eab210807d /src/ui/desktop/menubar.cpp | |
| parent | Add Patrick improvements to verbs toggle menu items (diff) | |
| download | inkscape-19b77eb696ef4675cb45a5ed9401f37f2df82e0c.tar.gz inkscape-19b77eb696ef4675cb45a5ed9401f37f2df82e0c.zip | |
fix coding style
Diffstat (limited to 'src/ui/desktop/menubar.cpp')
| -rw-r--r-- | src/ui/desktop/menubar.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/ui/desktop/menubar.cpp b/src/ui/desktop/menubar.cpp index 79c3f5aaf..fd0d502d8 100644 --- a/src/ui/desktop/menubar.cpp +++ b/src/ui/desktop/menubar.cpp @@ -41,8 +41,9 @@ // ================= Common ==================== -std::vector<std::pair<unsigned int, Gtk::CheckMenuItem *> > checkmenuitems; -unsigned int lastverb = 0;; +std::vector<std::pair<unsigned int, Gtk::CheckMenuItem *>> checkmenuitems; +unsigned int lastverb = 0; +; // Sets tip static void @@ -59,8 +60,7 @@ deselect_action(SPAction *action) } // Trigger action -static void -item_activate(Gtk::MenuItem *menuitem, SPAction *action) +static void item_activate(Gtk::MenuItem *menuitem, SPAction *action) { if (action->verb->get_code() == lastverb) { lastverb = 0; @@ -71,12 +71,11 @@ item_activate(Gtk::MenuItem *menuitem, SPAction *action) lastverb = 0; } -static void -toggle_checkmenu(unsigned int emitting_verb, bool value) +static void toggle_checkmenu(unsigned int emitting_verb, bool value) { for (auto menu : checkmenuitems) { if (emitting_verb == menu.first) { - if (emitting_verb == lastverb) { + if (emitting_verb == lastverb) { lastverb = 0; return; } @@ -183,8 +182,7 @@ build_menu_item_from_verb(SPAction* action, // =============== CheckMenuItem ================== -bool -getStateFromPref(SPDesktop* dt, Glib::ustring item) +bool getStateFromPref(SPDesktop *dt, Glib::ustring item) { Glib::ustring pref_path; @@ -533,7 +531,6 @@ build_menu(Gtk::MenuShell* menu, Inkscape::XML::Node* xml, Inkscape::UI::View::V } } SP_ACTIVE_DESKTOP->_menu_update.connect(sigc::ptr_fun(&toggle_checkmenu)); - } Gtk::MenuBar* |
