From 129c961172a02e62b54e456d6072ee3ccfab0d12 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 28 Jul 2019 01:04:18 +0200 Subject: Fix coding style --- src/desktop.h | 2 +- src/display/sp-canvas.cpp | 4 ++-- src/ui/desktop/menubar.cpp | 18 ++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/desktop.h b/src/desktop.h index 450e0b2cf..cff48aa99 100644 --- a/src/desktop.h +++ b/src/desktop.h @@ -206,7 +206,7 @@ public: Glib::ustring _reconstruction_old_layer_id; sigc::signal _tool_changed; - sigc::signal _menu_update; + sigc::signal _menu_update; sigc::signal _layer_changed_signal; sigc::signal::accumulated _set_style_signal; sigc::signal::accumulated _query_style_signal; diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 64fca5926..311f52567 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -2461,8 +2461,8 @@ int SPCanvas::paint() bool exact = arena->drawing.getExact(); arena->drawing.setExact(false); Geom::IntRect canvas_rect = Geom::IntRect::from_xywh(_x0, _y0, allocation.width, allocation.height); - Geom::IntRect _xray_rect = Geom::IntRect::from_xywh(_xray_orig[0] - _xray_radius, _xray_orig[1] - _xray_radius, - (_xray_radius * 2), (_xray_radius * 2)); + Geom::IntRect _xray_rect = Geom::IntRect::from_xywh( + _xray_orig[0] - _xray_radius, _xray_orig[1] - _xray_radius, (_xray_radius * 2), (_xray_radius * 2)); paintXRayBuffer(_xray_rect, canvas_rect); arena->drawing.setExact(exact); arena->drawing.setRenderMode(rm); diff --git a/src/ui/desktop/menubar.cpp b/src/ui/desktop/menubar.cpp index 8d72d49ad..0ada70284 100644 --- a/src/ui/desktop/menubar.cpp +++ b/src/ui/desktop/menubar.cpp @@ -56,8 +56,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) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool freeze = prefs->getBool("/menu/freeze", false); @@ -68,15 +67,13 @@ item_activate(Gtk::MenuItem * menuitem, SPAction* action) } } -void -activate_checkmenu(unsigned int emited_verb, unsigned int recibe_verb, Gtk::CheckMenuItem* menuitem) +void activate_checkmenu(unsigned int emited_verb, unsigned int recibe_verb, Gtk::CheckMenuItem *menuitem) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool freeze = prefs->getBool("/menu/freeze", false); if (!freeze) { prefs->setBool("/menu/freeze", true); - if (emited_verb == recibe_verb) - { + if (emited_verb == recibe_verb) { if (menuitem->get_active()) { menuitem->property_active() = false; } else { @@ -277,7 +274,7 @@ build_menu_check_item_from_verb(SPAction* action) // Set initial state before connecting signals. checkitem_update(menuitem, action); - + menuitem->signal_toggled().connect( sigc::bind(sigc::ptr_fun(&item_activate), menuitem, action)); menuitem->signal_select().connect( sigc::bind(sigc::ptr_fun(&select_action), action)); @@ -452,15 +449,16 @@ build_menu(Gtk::MenuShell* menu, Inkscape::XML::Node* xml, Inkscape::UI::View::V Gtk::CheckMenuItem* menuitem = build_menu_check_item_from_verb(action); if (menuitem) { - SP_ACTIVE_DESKTOP->_menu_update.connect(sigc::bind(sigc::ptr_fun(&activate_checkmenu), verb->get_code(), menuitem)); + SP_ACTIVE_DESKTOP->_menu_update.connect( + sigc::bind(sigc::ptr_fun(&activate_checkmenu), verb->get_code(), menuitem)); menu->append(*menuitem); } - + } else if (menu_ptr->attribute("radio") != nullptr) { Gtk::MenuItem* menuitem = build_menu_item_from_verb(action, show_icons_curr, true, &group); if (menuitem) { - // TODO: if necesary update a radio in the future we can folloe the previus checkbutton code + // TODO: if necesary update a radio in the future we can follow the previus checkbutton if (menu_ptr->attribute("default") != nullptr) { auto radiomenuitem = dynamic_cast(menuitem); if (radiomenuitem) { -- cgit v1.2.3