From: buliabyak Date: Tue, 10 Oct 2006 07:41:49 +0000 (+0000) Subject: undo annotations X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef9d155a8149d4793471047b3836db719b9e0292;p=inkscape.git undo annotations --- diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index 7f8c65b09..324a3d94b 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -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 * diff --git a/src/dialogs/fill-style.cpp b/src/dialogs/fill-style.cpp index 1bdc49f7e..22c1ee0f7 100644 --- a/src/dialogs/fill-style.cpp +++ b/src/dialogs/fill-style.cpp @@ -34,6 +34,7 @@ #include #include #include +#include // 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; diff --git a/src/dialogs/guidelinedialog.cpp b/src/dialogs/guidelinedialog.cpp index 479cab8ec..8aee8a3e4 100644 --- a/src/dialogs/guidelinedialog.cpp +++ b/src/dialogs/guidelinedialog.cpp @@ -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) diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 6f12a48f1..3bb7f7d84 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -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)); diff --git a/src/dialogs/layer-properties.cpp b/src/dialogs/layer-properties.cpp index e35cc9550..bd95fbc71 100644 --- a/src/dialogs/layer-properties.cpp +++ b/src/dialogs/layer-properties.cpp @@ -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")); } diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp index 3a7463ff3..694277805 100644 --- a/src/dialogs/layers-panel.cpp +++ b/src/dialogs/layers-panel.cpp @@ -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(); } diff --git a/src/dialogs/object-properties.cpp b/src/dialogs/object-properties.cpp index 32c1d4f76..5fe3d58f8 100644 --- a/src/dialogs/object-properties.cpp +++ b/src/dialogs/object-properties.cpp @@ -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)); } diff --git a/src/dialogs/sp-attribute-widget.cpp b/src/dialogs/sp-attribute-widget.cpp index d0391a2ec..9bc40e86c 100644 --- a/src/dialogs/sp-attribute-widget.cpp +++ b/src/dialogs/sp-attribute-widget.cpp @@ -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) { diff --git a/src/dialogs/stroke-style.cpp b/src/dialogs/stroke-style.cpp index 80099eb82..378198f05 100644 --- a/src/dialogs/stroke-style.cpp +++ b/src/dialogs/stroke-style.cpp @@ -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")); } } diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index 1f5ae5c7c..e29335193 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -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")); } } diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index 8ea0a7236..85237c7cb 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -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)); diff --git a/src/dialogs/tiledialog.cpp b/src/dialogs/tiledialog.cpp index ed8e19a05..693426d2d 100644 --- a/src/dialogs/tiledialog.cpp +++ b/src/dialogs/tiledialog.cpp @@ -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")); } diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index e515a3f37..b84381989 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -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); diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index cd6afac12..d0034611f 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -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")); } } } diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index f7f71e100..046aff2c2 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -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; } diff --git a/src/widgets/layer-selector.cpp b/src/widgets/layer-selector.cpp index 3b732c90d..66f4aebf4 100644 --- a/src/widgets/layer-selector.cpp +++ b/src/widgets/layer-selector.cpp @@ -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")); } } diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 2f42d590f..c1a92aa76 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -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)); diff --git a/src/widgets/sp-xmlview-content.cpp b/src/widgets/sp-xmlview-content.cpp index 7961a4511..356c1384e 100644 --- a/src/widgets/sp-xmlview-content.cpp +++ b/src/widgets/sp-xmlview-content.cpp @@ -17,6 +17,7 @@ #include "desktop-handles.h" #include "document-private.h" #include "inkscape.h" +#include 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")); } } diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index a4c550418..1e4401f10 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -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