From: Jon A. Cruz Date: Thu, 2 Dec 2010 08:34:41 +0000 (-0800) Subject: C++ cleanup on patch. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5631ed32020cc6eb670765a4463eb1c66d2b90d6;p=inkscape.git C++ cleanup on patch. --- 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)