From 5631ed32020cc6eb670765a4463eb1c66d2b90d6 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 2 Dec 2010 00:34:41 -0800 Subject: [PATCH] C++ cleanup on patch. --- src/widgets/toolbox.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index a6740fcec..ce71a097e 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -8060,22 +8060,17 @@ static void connector_tb_event_attr_changed(Inkscape::XML::Node *repr, { GtkWidget *tbl = GTK_WIDGET(data); - if (g_object_get_data(G_OBJECT(tbl), "freeze")) { - return; - } - if (strcmp(name, "inkscape:connector-spacing") != 0) { - return; - } + if ( !g_object_get_data(G_OBJECT(tbl), "freeze") + && (strcmp(name, "inkscape:connector-spacing") == 0) ) { + GtkAdjustment *adj = static_cast(gtk_object_get_data(GTK_OBJECT(tbl), "spacing")); + gdouble spacing = defaultConnSpacing; + sp_repr_get_double(repr, "inkscape:connector-spacing", &spacing); - GtkAdjustment *adj = (GtkAdjustment*) - gtk_object_get_data(GTK_OBJECT(tbl), "spacing"); - gdouble spacing = defaultConnSpacing; - sp_repr_get_double(repr, "inkscape:connector-spacing", &spacing); + gtk_adjustment_set_value(adj, spacing); + gtk_adjustment_value_changed(adj); - gtk_adjustment_set_value(adj, spacing); - gtk_adjustment_value_changed(adj); - - spinbutton_defocus(GTK_OBJECT(tbl)); + spinbutton_defocus(GTK_OBJECT(tbl)); + } } static void sp_connector_new_connection_point(GtkWidget *, GObject *tbl) -- 2.30.2