From: buliabyak Date: Thu, 5 Oct 2006 08:15:23 +0000 (+0000) Subject: undo annotations X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95a79e1608143335aec1e9d54415699343294039;p=inkscape.git undo annotations --- diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index 41a45eec2..9a13bab73 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -107,7 +107,7 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge SP_OBJECT_REPR(desktop->namedview)->appendChild(repr); Inkscape::GC::release(repr); sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, - /* TODO: annotate */ "desktop-events.cpp:127"); + _("Create guide")); } desktop->set_coordinate_status(event_dt); } @@ -180,14 +180,16 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data) NR::Point const event_dt(desktop->w2d(event_w)); if (sp_canvas_world_pt_inside_window(item->canvas, event_w)) { sp_guide_moveto(*guide, sp_guide_position_from_pt(guide, event_dt), true); + sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, + _("Move guide")); } else { /* Undo movement of any attached shapes. */ sp_guide_moveto(*guide, guide->position, false); sp_guide_remove(guide); + sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, + _("Delete guide")); } moved = false; - sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, - /* TODO: annotate */ "desktop-events.cpp:207"); desktop->set_coordinate_status(event_dt); desktop->setPosition (event_dt); } diff --git a/src/draw-context.cpp b/src/draw-context.cpp index bb1f56044..6946d7df1 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -558,7 +558,7 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc) } sp_document_done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL, - /* TODO: annotate */ "draw-context.cpp:561"); + _("Draw path")); } sp_curve_unref(c); diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index 8a39eb0b4..614e0b450 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -614,7 +614,7 @@ void SPFlowtext::convert_to_text() item->deleteObject(); sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, - /* TODO: annotate */ "sp-flowtext.cpp:617"); + _("Convert flowed text to text")); } SPItem *SPFlowtext::get_frame(SPItem *after) diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp index 453ddfc19..e2f5b8335 100644 --- a/src/text-chemistry.cpp +++ b/src/text-chemistry.cpp @@ -154,7 +154,7 @@ text_put_on_path() SP_OBJECT_REPR(text)->setAttribute("y", NULL); sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, - /* TODO: annotate */ "text-chemistry.cpp:157"); + _("Put text on path")); g_slist_free(text_reprs); } @@ -192,7 +192,7 @@ text_remove_from_path() } else { selection->setList(g_slist_copy((GSList *) selection->itemList())); // reselect to update statusbar description sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, - /* TODO: annotate */ "text-chemistry.cpp:195"); + _("Remove text from path")); } } @@ -240,7 +240,7 @@ text_remove_all_kerns() sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("Select text(s) to remove kerns from.")); } else { sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, - /* TODO: annotate */ "text-chemistry.cpp:243"); + _("Remove manual kerns")); } } @@ -309,7 +309,7 @@ text_flow_into_shape() SP_OBJECT(text)->deleteObject (true); sp_document_done(doc, SP_VERB_CONTEXT_TEXT, - /* TODO: annotate */ "text-chemistry.cpp:312"); + _("Flow text into shape")); sp_desktop_selection(desktop)->set(SP_ITEM(root_object)); @@ -395,7 +395,7 @@ text_unflow () g_slist_free (new_objs); sp_document_done(doc, SP_VERB_CONTEXT_TEXT, - /* TODO: annotate */ "text-chemistry.cpp:398"); + _("Unflow flowed text")); } diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index a7b2aa991..81bce14c3 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -216,7 +216,7 @@ private : if (changed) { sp_document_done ( sp_desktop_document (desktop) , SP_VERB_DIALOG_ALIGN_DISTRIBUTE, - /* TODO: annotate */ "align-and-distribute.cpp:219" ); + _("Align")); } @@ -376,7 +376,7 @@ private : if (changed) { sp_document_done ( sp_desktop_document (desktop), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, - /* TODO: annotate */ "align-and-distribute.cpp:379"); + _("Distribute")); } } guint _index; @@ -487,7 +487,7 @@ private : prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation); sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, - /* TODO: annotate */ "align-and-distribute.cpp:490"); + _("Remove overlaps")); } }; @@ -517,7 +517,7 @@ private : prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation); sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, - /* TODO: annotate */ "align-and-distribute.cpp:520"); + _("Arrange connector network")); } }; @@ -547,7 +547,7 @@ private : prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation); sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, - /* TODO: annotate */ "align-and-distribute.cpp:550"); + _("Unclump")); } }; @@ -611,7 +611,7 @@ private : prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation); sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, - /* TODO: annotate */ "align-and-distribute.cpp:614"); + _("Randomize positions")); } }; @@ -706,6 +706,11 @@ private : changed = true; } + if (changed) { + sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, + _("Distribute text baselines")); + } + } else { for (std::list::iterator it(selected.begin()); it != selected.end(); @@ -720,11 +725,11 @@ private : changed = true; } } - } - if (changed) { - sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, - /* TODO: annotate */ "align-and-distribute.cpp:727"); + if (changed) { + sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, + _("Align text baselines")); + } } } }; diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 2cd21a560..6be732317 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -582,7 +582,7 @@ Transformation::applyPageMove(Inkscape::Selection *selection) } sp_document_done ( sp_desktop_document (selection->desktop()) , SP_VERB_DIALOG_TRANSFORM, - /* TODO: annotate */ "transformation.cpp:585"); + _("Move")); } void @@ -634,7 +634,7 @@ Transformation::applyPageScale(Inkscape::Selection *selection) } sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, - /* TODO: annotate */ "transformation.cpp:637"); + _("Scale")); } void @@ -653,7 +653,7 @@ Transformation::applyPageRotate(Inkscape::Selection *selection) } sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, - /* TODO: annotate */ "transformation.cpp:656"); + _("Rotate")); } void @@ -706,7 +706,7 @@ Transformation::applyPageSkew(Inkscape::Selection *selection) } sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, - /* TODO: annotate */ "transformation.cpp:709"); + _("Skew")); } @@ -733,7 +733,7 @@ Transformation::applyPageTransform(Inkscape::Selection *selection) } sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, - /* TODO: annotate */ "transformation.cpp:736"); + _("Edit transformation matrix")); } diff --git a/src/verbs.cpp b/src/verbs.cpp index e32727d2d..d741d5a8f 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1094,7 +1094,7 @@ LayerVerb::perform(SPAction *action, void *data, void *pdata) if (next) { dt->setCurrentLayer(next); sp_document_done(sp_desktop_document(dt), SP_VERB_LAYER_NEXT, - /* TODO: annotate */ "verbs.cpp:1077"); + _("Move to next layer")); dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Moved to next layer.")); } else { dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move past last layer.")); @@ -1106,7 +1106,7 @@ LayerVerb::perform(SPAction *action, void *data, void *pdata) if (prev) { dt->setCurrentLayer(prev); sp_document_done(sp_desktop_document(dt), SP_VERB_LAYER_PREV, - /* TODO: annotate */ "verbs.cpp:1089"); + _("Move to previous layer")); dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Moved to previous layer.")); } else { dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move past first layer.")); @@ -1156,19 +1156,19 @@ LayerVerb::perform(SPAction *action, void *data, void *pdata) switch (verb) { case SP_VERB_LAYER_TO_TOP: message = g_strdup_printf(_("Raised layer %s."), layer->defaultLabel()); - description = _("Layer to Top"); + description = _("Layer to top"); break; case SP_VERB_LAYER_RAISE: message = g_strdup_printf(_("Raised layer %s."), layer->defaultLabel()); - description = _("Raise Layer"); + description = _("Raise layer"); break; case SP_VERB_LAYER_TO_BOTTOM: message = g_strdup_printf(_("Lowered layer %s."), layer->defaultLabel()); - description = _("Layer to Bottom"); + description = _("Layer to bottom"); break; case SP_VERB_LAYER_LOWER: message = g_strdup_printf(_("Lowered layer %s."), layer->defaultLabel()); - description = _("Lower Layer"); + description = _("Lower layer"); break; }; sp_document_done(sp_desktop_document(dt), verb, description);