summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b26ef4a)
raw | patch | inline | side by side (parent: b26ef4a)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 6 Jul 2006 01:27:08 +0000 (01:27 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 6 Jul 2006 01:27:08 +0000 (01:27 +0000) |
src/node-context.cpp | patch | blob | history | |
src/nodepath.cpp | patch | blob | history | |
src/nodepath.h | patch | blob | history | |
src/selection-chemistry.cpp | patch | blob | history |
diff --git a/src/node-context.cpp b/src/node-context.cpp
index c689f9244f23cce75e0f2a7b3bdbf01b0fd58531..f38985c7106d8826f8ebaf9b81af7586dc59b356 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
NR::Maybe<NR::Rect> b = Inkscape::Rubberband::get()->getRectangle();
if (nc->hit && !event_context->within_tolerance) { //drag curve
- sp_nodepath_update_repr (nc->nodepath);
+ sp_nodepath_update_repr (nc->nodepath, _("Drag curve"));
} else if (b != NR::Nothing() && !event_context->within_tolerance) { // drag to select
if (nc->nodepath) {
sp_nodepath_select_rect(nc->nodepath, b.assume(), event->button.state & GDK_SHIFT_MASK);
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 455a0e7d8c67c2468148f847381592c9c6131993..3019b492e36e1a525471aab824efcbb5344d73ce 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
/**
* Update XML path node with data from path object, commit changes forever.
*/
-void sp_nodepath_update_repr(Inkscape::NodePath::Path *np)
+void sp_nodepath_update_repr(Inkscape::NodePath::Path *np, const gchar *annotation)
{
update_repr_internal(np);
sp_document_done(sp_desktop_document(np->desktop), SP_VERB_CONTEXT_NODE,
- /* TODO: annotate */ "nodepath.cpp:484");
+ annotation);
if (np->livarot_path) {
delete np->livarot_path;
/**
* Update XML path node with data from path object, commit changes with undo.
*/
-static void sp_nodepath_update_repr_keyed(Inkscape::NodePath::Path *np, gchar const *key)
+static void sp_nodepath_update_repr_keyed(Inkscape::NodePath::Path *np, gchar const *key, const gchar *annotation)
{
update_repr_internal(np);
sp_document_maybe_done(sp_desktop_document(np->desktop), key, SP_VERB_CONTEXT_NODE,
- /* TODO: annotate */ "nodepath.cpp:505");
+ annotation);
if (np->livarot_path) {
delete np->livarot_path;
new_repr->setPosition(pos > 0 ? pos : 0);
sp_document_done(sp_desktop_document(np->desktop), SP_VERB_CONTEXT_NODE,
- /* TODO: annotate */ "nodepath.cpp:548");
+ _("Stamp"));
Inkscape::GC::release(new_repr);
g_free(svgpath);
sp_nodepath_selected_nodes_move(nodepath, dx, dy, false);
if (dx == 0) {
- sp_nodepath_update_repr_keyed(nodepath, "node:move:vertical");
+ sp_nodepath_update_repr_keyed(nodepath, "node:move:vertical", _("Move nodes vertically"));
} else if (dy == 0) {
- sp_nodepath_update_repr_keyed(nodepath, "node:move:horizontal");
+ sp_nodepath_update_repr_keyed(nodepath, "node:move:horizontal", _("Move nodes horizontally"));
} else {
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Move nodes"));
}
}
sp_nodepath_selected_nodes_move(nodepath, zdx, zdy, false);
if (dx == 0) {
- sp_nodepath_update_repr_keyed(nodepath, "node:move:vertical");
+ sp_nodepath_update_repr_keyed(nodepath, "node:move:vertical", _("Move nodes vertically"));
} else if (dy == 0) {
- sp_nodepath_update_repr_keyed(nodepath, "node:move:horizontal");
+ sp_nodepath_update_repr_keyed(nodepath, "node:move:horizontal", _("Move nodes horizontally"));
} else {
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Move nodes"));
}
}
@@ -1427,7 +1427,7 @@ void sp_nodepath_selected_align(Inkscape::NodePath::Path *nodepath, NR::Dim2 axi
}
}
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Align nodes"));
}
/// Helper struct.
@@ -1489,7 +1489,7 @@ void sp_nodepath_selected_distribute(Inkscape::NodePath::Path *nodepath, NR::Dim
pos += step;
}
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Distribute nodes"));
}
GList *nl = NULL;
+ int n_added = 0;
+
for (GList *l = nodepath->selected; l != NULL; l = l->next) {
Inkscape::NodePath::Node *t = (Inkscape::NodePath::Node *) l->data;
g_assert(t->selected);
while (nl) {
Inkscape::NodePath::Node *t = (Inkscape::NodePath::Node *) nl->data;
Inkscape::NodePath::Node *n = sp_nodepath_line_add_node(t, 0.5);
- sp_nodepath_node_select(n, TRUE, FALSE);
- nl = g_list_remove(nl, t);
+ sp_nodepath_node_select(n, TRUE, FALSE);
+ n_added ++;
+ nl = g_list_remove(nl, t);
}
/** \todo fixme: adjust ? */
sp_nodepath_update_handles(nodepath);
- sp_nodepath_update_repr(nodepath);
+ if (n_added > 1) {
+ sp_nodepath_update_repr(nodepath, _("Add nodes"));
+ } else if (n_added > 0) {
+ sp_nodepath_update_repr(nodepath, _("Add node"));
+ }
sp_nodepath_update_statusbar(nodepath);
}
@@ -1582,7 +1589,7 @@ sp_nodepath_add_node_near_point(Inkscape::NodePath::Path *nodepath, NR::Point p)
/* fixme: adjust ? */
sp_nodepath_update_handles(nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Add node"));
sp_nodepath_update_statusbar(nodepath);
}
sp_nodepath_update_handles(nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Break path"));
}
/**
sp_nodepath_update_handles(nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Duplicate node"));
}
/**
sp_node_moveto (sp->first, c);
sp_nodepath_update_handles(sp->nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Close subpath"));
return;
}
sp_nodepath_update_handles(sa->nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Join nodes"));
sp_nodepath_update_statusbar(nodepath);
}
sp_nodepath_update_handles(sp->nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Close subpath by segment"));
return;
}
sp_nodepath_update_handles(sa->nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Join nodes by segment"));
}
/**
//does not matter)
sp_selection_delete();
sp_document_done (document, SP_VERB_CONTEXT_NODE,
- /* TODO: annotate */ "nodepath.cpp:2011");
+ _("Delete nodes"));
} else {
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Delete nodes preserving shape"));
sp_nodepath_update_statusbar(nodepath);
}
}
SPDocument *document = sp_desktop_document (nodepath->desktop);
sp_selection_delete();
sp_document_done (document, SP_VERB_CONTEXT_NODE,
- /* TODO: annotate */ "nodepath.cpp:2048");
+ _("Delete nodes"));
return;
}
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Delete nodes"));
sp_nodepath_update_statusbar(nodepath);
}
sp_nodepath_update_handles(nodepath);
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Delete segment"));
sp_nodepath_update_statusbar(nodepath);
}
}
}
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Change segment type"));
}
/**
sp_nodepath_convert_node_type((Inkscape::NodePath::Node *) l->data, type);
}
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Change node type"));
}
/**
case GDK_BackSpace:
np = active_node->subpath->nodepath;
sp_nodepath_node_destroy(active_node);
- sp_nodepath_update_repr(np);
+ sp_nodepath_update_repr(np, _("Delete node"));
active_node = NULL;
ret = TRUE;
break;
} else {
sp_nodepath_convert_node_type (n,Inkscape::NodePath::NODE_CUSP);
}
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Change node type"));
sp_nodepath_update_statusbar(nodepath);
} else { //ctrl+alt+click: delete node
n->dragging_out = NULL;
- sp_nodepath_update_repr(n->subpath->nodepath);
+ sp_nodepath_update_repr(n->subpath->nodepath, _("Move nodes"));
}
/**
}
sp_node_update_handles(n);
Inkscape::NodePath::Path *nodepath = n->subpath->nodepath;
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Retract handle"));
sp_nodepath_update_statusbar(nodepath);
} else { // just select or add to selection, depending in Shift
g_assert_not_reached();
}
- sp_nodepath_update_repr(n->subpath->nodepath);
+ sp_nodepath_update_repr(n->subpath->nodepath, _("Move node handle"));
}
/**
@@ -3570,7 +3577,7 @@ void sp_nodepath_selected_nodes_rotate(Inkscape::NodePath::Path *nodepath, gdoub
}
}
- sp_nodepath_update_repr_keyed(nodepath, angle > 0 ? "nodes:rot:p" : "nodes:rot:n");
+ sp_nodepath_update_repr_keyed(nodepath, angle > 0 ? "nodes:rot:p" : "nodes:rot:n", _("Rotate nodes"));
}
/**
@@ -3695,7 +3702,7 @@ void sp_nodepath_selected_nodes_scale(Inkscape::NodePath::Path *nodepath, gdoubl
}
}
- sp_nodepath_update_repr_keyed(nodepath, grow > 0 ? "nodes:scale:p" : "nodes:scale:n");
+ sp_nodepath_update_repr_keyed(nodepath, grow > 0 ? "nodes:scale:p" : "nodes:scale:n", _("Scale nodes"));
}
void sp_nodepath_selected_nodes_scale_screen(Inkscape::NodePath::Path *nodepath, gdouble const grow, int const which)
}
}
- sp_nodepath_update_repr(nodepath);
+ sp_nodepath_update_repr(nodepath, _("Flip nodes"));
}
//-----------------------------------------------
diff --git a/src/nodepath.h b/src/nodepath.h
index 10e241b6ad2546eeb684a8df259240a2df46770e..21c2957aa92f3d36a057446b88b760ed63cc72d3 100644 (file)
--- a/src/nodepath.h
+++ b/src/nodepath.h
gboolean nodepath_repr_d_changed (Inkscape::NodePath::Path * np, const char *newd);
gboolean nodepath_repr_typestr_changed (Inkscape::NodePath::Path * np, const char *newtypestr);
gboolean node_key (GdkEvent * event);
-void sp_nodepath_update_repr(Inkscape::NodePath::Path *np);
+void sp_nodepath_update_repr(Inkscape::NodePath::Path *np, const gchar *annotation);
void sp_nodepath_update_statusbar (Inkscape::NodePath::Path *nodepath);
void sp_nodepath_selected_align(Inkscape::NodePath::Path *nodepath, NR::Dim2 axis);
void sp_nodepath_selected_distribute(Inkscape::NodePath::Path *nodepath, NR::Dim2 axis);
index c26efb71da7860775fa26bb728de28d82b5e1bc8..626199cda534a7b0254b2fe018845d723517f887 100644 (file)
if (dx == 0) {
sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:vertical", SP_VERB_CONTEXT_SELECT,
- _("Nudge vertically"));
+ _("Move vertically"));
} else if (dy == 0) {
sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:horizontal", SP_VERB_CONTEXT_SELECT,
- _("Nudge horizontally"));
+ _("Move horizontally"));
} else {
sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SELECT,
_("Move"));