summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2006-07-09 12:23:42 +0000
committergustav_b <gustav_b@users.sourceforge.net>2006-07-09 12:23:42 +0000
commit3f2a9dbe7eea583400907752256005e09375e0ef (patch)
treeb5fc0206ac2c7c3181300d2402efc3effe705645 /src
parentAdded descriptions to Undo/Redo commands in the menus (diff)
downloadinkscape-3f2a9dbe7eea583400907752256005e09375e0ef.tar.gz
inkscape-3f2a9dbe7eea583400907752256005e09375e0ef.zip
undo annotations
(bzr r1380)
Diffstat (limited to 'src')
-rw-r--r--src/path-chemistry.cpp4
-rw-r--r--src/rect-context.cpp4
-rw-r--r--src/splivarot.cpp31
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, _("<b>No path(s)</b> 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, _("<b>No paths</b> to simplify in the selection."));