From ff4fbbc93f67afd6cbf851691833a50d6c76b350 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 27 Jul 2016 12:19:03 +0200 Subject: Renamed some functions, fixed tests (bzr r14954.1.28) --- src/widgets/select-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 9851b0606..322c33cc3 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -257,7 +257,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, GObject *tbl) scaler = get_scale_transform_for_uniform_stroke (*bbox_geom, 0, 0, false, false, x0, y0, x1, y1); } - sp_selection_apply_affine(selection, scaler); + sp_object_set_apply_affine(selection, scaler); DocumentUndo::maybeDone(document, actionkey, SP_VERB_CONTEXT_SELECT, _("Transform by toolbar")); -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/widgets/select-toolbar.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 9851b0606..9a48b9a07 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -13,7 +13,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include <2geom/rect.h> @@ -32,19 +32,15 @@ #include "widgets/ink-action.h" #include "inkscape.h" #include "message-stack.h" -#include "preferences.h" #include "selection-chemistry.h" -#include "selection.h" #include "sp-item-transform.h" #include "sp-namedview.h" #include "toolbox.h" #include "ui/icon-names.h" #include "ui/widget/unit-tracker.h" -#include "util/units.h" #include "verbs.h" #include "widgets/icon.h" #include "widgets/sp-widget.h" -#include "widgets/spw-utilities.h" #include "widgets/widget-sizes.h" using Inkscape::UI::Widget::UnitTracker; -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/widgets/select-toolbar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 9a48b9a07..9851b0606 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -13,7 +13,7 @@ */ #ifdef HAVE_CONFIG_H -#include +# include "config.h" #endif #include <2geom/rect.h> @@ -32,15 +32,19 @@ #include "widgets/ink-action.h" #include "inkscape.h" #include "message-stack.h" +#include "preferences.h" #include "selection-chemistry.h" +#include "selection.h" #include "sp-item-transform.h" #include "sp-namedview.h" #include "toolbox.h" #include "ui/icon-names.h" #include "ui/widget/unit-tracker.h" +#include "util/units.h" #include "verbs.h" #include "widgets/icon.h" #include "widgets/sp-widget.h" +#include "widgets/spw-utilities.h" #include "widgets/widget-sizes.h" using Inkscape::UI::Widget::UnitTracker; -- cgit v1.2.3 From 49a7927ecf31ace696e9e5770e8d6543c356db7a Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 28 Jul 2016 19:15:34 +0100 Subject: Finish removing GTK+ 2 fallbacks (bzr r15023.2.8) --- src/widgets/select-toolbar.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 9851b0606..7dfa18f49 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -415,12 +415,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb g_object_set_data(G_OBJECT(spw), "dtw", desktop->getCanvas()); // The vb frame holds all other widgets and is used to set sensitivity depending on selection state. -#if GTK_CHECK_VERSION(3,0,0) - GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + auto vb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_set_homogeneous(GTK_BOX(vb), FALSE); -#else - GtkWidget *vb = gtk_hbox_new(FALSE, 0); -#endif gtk_widget_show(vb); gtk_container_add(GTK_CONTAINER(spw), vb); -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/widgets/select-toolbar.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 9851b0606..9a48b9a07 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -13,7 +13,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include <2geom/rect.h> @@ -32,19 +32,15 @@ #include "widgets/ink-action.h" #include "inkscape.h" #include "message-stack.h" -#include "preferences.h" #include "selection-chemistry.h" -#include "selection.h" #include "sp-item-transform.h" #include "sp-namedview.h" #include "toolbox.h" #include "ui/icon-names.h" #include "ui/widget/unit-tracker.h" -#include "util/units.h" #include "verbs.h" #include "widgets/icon.h" #include "widgets/sp-widget.h" -#include "widgets/spw-utilities.h" #include "widgets/widget-sizes.h" using Inkscape::UI::Widget::UnitTracker; -- cgit v1.2.3 From a0cacd78d5d987eafa3739bb8f45587d82246780 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Fri, 5 Aug 2016 19:07:48 +0100 Subject: Split InkAction classes into separate files (bzr r15043) --- src/widgets/select-toolbar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index fde5a95cd..81fb2371b 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -29,7 +29,8 @@ #include "widgets/ege-adjustment-action.h" #include "helper/action-context.h" #include "helper/action.h" -#include "widgets/ink-action.h" +#include "ink-action.h" +#include "ink-toggle-action.h" #include "inkscape.h" #include "message-stack.h" #include "selection-chemistry.h" -- cgit v1.2.3 From 532f77b14a76fc04e6bdeca3625f9a55b5f11bdf Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 25 Oct 2016 00:58:43 +0200 Subject: CPPification: almost all sp_object_set_whatever and sp_selection_whatever global functions are now methods of ObjectSet*, with these additional benefits: - They can now act on any SelectionSet, not just the current selection; - Whenever possible, they don't need a desktop anymore and can run if called from GUI. I hope I did not break too many things in the process. *: So instead of callink sp_selection_move(desktop,x,y), you call myobjectset->move(x,y) (bzr r15189) --- src/widgets/select-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index e551c28c3..c5ff713bd 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -254,7 +254,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, GObject *tbl) scaler = get_scale_transform_for_uniform_stroke (*bbox_geom, 0, 0, false, false, x0, y0, x1, y1); } - sp_object_set_apply_affine(selection, scaler); + selection->applyAffine(scaler); DocumentUndo::maybeDone(document, actionkey, SP_VERB_CONTEXT_SELECT, _("Transform by toolbar")); -- cgit v1.2.3 From 9d5b2b1b51810c97dd941b051f7bcfeada346fa4 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 12 Nov 2016 10:52:50 +0100 Subject: Fix selection toolbar icons missing on start (bzr r15240) --- src/widgets/select-toolbar.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index c5ff713bd..2ac7447dd 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -550,14 +550,14 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb } else { g_warning("Unexpected holder type"); } - // "Transform with object" buttons { + InkToggleAction* itact = ink_toggle_action_new( "transform_stroke", _("Scale stroke width"), _("When scaling objects, scale the stroke width by the same proportion"), - INKSCAPE_ICON("transform-affect-stroke"), - Inkscape::ICON_SIZE_DECORATION ); + "transform-affect-stroke", + secondarySize ); gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/stroke", true) ); g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_stroke), desktop) ; gtk_action_group_add_action( mainActions, GTK_ACTION(itact) ); @@ -567,8 +567,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb InkToggleAction* itact = ink_toggle_action_new( "transform_corners", _("Scale rounded corners"), _("When scaling rectangles, scale the radii of rounded corners"), - INKSCAPE_ICON("transform-affect-rounded-corners"), - Inkscape::ICON_SIZE_DECORATION ); + "transform-affect-rounded-corners", + secondarySize ); gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/rectcorners", true) ); g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_corners), desktop) ; gtk_action_group_add_action( mainActions, GTK_ACTION(itact) ); @@ -578,8 +578,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb InkToggleAction* itact = ink_toggle_action_new( "transform_gradient", _("Move gradients"), _("Move gradients (in fill or stroke) along with the objects"), - INKSCAPE_ICON("transform-affect-gradient"), - Inkscape::ICON_SIZE_DECORATION ); + "transform-affect-gradient", + secondarySize ); gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/gradient", true) ); g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_gradient), desktop) ; gtk_action_group_add_action( mainActions, GTK_ACTION(itact) ); @@ -589,8 +589,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb InkToggleAction* itact = ink_toggle_action_new( "transform_pattern", _("Move patterns"), _("Move patterns (in fill or stroke) along with the objects"), - INKSCAPE_ICON("transform-affect-pattern"), - Inkscape::ICON_SIZE_DECORATION ); + "transform-affect-pattern", + secondarySize ); gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/pattern", true) ); g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_pattern), desktop) ; gtk_action_group_add_action( mainActions, GTK_ACTION(itact) ); -- cgit v1.2.3