Code

undo annotations
authorbuliabyak <buliabyak@users.sourceforge.net>
Thu, 5 Oct 2006 08:15:23 +0000 (08:15 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Thu, 5 Oct 2006 08:15:23 +0000 (08:15 +0000)
src/desktop-events.cpp
src/draw-context.cpp
src/sp-flowtext.cpp
src/text-chemistry.cpp
src/ui/dialog/align-and-distribute.cpp
src/ui/dialog/transformation.cpp
src/verbs.cpp

index 41a45eec263c45e7dcbcd688e742ff62d5970890..9a13bab735a7dd9a311b9cb2b86006fdd842abda 100644 (file)
@@ -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);
                 }
index bb1f56044b0813eddb55a8d905093128f5623d0a..6946d7df1fb8b22dc5f959937077b2d46cb1c3f3 100644 (file)
@@ -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);
index 8a39eb0b4f576fd7ed26d390d56e4f55d411d03b..614e0b45092eb7b3236e5156a76ce3e2769550ce 100644 (file)
@@ -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)
index 453ddfc1949f6699101f9590ac32ecfd7a64db02..e2f5b833587f9797437559075e0e412afefef6a9 100644 (file)
@@ -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 <b>text(s)</b> 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"));
 }
 
 
index a7b2aa991ecdc59b9656700fea347e16757c00dd..81bce14c30ea84b4de0f23a3bea0ec793ae33874 100644 (file)
@@ -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<SPItem *>::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"));
+            }
         }
     }
 };
index 2cd21a560152b7e556b4e777020f7096761c44f7..6be732317017add430409492abc679e3e9ef6614 100644 (file)
@@ -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"));
 }
 
 
index e32727d2d9a9895adce4c7554da131fc1e7ff44a..d741d5a8fca5b36eb93db8aa3cf3a446dd717803 100644 (file)
@@ -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 <b>%s</b>."), layer->defaultLabel());
-                        description = _("Layer to Top");
+                        description = _("Layer to top");
                         break;
                     case SP_VERB_LAYER_RAISE:
                         message = g_strdup_printf(_("Raised layer <b>%s</b>."), layer->defaultLabel());
-                        description = _("Raise Layer");
+                        description = _("Raise layer");
                         break;
                     case SP_VERB_LAYER_TO_BOTTOM:
                         message = g_strdup_printf(_("Lowered layer <b>%s</b>."), layer->defaultLabel());
-                        description = _("Layer to Bottom");
+                        description = _("Layer to bottom");
                         break;
                     case SP_VERB_LAYER_LOWER:
                         message = g_strdup_printf(_("Lowered layer <b>%s</b>."), layer->defaultLabel());
-                        description = _("Lower Layer");
+                        description = _("Lower layer");
                         break;
                 };
                 sp_document_done(sp_desktop_document(dt), verb, description);