From 6feb3acbebce6b87bfb440b985871fbc0b4764d8 Mon Sep 17 00:00:00 2001 From: John Smith Date: Tue, 28 Aug 2012 16:17:07 +0900 Subject: Fix for 1042602 : Select toolbar : Width and height are not initially 0 (bzr r11629) --- src/widgets/select-toolbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 4378bc19d..4dfebe11f 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -497,19 +497,19 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb // four spinbuttons eact = create_adjustment_action( "XAction", C_("Select toolbar", "X position"), C_("Select toolbar", "X:"), "X", - -1e6, GTK_WIDGET(desktop->canvas), tracker, spw, + 0.0, GTK_WIDGET(desktop->canvas), tracker, spw, _("Horizontal coordinate of selection"), TRUE ); gtk_action_group_add_action( selectionActions, GTK_ACTION(eact) ); contextActions->push_back( GTK_ACTION(eact) ); eact = create_adjustment_action( "YAction", C_("Select toolbar", "Y position"), C_("Select toolbar", "Y:"), "Y", - -1e6, GTK_WIDGET(desktop->canvas), tracker, spw, + 0.0, GTK_WIDGET(desktop->canvas), tracker, spw, _("Vertical coordinate of selection"), FALSE ); gtk_action_group_add_action( selectionActions, GTK_ACTION(eact) ); contextActions->push_back( GTK_ACTION(eact) ); eact = create_adjustment_action( "WidthAction", C_("Select toolbar", "Width"), C_("Select toolbar", "W:"), "width", - 1e-3, GTK_WIDGET(desktop->canvas), tracker, spw, + 0.0, GTK_WIDGET(desktop->canvas), tracker, spw, _("Width of selection"), FALSE ); gtk_action_group_add_action( selectionActions, GTK_ACTION(eact) ); contextActions->push_back( GTK_ACTION(eact) ); @@ -528,7 +528,7 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb } eact = create_adjustment_action( "HeightAction", C_("Select toolbar", "Height"), C_("Select toolbar", "H:"), "height", - 1e-3, GTK_WIDGET(desktop->canvas), tracker, spw, + 0.0, GTK_WIDGET(desktop->canvas), tracker, spw, _("Height of selection"), FALSE ); gtk_action_group_add_action( selectionActions, GTK_ACTION(eact) ); contextActions->push_back( GTK_ACTION(eact) ); -- cgit v1.2.3 From 659322af2957eb263b61301a19cd7d965c944207 Mon Sep 17 00:00:00 2001 From: John Smith Date: Wed, 5 Sep 2012 07:54:05 +0900 Subject: Fix for 1042602 : Select toolbar, fix for regression when X and Y values are negative (bzr r11651) --- src/widgets/select-toolbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 4dfebe11f..61b04121a 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -497,13 +497,13 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb // four spinbuttons eact = create_adjustment_action( "XAction", C_("Select toolbar", "X position"), C_("Select toolbar", "X:"), "X", - 0.0, GTK_WIDGET(desktop->canvas), tracker, spw, + -1e6, GTK_WIDGET(desktop->canvas), tracker, spw, _("Horizontal coordinate of selection"), TRUE ); gtk_action_group_add_action( selectionActions, GTK_ACTION(eact) ); contextActions->push_back( GTK_ACTION(eact) ); eact = create_adjustment_action( "YAction", C_("Select toolbar", "Y position"), C_("Select toolbar", "Y:"), "Y", - 0.0, GTK_WIDGET(desktop->canvas), tracker, spw, + -1e6, GTK_WIDGET(desktop->canvas), tracker, spw, _("Vertical coordinate of selection"), FALSE ); gtk_action_group_add_action( selectionActions, GTK_ACTION(eact) ); contextActions->push_back( GTK_ACTION(eact) ); -- cgit v1.2.3 From aca1914d674a5e81234208248e3c8515a60dd19d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Oct 2012 12:30:12 +1000 Subject: code cleanup: make more functions static, add includes. (bzr r11737) --- src/widgets/select-toolbar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 61b04121a..3ccfa9cf9 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -52,6 +52,7 @@ #include "ink-action.h" #include <2geom/rect.h> #include "ui/icon-names.h" +#include "select-toolbar.h" using Inkscape::UnitTracker; using Inkscape::DocumentUndo; -- cgit v1.2.3 From 8ee9827502fadcae0b02fec434799e94ee115357 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 25 Dec 2012 22:50:08 +0000 Subject: Convert a load more C-style pointer casts to GObject or C++ casts (merry christmas\!) (bzr r11986) --- src/widgets/select-toolbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 3ccfa9cf9..549581610 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -88,13 +88,13 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) if (unit.base == SP_UNIT_DIMENSIONLESS) { double const val = 1. / unit.unittobase; for (unsigned i = 0; i < G_N_ELEMENTS(keyval); ++i) { - GtkAdjustment *a = (GtkAdjustment *) g_object_get_data(G_OBJECT(spw), keyval[i].key); + GtkAdjustment *a = GTK_ADJUSTMENT(g_object_get_data(G_OBJECT(spw), keyval[i].key)); gtk_adjustment_set_value(a, val); tracker->setFullVal( a, keyval[i].val ); } } else { for (unsigned i = 0; i < G_N_ELEMENTS(keyval); ++i) { - GtkAdjustment *a = (GtkAdjustment *) g_object_get_data(G_OBJECT(spw), keyval[i].key); + GtkAdjustment *a = GTK_ADJUSTMENT(g_object_get_data(G_OBJECT(spw), keyval[i].key)); gtk_adjustment_set_value(a, sp_pixels_get_units(keyval[i].val, unit)); } } -- cgit v1.2.3