From a1f1e29a8a207ea7ef4be583a050778cf2875217 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 13 Jun 2011 01:28:49 +0100 Subject: Replace deprecated GtkSignal (bzr r10282.1.1) --- src/connector-context.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/connector-context.cpp') diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 27e052499..251b41066 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -1640,8 +1640,8 @@ static void cc_active_shape_add_knot(SPDesktop* desktop, SPItem* item, Connectio knot->_event_handler_id); knot->_event_handler_id = 0; - gtk_signal_connect(GTK_OBJECT(knot->item), "event", - GTK_SIGNAL_FUNC(cc_generic_knot_handler), knot); + g_signal_connect(G_OBJECT(knot->item), "event", + G_CALLBACK(cc_generic_knot_handler), knot); sp_knot_set_position(knot, item->avoidRef->getConnectionPointPos(cp.type, cp.id) * desktop->doc2dt(), 0); sp_knot_show(knot); cphandles[knot] = cp; @@ -1826,8 +1826,8 @@ cc_set_active_conn(SPConnectorContext *cc, SPItem *item) knot->_event_handler_id); knot->_event_handler_id = 0; - gtk_signal_connect(GTK_OBJECT(knot->item), "event", - GTK_SIGNAL_FUNC(cc_generic_knot_handler), knot); + g_signal_connect(G_OBJECT(knot->item), "event", + G_CALLBACK(cc_generic_knot_handler), knot); cc->endpt_handle[i] = knot; } -- cgit v1.2.3 From dcf765f3dcbff2e65428e0f002bb5ea3648940f0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 Jun 2011 15:35:01 +0000 Subject: warning cleanup (no functional changes) - enclose && / || with brackets to avoid ambiguity. - don't cast from booleans to pointers. (bzr r10359) --- src/connector-context.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/connector-context.cpp') diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 251b41066..2aa9c41ee 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -1306,12 +1306,12 @@ cc_connector_rerouting_finish(SPConnectorContext *const cc, Geom::Point *const p if (found) { if (cc->clickedhandle == cc->endpt_handle[0]) { - cc->clickeditem->setAttribute("inkscape:connection-start", shape_label, false); - cc->clickeditem->setAttribute("inkscape:connection-start-point", cpid, false); + cc->clickeditem->setAttribute("inkscape:connection-start", shape_label, NULL); + cc->clickeditem->setAttribute("inkscape:connection-start-point", cpid, NULL); } else { - cc->clickeditem->setAttribute("inkscape:connection-end", shape_label, false); - cc->clickeditem->setAttribute("inkscape:connection-end-point", cpid, false); + cc->clickeditem->setAttribute("inkscape:connection-end", shape_label, NULL); + cc->clickeditem->setAttribute("inkscape:connection-end-point", cpid, NULL); } g_free(shape_label); } @@ -1451,23 +1451,23 @@ spcc_flush_white(SPConnectorContext *cc, SPCurve *gc) bool connection = false; cc->newconn->setAttribute( "inkscape:connector-type", - cc->isOrthogonal ? "orthogonal" : "polyline", false ); + cc->isOrthogonal ? "orthogonal" : "polyline", NULL ); cc->newconn->setAttribute( "inkscape:connector-curvature", - Glib::Ascii::dtostr(cc->curvature).c_str(), false ); + Glib::Ascii::dtostr(cc->curvature).c_str(), NULL ); if (cc->shref) { - cc->newconn->setAttribute( "inkscape:connection-start", cc->shref, false); + cc->newconn->setAttribute( "inkscape:connection-start", cc->shref, NULL); if (cc->scpid) { - cc->newconn->setAttribute( "inkscape:connection-start-point", cc->scpid, false); + cc->newconn->setAttribute( "inkscape:connection-start-point", cc->scpid, NULL); } connection = true; } if (cc->ehref) { - cc->newconn->setAttribute( "inkscape:connection-end", cc->ehref, false); + cc->newconn->setAttribute( "inkscape:connection-end", cc->ehref, NULL); if (cc->ecpid) { - cc->newconn->setAttribute( "inkscape:connection-end-point", cc->ecpid, false); + cc->newconn->setAttribute( "inkscape:connection-end-point", cc->ecpid, NULL); } connection = true; } @@ -1950,7 +1950,7 @@ void cc_selection_set_avoid(bool const set_avoid) char const *value = (set_avoid) ? "true" : NULL; if (cc_item_is_shape(item)) { - item->setAttribute("inkscape:connector-avoid", value, false); + item->setAttribute("inkscape:connector-avoid", value, NULL); item->avoidRef->handleSettingChange(); changes++; } -- cgit v1.2.3 From eed6e9c2c229b10911a23976c47da79fc70a5b87 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 17 Jul 2011 21:47:09 +0200 Subject: - rename SPItem::i2d_affine to i2dt_affine, to clarify that it is item-to-desktop, not item-to-document. This should make it easier to spot bugs. - tag some instances where the document-to-desktop transform has been hardcoded (bzr r10466) --- src/connector-context.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/connector-context.cpp') diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 2aa9c41ee..ecc8cdaad 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -977,7 +977,7 @@ connector_handle_motion_notify(SPConnectorContext *const cc, GdkEventMotion cons m.unSetup(); // Update the hidden path - Geom::Affine i2d = (cc->clickeditem)->i2d_affine(); + Geom::Affine i2d ( (cc->clickeditem)->i2dt_affine() ); Geom::Affine d2i = i2d.inverse(); SPPath *path = SP_PATH(cc->clickeditem); SPCurve *curve = path->original_curve ? path->original_curve : path->curve; @@ -1607,7 +1607,7 @@ endpt_handler(SPKnot */*knot*/, GdkEvent *event, SPConnectorContext *cc) // Show the red path for dragging. cc->red_curve = SP_PATH(cc->clickeditem)->original_curve ? SP_PATH(cc->clickeditem)->original_curve->copy() : SP_PATH(cc->clickeditem)->curve->copy(); - Geom::Affine i2d = (cc->clickeditem)->i2d_affine(); + Geom::Affine i2d = (cc->clickeditem)->i2dt_affine(); cc->red_curve->transform(i2d); sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(cc->red_bpath), cc->red_curve); @@ -1766,7 +1766,7 @@ cc_set_active_conn(SPConnectorContext *cc, SPItem *item) g_assert( SP_IS_PATH(item) ); SPCurve *curve = SP_PATH(item)->original_curve ? SP_PATH(item)->original_curve : SP_PATH(item)->curve; - Geom::Affine i2d = item->i2d_affine(); + Geom::Affine i2dt = item->i2dt_affine(); if (cc->active_conn == item) { @@ -1780,10 +1780,10 @@ cc_set_active_conn(SPConnectorContext *cc, SPItem *item) else { // Just adjust handle positions. - Geom::Point startpt = *(curve->first_point()) * i2d; + Geom::Point startpt = *(curve->first_point()) * i2dt; sp_knot_set_position(cc->endpt_handle[0], startpt, 0); - Geom::Point endpt = *(curve->last_point()) * i2d; + Geom::Point endpt = *(curve->last_point()) * i2dt; sp_knot_set_position(cc->endpt_handle[1], endpt, 0); } @@ -1855,10 +1855,10 @@ cc_set_active_conn(SPConnectorContext *cc, SPItem *item) return; } - Geom::Point startpt = *(curve->first_point()) * i2d; + Geom::Point startpt = *(curve->first_point()) * i2dt; sp_knot_set_position(cc->endpt_handle[0], startpt, 0); - Geom::Point endpt = *(curve->last_point()) * i2d; + Geom::Point endpt = *(curve->last_point()) * i2dt; sp_knot_set_position(cc->endpt_handle[1], endpt, 0); sp_knot_show(cc->endpt_handle[0]); -- cgit v1.2.3 From 2633767789e4264b13ef91a684accf734fb4e94f Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Wed, 26 Oct 2011 21:55:51 -0700 Subject: Fixing more broken and split doc comments. (bzr r10697) --- src/connector-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/connector-context.cpp') diff --git a/src/connector-context.cpp b/src/connector-context.cpp index ecc8cdaad..b2687e540 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -1,4 +1,4 @@ -/** +/* * Connector creation tool * * Authors: -- cgit v1.2.3