Code

undo annotations
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 10 Oct 2006 07:41:49 +0000 (07:41 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 10 Oct 2006 07:41:49 +0000 (07:41 +0000)
19 files changed:
src/dialogs/clonetiler.cpp
src/dialogs/fill-style.cpp
src/dialogs/guidelinedialog.cpp
src/dialogs/item-properties.cpp
src/dialogs/layer-properties.cpp
src/dialogs/layers-panel.cpp
src/dialogs/object-properties.cpp
src/dialogs/sp-attribute-widget.cpp
src/dialogs/stroke-style.cpp
src/dialogs/swatches.cpp
src/dialogs/text-edit.cpp
src/dialogs/tiledialog.cpp
src/dialogs/xml-tree.cpp
src/widgets/gradient-toolbar.cpp
src/widgets/gradient-vector.cpp
src/widgets/layer-selector.cpp
src/widgets/select-toolbar.cpp
src/widgets/sp-xmlview-content.cpp
src/widgets/toolbox.cpp

index 7f8c65b09d6a847fe428001c05dd53e174bf2581..324a3d94ba8ae5145f9b8dce5125d60ed2446419 100644 (file)
@@ -867,7 +867,7 @@ clonetiler_unclump (GtkWidget *widget, void *)
     g_slist_free (to_unclump);
 
     sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER, 
-                      /* TODO: annotate */ "clonetiler.cpp:867");
+                      _("Unclump tiled clones"));
 }
 
 static guint
@@ -920,7 +920,7 @@ clonetiler_remove (GtkWidget *widget, void *, bool do_undo = true)
 
     if (do_undo)
         sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER, 
-                          /* TODO: annotate */ "clonetiler.cpp:920");
+                          _("Delete tiled clones"));
 }
 
 static NR::Rect
@@ -1326,7 +1326,7 @@ clonetiler_apply (GtkWidget *widget, void *)
     clonetiler_change_selection (NULL, selection, dlg);
 
     sp_document_done(sp_desktop_document(desktop), SP_VERB_DIALOG_CLONETILER, 
-                     /* TODO: annotate */ "clonetiler.cpp:1300");
+                     _("Create tiled clones"));
 }
 
 static GtkWidget *
index 1bdc49f7e96c6d117e65afb6dfe3a4c7287a2637..22c1ee0f70dfaf0a7caf74d823cb6fb863fa4921 100644 (file)
@@ -34,6 +34,7 @@
 #include <inkscape.h>
 #include <document-private.h>
 #include <xml/repr.h>
+#include <glibmm/i18n.h>
 
 
 // These can be deleted once we sort out the libart dependence.
@@ -286,7 +287,7 @@ sp_fill_style_widget_fillrule_changed ( SPPaintSelector *psel,
     sp_repr_css_attr_unref (css);
 
     sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_FILL_STROKE, 
-                      /* TODO: annotate */ "fill-style.cpp:289");
+                      _("Change fill rule"));
 }
 
 static gchar *undo_label_1 = "fill:flatcolor:1";
@@ -326,7 +327,7 @@ sp_fill_style_widget_paint_dragged (SPPaintSelector *psel, SPWidget *spw)
         {
             sp_paint_selector_set_flat_color (psel, SP_ACTIVE_DESKTOP, "fill", "fill-opacity");
             sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label, SP_VERB_DIALOG_FILL_STROKE, 
-                                    /* TODO: annotate */ "fill-style.cpp:329");
+                                    _("Set fill color"));
             g_object_set_data (G_OBJECT (spw), "local", GINT_TO_POINTER (TRUE)); // local change, do not update from selection
             break;
         }
@@ -388,7 +389,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
             sp_repr_css_attr_unref (css);
 
             sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
-                              /* TODO: annotate */ "fill-style.cpp:391");
+                              _("Remove fill"));
             break;
         }
 
@@ -397,7 +398,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
         {
             sp_paint_selector_set_flat_color (psel, desktop, "fill", "fill-opacity");
             sp_document_maybe_done (sp_desktop_document(desktop), undo_label, SP_VERB_DIALOG_FILL_STROKE,
-                                    /* TODO: annotate */ "fill-style.cpp:400");
+                                    _("Set fill color"));
 
             // on release, toggle undo_label so that the next drag will not be lumped with this one
             if (undo_label == undo_label_1)
@@ -464,7 +465,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
                 sp_repr_css_attr_unref (css);
 
                 sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
-                                  /* TODO: annotate */ "fill-style.cpp:467");
+                                  _("Set gradient on fill"));
             }
             break;
 
@@ -511,7 +512,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
                 } // end if
 
                 sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
-                                  /* TODO: annotate */ "fill-style.cpp:514");
+                                  _("Set pattern on fill"));
 
             } // end if
 
@@ -526,7 +527,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
                     sp_repr_css_attr_unref (css);
 
                     sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
-                                      /* TODO: annotate */ "fill-style.cpp:529");
+                                      _("Unset fill"));
             }
             break;
 
index 479cab8ec1dbb9995dbad27a6d43eb0ad29e983a..8aee8a3e40263b336fab058bdafc5c542c80b170 100644 (file)
@@ -74,7 +74,7 @@ void GuidelinePropertiesDialog::_onApply()
                              : _guide->position + points );
     sp_guide_moveto(*_guide, newpos, true);
     sp_document_done(SP_OBJECT_DOCUMENT(_guide), SP_VERB_NONE, 
-                     /* TODO: annotate */ "guidelinedialog.cpp:77");
+                     _("Set guide properties"));
 }
 
 void GuidelinePropertiesDialog::_onOK()
@@ -87,7 +87,7 @@ void GuidelinePropertiesDialog::_onDelete()
     SPDocument *doc = SP_OBJECT_DOCUMENT(_guide);
     sp_guide_remove(_guide);
     sp_document_done(doc, SP_VERB_NONE, 
-                     /* TODO: annotate */ "guidelinedialog.cpp:90");
+                     _("Delete guide"));
 }
 
 void GuidelinePropertiesDialog::_response(gint response)
index 6f12a48f12a3d3225011aa9c6ac687186c5248e3..3bb7f7d84e9c31e77449b944bbc775ce3436dd41 100644 (file)
@@ -345,8 +345,8 @@ sp_item_widget_sensitivity_toggled (GtkWidget *widget, SPWidget *spw)
 
     item->setLocked(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
 
-    sp_document_maybe_done (SP_ACTIVE_DOCUMENT,  "ItemDialog:insensitive", SP_VERB_NONE
-                            /* TODO: annotate */ "item-properties.cpp:349");
+    sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM
+             gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))? _("Lock object") : _("Unlock object"));
 
     gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
 }
@@ -364,8 +364,8 @@ sp_item_widget_hidden_toggled(GtkWidget *widget, SPWidget *spw)
 
     item->setExplicitlyHidden(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)));
 
-    sp_document_maybe_done (SP_ACTIVE_DOCUMENT,  "ItemDialog:visiblity", SP_VERB_NONE
-                            /* TODO: annotate */ "item-properties.cpp:368");
+    sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM
+             gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))? _("Hide object") : _("Unhide object"));
 
     gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
 }
@@ -397,8 +397,8 @@ sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw)
         gtk_label_set_markup_with_mnemonic (GTK_LABEL (id_label), _("_Id"));
         SP_EXCEPTION_INIT (&ex);
         sp_object_setAttribute (SP_OBJECT (item), "id", id, &ex);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "ItemDialog:id", SP_VERB_NONE
-                                /* TODO: annotate */ "item-properties.cpp:401");
+        sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM
+                                _("Set object ID"));
     }
 
     /* Retrieve the label widget for the object's label */
@@ -412,8 +412,8 @@ sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw)
     SPObject *obj = (SPObject*)item;
     if (strcmp (label, obj->defaultLabel())) {
         obj->setLabel(label);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "inkscape:label", SP_VERB_NONE,
-                                /* TODO: annotate */ "item-properties.cpp:416");
+        sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
+                                _("Set object label"));
     }
 
     /* Retrieve the title */
@@ -421,16 +421,16 @@ sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw)
     gchar *title = (gchar *)gtk_entry_get_text (GTK_ENTRY (w));
     if (title != NULL) {
         obj->setTitle(title);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "title", SP_VERB_NONE
-                                /* TODO: annotate */ "item-properties.cpp:425");
+        sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM
+                                _("Set object title"));
     }
 
     /* Retrieve the description */
     gchar *desc = NULL; /* TODO:  get text from text buffer */
     if (desc != NULL) {
         obj->setDesc(desc);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "desc", SP_VERB_NONE
-                                /* TODO: annotate */ "item-properties.cpp:433");
+        sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM
+                                _("Set object description"));
     }
 
     gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
index e35cc9550a5440dfeb3b00254a76dfe1420d4637..bd95fbc719b9c6c9ff2857c69f11a24000f6acdf 100644 (file)
@@ -112,7 +112,7 @@ LayerPropertiesDialog::_apply()
 
     _strategy->perform(*this);
     sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_NONE,
-                     /* TODO: annotate */ "layer-properties.cpp:115");
+                     _("Add layer"));
 
     _close();
 }
@@ -192,7 +192,7 @@ void LayerPropertiesDialog::Rename::perform(LayerPropertiesDialog &dialog) {
                                          ( name.empty() ? NULL : (gchar *)name.c_str() )
     );
     sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
-                     /* TODO: annotate */ "layer-properties.cpp:195");
+                     _("Rename layer"));
     // TRANSLATORS: This means "The layer has been renamed"
     desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Renamed layer"));
 }
index 3a7463ff30dfb1d891a6eb4e404c46c51a08ecf1..6942778054c44bdce96dcb8bca8bab0372094b3a 100644 (file)
@@ -588,7 +588,7 @@ void LayersPanel::_toggled( Glib::ustring const& str, int targetCol )
                 item->setHidden( !newValue  );
                 item->updateRepr();
                 sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, 
-                                  /* TODO: annotate */ "layers-panel.cpp:591");
+                                  newValue? _("Unhide layer") : _("Hide layer"));
             }
             break;
 
@@ -599,7 +599,7 @@ void LayersPanel::_toggled( Glib::ustring const& str, int targetCol )
                 item->setLocked( newValue );
                 item->updateRepr();
                 sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, 
-                                  /* TODO: annotate */ "layers-panel.cpp:602");
+                                  newValue? _("Lock layer") : _("Unlock layer"));
             }
             break;
         }
@@ -695,8 +695,8 @@ void LayersPanel::_opacityChanged()
 
         sp_repr_css_attr_unref( css );
 
-        sp_document_maybe_done( _desktop->doc(), "layers:opacity", SP_VERB_NONE
-                                /* TODO: annotate */ "layers-panel.cpp:699" );
+        sp_document_maybe_done( _desktop->doc(), "layers:opacity", SP_VERB_DIALOG_LAYERS
+                                _("Change layer opacity"));
 
         _opacityConnection.unblock();
     }
index 32c1d4f76226ef9c1861536be0fa5dcd74742878..5fe3d58f8d624a7893f706f43a3ad54b1fdb90c6 100644 (file)
@@ -368,8 +368,8 @@ sp_fillstroke_opacity_changed (GtkAdjustment *a, SPWidget *dlg)
 
     sp_repr_css_attr_unref (css);
 
-    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity", SP_VERB_NONE, 
-                            /* TODO: annotate */ "object-properties.cpp:311");
+    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE, 
+                            _("Change opacity"));
 
     gtk_object_set_data (GTK_OBJECT (dlg), "blocked", GUINT_TO_POINTER (FALSE));
 }
@@ -418,7 +418,7 @@ sp_fillstroke_blur_changed (GtkAdjustment *a, SPWidget *dlg)
                                             SP_OBJECT_STYLE_MODIFIED_FLAG ));
     }
 
-    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:blur", SP_VERB_NONE,  _("Change blur"));
+    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:blur", SP_VERB_DIALOG_FILL_STROKE,  _("Change blur"));
     gtk_object_set_data (GTK_OBJECT (dlg), "blocked", GUINT_TO_POINTER (FALSE));
 }
 
index d0391a2eccc993d570708ca66288a33ea840481f..9bc40e86c75067a4da290f09294fe04a60709e9f 100644 (file)
@@ -167,7 +167,7 @@ sp_attribute_widget_changed (GtkEditable *editable)
                 gtk_entry_set_text (GTK_ENTRY (spaw), text ? text : "");
             }
             sp_document_done (SP_OBJECT_DOCUMENT (spaw->src.object), SP_VERB_NONE, 
-                              /* TODO: annotate */ "sp-attribute-widget.cpp:160");
+                              _("Set attribute"));
             
         } else if (spaw->src.repr) {
         
@@ -784,7 +784,7 @@ sp_attribute_table_entry_changed ( GtkEditable *editable,
                                              text ? text : (const gchar *) "");
                     }
                     sp_document_done (SP_OBJECT_DOCUMENT (spat->src.object), SP_VERB_NONE, 
-                                      /* TODO: annotate */ "sp-attribute-widget.cpp:772");
+                                      _("Set attribute"));
                     
                 } else if (spat->src.repr) {
                     
index 80099eb82718809fa03371e46b4f87555abe4310..378198f050532b169931b24926e14d6fe71ff264 100644 (file)
@@ -261,8 +261,8 @@ sp_stroke_style_paint_dragged(SPPaintSelector *psel, SPWidget *spw)
         case SP_PAINT_SELECTOR_MODE_COLOR_CMYK:
         {
             sp_paint_selector_set_flat_color (psel, SP_ACTIVE_DESKTOP, "stroke", "stroke-opacity");
-            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label, SP_VERB_NONE, 
-                                    /* TODO: annotate */ "stroke-style.cpp:265");
+            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label, SP_VERB_DIALOG_FILL_STROKE, 
+                                    _("Set stroke color"));
             break;
         }
 
@@ -308,7 +308,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
             sp_repr_css_attr_unref(css);
 
             sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
-                             /* TODO: annotate */ "stroke-style.cpp:311");
+                             _("Remove stroke"));
             break;
         }
 
@@ -317,7 +317,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
         {
             sp_paint_selector_set_flat_color (psel, desktop, "stroke", "stroke-opacity");
             sp_document_maybe_done (sp_desktop_document(desktop), undo_label, SP_VERB_DIALOG_FILL_STROKE, 
-                                    /* TODO: annotate */ "stroke-style.cpp:320");
+                                    _("Set stroke color"));
 
             // on release, toggle undo_label so that the next drag will not be lumped with this one
             if (undo_label == undo_label_1)
@@ -369,7 +369,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
                 }
 
                 sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
-                                 /* TODO: annotate */ "stroke-style.cpp:372");
+                                 _("Set gradient on stroke"));
             }
             break;
 
@@ -413,7 +413,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
                 } // end if
 
                 sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
-                                  /* TODO: annotate */ "stroke-style.cpp:416");
+                                  _("Set pattern on stroke"));
             } // end if
 
             break;
@@ -427,7 +427,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
                     sp_repr_css_attr_unref (css);
 
                     sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
-                                      /* TODO: annotate */ "stroke-style.cpp:430");
+                                      _("Unset stroke"));
             }
             break;
 
@@ -886,7 +886,7 @@ sp_marker_select(GtkOptionMenu *mnu, GtkWidget *spw)
     sp_repr_css_attr_unref(css);
 
     sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
-                     /* TODO: annotate */ "stroke-style.cpp:889");
+                     _("Set markers"));
 }
 
 static gboolean stroke_width_set_unit(SPUnitSelector *,
@@ -1459,7 +1459,7 @@ sp_stroke_style_scale_line(SPWidget *spw)
     sp_repr_css_attr_unref(css);
 
     sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
-                     /* TODO: annotate */ "stroke-style.cpp:1462");
+                     _("Set stroke style"));
 
     gtk_object_set_data(GTK_OBJECT(spw), "update", GINT_TO_POINTER(FALSE));
 }
@@ -1546,7 +1546,7 @@ sp_stroke_style_any_toggled(GtkToggleButton *tb, SPWidget *spw)
         sp_repr_css_attr_unref(css);
 
         sp_document_done(sp_desktop_document(desktop), SP_VERB_DIALOG_FILL_STROKE,
-                         /* TODO: annotate */ "stroke-style.cpp:1549");
+                         _("Set stroke style"));
     }
 }
 
index 1f5ae5c7cc526786ba641e0c91af66b81f86bdd1..e2933519320ee685448d6d1a802b4a0f4bbb0d29 100644 (file)
@@ -418,7 +418,7 @@ void ColorItem::_colorDefChanged(void* data)
 
                         if ( bruteForce( document, rroot, paletteName, item->def.getR(), item->def.getG(), item->def.getB() ) ) {
                             sp_document_done( document , SP_VERB_DIALOG_SWATCHES, 
-                                              /* TODO: annotate */ "swatches.cpp:421");
+                                              _("Change color definition"));
                         }
                     }
                 }
@@ -553,7 +553,7 @@ void ColorItem::buttonClicked(bool secondary)
 
         sp_repr_css_attr_unref(css);
         sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_SWATCHES, 
-                          /* TODO: annotate */ "swatches.cpp:556");
+                          secondary? _("Set stroke color from swatch") : _("Set fill color from swatch"));
     }
 }
 
index 8ea0a72368c288ea529ba546c35829e168faff0a..85237c7cb6cd681507d6236ec64b44e3e47830b0 100644 (file)
@@ -631,7 +631,7 @@ sp_text_edit_dialog_apply (GtkButton *button, GtkWidget *dlg)
 
     // complete the transaction
     sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
-                      /* TODO: annotate */ "text-edit.cpp:634");
+                      _("Set text style"));
     gtk_widget_set_sensitive (apply, FALSE);
     sp_repr_css_attr_unref (css);
     g_object_set_data (G_OBJECT (dlg), "blocked", GINT_TO_POINTER (FALSE));
index ed8e19a05349304d35e492c172fb3cda3471da28..693426d2d82f7b01a9c9e9cfc1c8e7e4e5c2601a 100644 (file)
@@ -326,8 +326,8 @@ g_print("\n row = %f     col = %f selection x= %f selection y = %f", total_row_h
     NRRect b;
             selection->bounds(&b);
 
-            sp_document_done (sp_desktop_document (desktop), SP_VERB_NONE, 
-                              /* TODO: annotate */ "tiledialog.cpp:330");
+            sp_document_done (sp_desktop_document (desktop), SP_VERB_SELECTION_GRIDTILE, 
+                              _("Arrange in a grid"));
 
 }
 
index e515a3f37440f3eb3d5cef0beaaff6e0873b57bd..b843819894f4b5cb578b514dce1cbe3c2fc2afc0 100644 (file)
@@ -885,7 +885,7 @@ void after_tree_move(GtkCTree *tree,
         GTK_CTREE_ROW(node)->sibling == new_sibling)
     {
         sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
-                         /* TODO: annotate */ "xml-tree.cpp:888");
+                         _("Drag XML subtree"));
     } else {
         sp_document_cancel(current_document);
     }
@@ -1371,6 +1371,9 @@ void cmd_new_element_node(GtkObject *object, gpointer data)
         selected_repr->appendChild(new_repr);
         set_tree_select(new_repr);
         set_dt_select(new_repr);
+
+        sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+                     _("Create new element node"));
     }
 
 } // end of cmd_new_element_node()
@@ -1385,7 +1388,7 @@ void cmd_new_text_node(GtkObject *object, gpointer data)
     selected_repr->appendChild(text);
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
-                     /* TODO: annotate */ "xml-tree.cpp:1388");
+                     _("Create new text node"));
 
     set_tree_select(text);
     set_dt_select(text);
@@ -1403,7 +1406,7 @@ void cmd_duplicate_node(GtkObject *object, gpointer data)
     parent->addChild(dup, selected_repr);
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
-                     /* TODO: annotate */ "xml-tree.cpp:1406");
+                     _("Duplicate node"));
 
     GtkCTreeNode *node = sp_xmlview_tree_get_repr_node(SP_XMLVIEW_TREE(tree), dup);
 
@@ -1420,7 +1423,7 @@ void cmd_delete_node(GtkObject *object, gpointer data)
     sp_repr_unparent(selected_repr);
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
-                     /* TODO: annotate */ "xml-tree.cpp:1423");
+                     _("Delete node"));
 }
 
 
@@ -1438,7 +1441,7 @@ void cmd_delete_attr(GtkObject *object, gpointer data)
     }
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
-                     /* TODO: annotate */ "xml-tree.cpp:1441");
+                     _("Delete attribute"));
 }
 
 
@@ -1471,7 +1474,7 @@ void cmd_set_attr(GtkObject *object, gpointer data)
     }
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
-                     /* TODO: annotate */ "xml-tree.cpp:1474");
+                     _("Change attribute"));
 
     /* TODO: actually, the row won't have been created yet.  why? */
     gint row = sp_xmlview_attr_list_find_row_from_key(GTK_CLIST(attributes),
@@ -1501,7 +1504,7 @@ void cmd_raise_node(GtkObject *object, gpointer data)
     parent->changeOrder(selected_repr, ref);
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
-                     /* TODO: annotate */ "xml-tree.cpp:1504");
+                     _("Raise node"));
 
     set_tree_select(selected_repr);
     set_dt_select(selected_repr);
@@ -1518,7 +1521,7 @@ void cmd_lower_node(GtkObject *object, gpointer data)
     parent->changeOrder(selected_repr, selected_repr->next());
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
-                     /* TODO: annotate */ "xml-tree.cpp:1521");
+                     _("Lower node"));
 
     set_tree_select(selected_repr);
     set_dt_select(selected_repr);
@@ -1548,7 +1551,7 @@ void cmd_indent_node(GtkObject *object, gpointer data)
     prev->addChild(repr, ref);
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
-                     /* TODO: annotate */ "xml-tree.cpp:1551");
+                     _("Indent node"));
     set_tree_select(repr);
     set_dt_select(repr);
 
@@ -1569,7 +1572,7 @@ void cmd_unindent_node(GtkObject *object, gpointer data)
     grandparent->addChild(repr, parent);
 
     sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
-                     /* TODO: annotate */ "xml-tree.cpp:1572");
+                     _("Unindent node"));
     set_tree_select(repr);
     set_dt_select(repr);
 
index cd6afac124f13425da5741c04f4e1198e802a295..d0034611f9ad04ec021a5cbb68b1dac3d8e7e766 100644 (file)
@@ -143,7 +143,7 @@ gr_item_activate (GtkMenuItem *menuitem, gpointer data)
     gr_apply_gradient (selection, ev? ev->get_drag() : NULL, gr);
 
     sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
-                      /* TODO: annotate */ "gradient-toolbar.cpp:146");
+                      _("Assign gradient to object"));
 }
 
 gchar *
@@ -416,7 +416,7 @@ gr_fork (GtkWidget *button, GtkWidget *widget)
             if (gr_new != gr) {
                 gr_apply_gradient (selection, ev? ev->get_drag() : NULL, gr_new);
                 sp_document_done (document, SP_VERB_CONTEXT_GRADIENT,
-                                  /* TODO: annotate */ "gradient-toolbar.cpp:419");
+                                  _("Duplicate gradient"));
             }
         }
     }
index f7f71e100627e67bfa393b3ab6cd425bc2d764d8..046aff2c2355752979a00c75e369f1081e589ed5 100644 (file)
@@ -358,6 +358,7 @@ sp_gvs_gradient_activate (GtkMenuItem *mi, SPGradientVectorSelector *gvs)
        if (norm != gr) {
                /* We do extra undo push here */
                /* If handler has already done it, it is just NOP */
+               // FIXME: looks like this is never a valid undo step, consider removing this
            sp_document_done (SP_OBJECT_DOCUMENT (norm), SP_VERB_CONTEXT_GRADIENT,
                              /* TODO: annotate */ "gradient-vector.cpp:350");
        }
@@ -655,7 +656,7 @@ offadjustmentChanged( GtkAdjustment *adjustment, GtkWidget *vb)
     sp_repr_set_css_double(SP_OBJECT_REPR(stop), "offset", stop->offset);
 
     sp_document_done (SP_OBJECT_DOCUMENT (stop), SP_VERB_CONTEXT_GRADIENT,
-                     /* TODO: annotate */ "gradient-vector.cpp:642");
+                                                       _("Change gradient stop offset"));
 
        blocked = FALSE;
 }
@@ -728,7 +729,7 @@ sp_grd_ed_add_stop (GtkWidget *widget,  GtkWidget *vb)
        gtk_widget_set_sensitive (offslide, TRUE);
        gtk_widget_set_sensitive (GTK_WIDGET (offspin), TRUE);
        sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT, 
-                         /* TODO: annotate */ "gradient-vector.cpp:715");
+                         _("Add gradient stop"));
 }
 
 static void
@@ -760,7 +761,7 @@ sp_grd_ed_del_stop (GtkWidget *widget,  GtkWidget *vb)
                sp_gradient_vector_widget_load_gradient (vb, gradient);
                update_stop_list(GTK_WIDGET(mnu), gradient, NULL);
                sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT, 
-                                 /* TODO: annotate */ "gradient-vector.cpp:747");
+                                 _("Delete gradient stop"));
        }
 
 }
@@ -1168,7 +1169,7 @@ sp_gradient_vector_color_changed (SPColorSelector *csel, GtkObject *object)
                //SP_OBJECT_REPR (stop)->setAttribute("style", c);
 
        sp_document_done (SP_OBJECT_DOCUMENT (ngr), SP_VERB_CONTEXT_GRADIENT,
-                         /* TODO: annotate */ "gradient-vector.cpp:1124");
+                         _("Change gradient stop color"));
 
        blocked = FALSE;
 }
index 3b732c90d1e69903263ecbe7801e4ceefc5a834e..66f4aebf4e77fd822908a38f6e0e8e3dd37ec5dd 100644 (file)
@@ -578,16 +578,16 @@ void LayerSelector::_prepareLabelRenderer(
 void LayerSelector::_lockLayer(bool lock) {
     if ( _layer && SP_IS_ITEM(_layer) ) {
         SP_ITEM(_layer)->setLocked(lock);
-        sp_document_maybe_done(sp_desktop_document(_desktop), "LayerSelector:lock", SP_VERB_NONE, 
-                               /* TODO: annotate */ "layer-selector.cpp:582");
+        sp_document_done(sp_desktop_document(_desktop), SP_VERB_NONE, 
+                         lock? _("Lock layer") : _("Unlock layer"));
     }
 }
 
 void LayerSelector::_hideLayer(bool hide) {
     if ( _layer && SP_IS_ITEM(_layer) ) {
         SP_ITEM(_layer)->setHidden(hide);
-        sp_document_maybe_done(sp_desktop_document(_desktop), "LayerSelector:hide", SP_VERB_NONE, 
-                               /* TODO: annotate */ "layer-selector.cpp:590");
+        sp_document_done(sp_desktop_document(_desktop), SP_VERB_NONE, 
+                         hide? _("Hide layer") : _("Unhide layer"));
     }
 }
 
index 2f42d590fd3e96ddd923ca0b37dfa475d7e9fb46..c1a92aa76f4c26556771ae8648887c54a4745e0c 100644 (file)
@@ -220,7 +220,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
 
         sp_selection_apply_affine(selection, scaler);
         sp_document_maybe_done (document, actionkey, SP_VERB_CONTEXT_SELECT, 
-                                /* TODO: annotate */ "select-toolbar.cpp:223");
+                                _("Transform by toolbar"));
 
         // defocus spinbuttons by moving focus to the canvas, unless "stay" is on
         spinbutton_defocus(GTK_OBJECT(spw));
index 7961a45117a05c9928e72e3a9fe2ab8147ef65a6..356c1384ed29ca5d3ddffcb045264a55c397ca84 100644 (file)
@@ -17,6 +17,7 @@
 #include "desktop-handles.h"
 #include "document-private.h"
 #include "inkscape.h"
+#include <glibmm/i18n.h>
 
 static void sp_xmlview_content_class_init (SPXMLViewContentClass * klass);
 static void sp_xmlview_content_init (SPXMLViewContent * text);
@@ -160,7 +161,7 @@ sp_xmlview_content_changed (GtkTextBuffer *tb, SPXMLViewContent *text)
                text->repr->setContent(data);
                g_free (data);
                text->blocked = FALSE;
-               sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_NONE
-                                 /* TODO: annotate */ "sp-xmlview-content.cpp:164");
+               sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_XML_EDITOR
+                                                                       _("Type text in a text node"));
        }
 }
index a4c5504186563b4817c78b1b2520fd59d6b7962d..1e4401f106d9bb364dafeaa88bb199aff09ce92c 100644 (file)
@@ -852,7 +852,7 @@ sp_stb_magnitude_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
         }
     }
     if (modmade)  sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
-                                   /* TODO: annotate */ "toolbox.cpp:854");
+                                   _("Star: Change number of corners"));
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -897,7 +897,7 @@ sp_stb_proportion_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
     }
 
     if (modmade) sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
-                                  /* TODO: annotate */ "toolbox.cpp:899");
+                                   _("Star: Change spike ratio"));
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -951,7 +951,7 @@ sp_stb_sides_flat_state_changed(GtkWidget *widget, GtkObject *tbl)
         }
     }
     if (modmade) sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
-                                  /* TODO: annotate */ "toolbox.cpp:953");
+                                  gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))? _("Make polygon") : _("Make star"));
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -988,7 +988,7 @@ sp_stb_rounded_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
         }
     }
     if (modmade)  sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
-                                   /* TODO: annotate */ "toolbox.cpp:990");
+                                   _("Star: Change rounding"));
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -1026,7 +1026,7 @@ sp_stb_randomized_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
         }
     }
     if (modmade)  sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
-                                   /* TODO: annotate */ "toolbox.cpp:1028");
+                                   _("Star: Change randomization"));
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -1366,7 +1366,7 @@ sp_rtb_value_changed(GtkAdjustment *adj, GtkWidget *tbl, gchar const *value_name
 
     if (modmade) {
         sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_RECT, 
-                         /* TODO: annotate */ "toolbox.cpp:1368");
+                                   _("Change rectangle"));
     }
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
@@ -1683,7 +1683,7 @@ sp_spl_tb_value_changed(GtkAdjustment *adj, GtkWidget *tbl, gchar const *value_n
 
     if (modmade) {
         sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SPIRAL, 
-                         /* TODO: annotate */ "toolbox.cpp:1685");
+                                   _("Change spiral"));
     }
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
@@ -2265,7 +2265,7 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GtkWidget *tbl, gchar const
 
     if (modmade) {
         sp_document_maybe_done(sp_desktop_document(desktop), value_name, SP_VERB_CONTEXT_ARC, 
-                               /* TODO: annotate */ "toolbox.cpp:2247");
+                                   _("Arc: Change start/end"));
     }
 
     // defocus spinbuttons by moving focus to the canvas, unless "stay" is on
@@ -2338,7 +2338,7 @@ sp_arctb_open_state_changed(GtkWidget *widget, GtkObject *tbl)
 
     if (modmade) {
         sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_ARC, 
-                         /* TODO: annotate */ "toolbox.cpp:2320");
+                                   _("Arc: Change open/closed"));
     }
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
@@ -3071,7 +3071,7 @@ sp_text_toolbox_family_changed (GtkTreeSelection    *selection,
     }
 
     sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
-                      /* TODO: annotate */ "toolbox.cpp:3024");
+                                   _("Text: Change font family"));
     sp_repr_css_attr_unref (css);
     free (family);
     gtk_widget_hide (GTK_WIDGET (g_object_get_data (G_OBJECT(tbl), "warning-image")));        
@@ -3154,7 +3154,7 @@ sp_text_toolbox_anchoring_toggled (GtkRadioButton   *button,
 
     sp_desktop_set_style (desktop, css, true, true);
     sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
-                      /* TODO: annotate */ "toolbox.cpp:3107");
+                                   _("Text: Change alignment"));
     sp_repr_css_attr_unref (css);
 
     gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
@@ -3200,7 +3200,7 @@ sp_text_toolbox_style_toggled (GtkToggleButton  *button,
 
     sp_desktop_set_style (desktop, css, true, true);
     sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
-                      /* TODO: annotate */ "toolbox.cpp:3153");
+                                   _("Text: Change font style"));
     sp_repr_css_attr_unref (css);
 
     gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
@@ -3247,7 +3247,7 @@ sp_text_toolbox_orientation_toggled (GtkRadioButton  *button,
 
     sp_desktop_set_style (desktop, css, true, true);
     sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
-                      /* TODO: annotate */ "toolbox.cpp:3200");
+                                   _("Text: Change orientation"));
     sp_repr_css_attr_unref (css);
 
     gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
@@ -3343,7 +3343,7 @@ sp_text_toolbox_size_changed  (GtkComboBox *cbox,
 
     sp_desktop_set_style (desktop, css, true, true);
     sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:size", SP_VERB_NONE, 
-                            /* TODO: annotate */ "toolbox.cpp:3296");
+                                   _("Text: Change font size"));
     sp_repr_css_attr_unref (css);
 
 
@@ -3909,7 +3909,7 @@ static void connector_spacing_changed(GtkAdjustment *adj, GtkWidget *tbl)
     }
     
     sp_document_done(doc, SP_VERB_CONTEXT_CONNECTOR, 
-            _("Change connector spacing distance"));
+            _("Change connector spacing"));
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
     
@@ -3928,7 +3928,7 @@ static void sp_connector_graph_layout(void)
 
     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 */ "toolbox.cpp:129");
+    sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, _("Arrange connector network"));
 }
 
 static void