Code

undo annotations
authorgustav_b <gustav_b@users.sourceforge.net>
Sun, 9 Jul 2006 12:23:42 +0000 (12:23 +0000)
committergustav_b <gustav_b@users.sourceforge.net>
Sun, 9 Jul 2006 12:23:42 +0000 (12:23 +0000)
src/path-chemistry.cpp
src/rect-context.cpp
src/splivarot.cpp

index 61e61bee3431aa87fb5f94b12f4e3a5bf36191a0..c897658ff7b6651c44137b5ed7d4135fcf00533f 100644 (file)
@@ -136,7 +136,7 @@ sp_selected_path_combine(void)
     repr->setPosition(topmost > 0 ? topmost + 1 : 0);
 
     sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_COMBINE, 
-                     /* TODO: annotate */ "path-chemistry.cpp:139");
+                         _("Combine"));
 
     selection->set(repr);
 
@@ -230,7 +230,7 @@ sp_selected_path_break_apart(void)
 
     if (did) {
         sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_BREAK_APART, 
-                         /* TODO: annotate */ "path-chemistry.cpp:233");
+                         _("Break Apart"));
     } else {
         sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No path(s)</b> to break apart in the selection."));
         return;
index 7e1b76e2c8bd9565b251466815f4648626e09d41..b03cdeead7c08dc5aee4bd0a3be52900a8587bfc 100644 (file)
@@ -486,8 +486,8 @@ static void sp_rect_finish(SPRectContext *rc)
         SP_OBJECT(rc->item)->updateRepr();
 
         sp_desktop_selection(dt)->set(rc->item);
-        sp_document_done(sp_desktop_document(dt), SP_VERB_CONTEXT_RECT, 
-                         /* TODO: annotate */ "rect-context.cpp:490");
+        sp_document_done(sp_desktop_document(dt), SP_VERB_CONTEXT_RECT,
+                         _("Create rectangle"));
 
         rc->item = NULL;
     }
index 9083f9b06f98d85d10379c0bdd67ec5a4017e60e..5734c9f101511e6587ba2c8cf832ad27c3aac18b 100644 (file)
 
 bool   Ancetre(Inkscape::XML::Node *a, Inkscape::XML::Node *who);
 
-void sp_selected_path_boolop(bool_op bop);
+void sp_selected_path_boolop(bool_op bop, const unsigned int verb=SP_VERB_NONE, const Glib::ustring description="");
 void sp_selected_path_do_offset(bool expand, double prefOffset);
 void sp_selected_path_create_offset_object(int expand, bool updating);
 
 void
 sp_selected_path_union()
 {
-    sp_selected_path_boolop(bool_op_union);
+    sp_selected_path_boolop(bool_op_union, SP_VERB_SELECTION_UNION, _("Union"));
 }
 
 void
 sp_selected_path_intersect()
 {
-    sp_selected_path_boolop(bool_op_inters);
+    sp_selected_path_boolop(bool_op_inters, SP_VERB_SELECTION_INTERSECT, _("Intersection"));
 }
 
 void
 sp_selected_path_diff()
 {
-    sp_selected_path_boolop(bool_op_diff);
+    sp_selected_path_boolop(bool_op_diff, SP_VERB_SELECTION_DIFF, _("Difference"));
 }
 
 void
 sp_selected_path_symdiff()
 {
-    sp_selected_path_boolop(bool_op_symdiff);
+    sp_selected_path_boolop(bool_op_symdiff, SP_VERB_SELECTION_SYMDIFF, _("Exclusion"));
 }
 void
 sp_selected_path_cut()
 {
-    sp_selected_path_boolop(bool_op_cut);
+    sp_selected_path_boolop(bool_op_cut, SP_VERB_SELECTION_CUT, _("Division"));
 }
 void
 sp_selected_path_slice()
 {
-    sp_selected_path_boolop(bool_op_slice);
+    sp_selected_path_boolop(bool_op_slice, SP_VERB_SELECTION_SLICE,  _("Cut Path"));
 }
 
 
 // boolean operations
 // take the source paths from the file, do the operation, delete the originals and add the results
 void
-sp_selected_path_boolop(bool_op bop)
+sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustring description)
 {
     SPDesktop *desktop = SP_ACTIVE_DESKTOP;
 
@@ -541,18 +541,7 @@ sp_selected_path_boolop(bool_op bop)
         Inkscape::GC::release(repr);
     }
 
-    unsigned int operation_verb = SP_VERB_NONE;
-    switch(bop) {
-        case bool_op_union   : operation_verb = SP_VERB_SELECTION_UNION;     break;
-        case bool_op_inters  : operation_verb = SP_VERB_SELECTION_INTERSECT; break;
-        case bool_op_diff    : operation_verb = SP_VERB_SELECTION_DIFF;      break;
-        case bool_op_symdiff : operation_verb = SP_VERB_SELECTION_SYMDIFF;   break;
-        case bool_op_cut     : operation_verb = SP_VERB_SELECTION_CUT;       break;
-        case bool_op_slice   : operation_verb = SP_VERB_SELECTION_SLICE;     break;
-    }
-
-    sp_document_done(sp_desktop_document(desktop), operation_verb, 
-                     /* TODO: annotate */ "splivarot.cpp:555");
+    sp_document_done(sp_desktop_document(desktop), verb, description);
 
     delete res;
 }
@@ -1517,7 +1506,7 @@ sp_selected_path_simplify_selection(float threshold, bool justCoalesce,
 
     if (didSomething)
         sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_SIMPLIFY, 
-                         /* TODO: annotate */ "splivarot.cpp:1520");
+                         _("Simplify"));
     else
         desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No paths</b> to simplify in the selection."));