Code

Cleanup
[inkscape.git] / src / connector-context.cpp
index 7343d6250c51a14e2a6049ef33c50df04307972a..e38f8a627d34f1b7db0b21a8c4b324b6e9fa9cdc 100644 (file)
@@ -9,7 +9,7 @@
  * Released under GNU GPL, read the file 'COPYING' for more information
  *
  * TODO:
- *  o  Have shapes avoid coonvex hulls of objects, rather than their
+ *  o  Have shapes avoid convex hulls of objects, rather than their
  *     bounding box.  Possibly implement the unfinished ConvexHull
  *     class in libnr.
  *     (HOWEVER, using the convex hull C of a shape S does the wrong thing if a
@@ -713,7 +713,8 @@ connector_handle_button_release(SPConnectorContext *const cc, GdkEventButton con
                 cc->clickeditem->setHidden(false);
                 sp_conn_adjust_path(SP_PATH(cc->clickeditem));
                 cc->clickeditem->updateRepr();
-                sp_document_done(doc);
+                sp_document_done(doc, SP_VERB_CONTEXT_CONNECTOR, 
+                                 _("Reroute connector"));
                 cc_set_active_conn(cc, cc->clickeditem);
                 sp_document_ensure_up_to_date(doc);
                 cc->state = SP_CONNECTOR_CONTEXT_IDLE;
@@ -793,8 +794,8 @@ spcc_connector_set_subsequent_point(SPConnectorContext *const cc, NR::Point cons
     SPDesktop *dt = cc->desktop;
     NR::Point o = dt->dt2doc(cc->p[0]);
     NR::Point d = dt->dt2doc(p);
-    Avoid::Point src = { o[NR::X], o[NR::Y] };
-    Avoid::Point dst = { d[NR::X], d[NR::Y] };
+    Avoid::Point src(o[NR::X], o[NR::Y]);
+    Avoid::Point dst(d[NR::X], d[NR::Y]);
 
     if (!cc->newConnRef) {
         Avoid::Router *router = sp_desktop_document(dt)->router;
@@ -920,7 +921,7 @@ spcc_flush_white(SPConnectorContext *cc, SPCurve *gc)
     sp_curve_unref(c);
 
     /* Flush pending updates */
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_CONTEXT_CONNECTOR, _("Create connector"));
     sp_document_ensure_up_to_date(doc);
 }
 
@@ -1274,7 +1275,10 @@ void cc_selection_set_avoid(bool const set_avoid)
         return;
     }
 
-    sp_document_done(document);
+    char *event_desc = (set_avoid) ?
+            _("Make connectors avoid selected objects") :
+            _("Make connectors ignore selected objects");
+    sp_document_done(document, SP_VERB_CONTEXT_CONNECTOR, event_desc);
 }