From c053bc755d74ed3bf614d1b3e2edb7c70a85bfec Mon Sep 17 00:00:00 2001 From: gustav_b Date: Sun, 9 Jul 2006 12:23:42 +0000 Subject: [PATCH] undo annotations --- src/path-chemistry.cpp | 4 ++-- src/rect-context.cpp | 4 ++-- src/splivarot.cpp | 31 ++++++++++--------------------- 3 files changed, 14 insertions(+), 25 deletions(-) diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 61e61bee3..c897658ff 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -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, _("No path(s) to break apart in the selection.")); return; diff --git a/src/rect-context.cpp b/src/rect-context.cpp index 7e1b76e2c..b03cdeead 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -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; } diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 9083f9b06..5734c9f10 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -56,49 +56,49 @@ 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, _("No paths to simplify in the selection.")); -- 2.30.2