From a05082aeddca5e9547d98f7e2ed6e606110c874f Mon Sep 17 00:00:00 2001 From: johanengelen Date: Wed, 5 Dec 2007 16:05:02 +0000 Subject: [PATCH] Add icon for "Edit next LPE parameter" and add it to toolbar of nodetool. --- share/icons/icons.svg | 114 +++++++++++++++++++++++++++++++++------- src/verbs.cpp | 2 +- src/widgets/toolbox.cpp | 18 +++++++ 3 files changed, 114 insertions(+), 20 deletions(-) diff --git a/share/icons/icons.svg b/share/icons/icons.svg index 92078c24b..a528a82a0 100644 --- a/share/icons/icons.svg +++ b/share/icons/icons.svg @@ -8,7 +8,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - inkscape:version="0.45+devel" + inkscape:version="0.46dev+devel" sodipodi:docname="icons.svg" height="1000.0000pt" width="1000.0000pt" @@ -17,6 +17,13 @@ inkscape:output_extension="org.inkscape.output.svg.inkscape"> + @@ -4450,16 +4457,21 @@ y1="508.15683" x2="373.99606" y2="481.67661" /> - - - - + + + + - + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 8.3599997,47.759998 C 7.7515743,47.515279 7.222277,46.901819 6.7843235,46.39273 C 5.6082715,45.025655 4.9648259,43.302806 4.3800001,41.630001 C 3.4463938,38.959561 2.6271155,36.199224 2.1141648,33.410416 C 1.4157915,29.613502 0.61298459,25.784236 0.39598041,21.942782 C 0.20936341,18.639248 -0.036735009,15.098988 0.67000002,11.99 C 1.0212715,10.444727 2.3352289,8.406245 3.5699999,7.98 C 4.6660199,7.6016521 6.4569453,8.7469868 7.6985305,9.5047548 C 9.5843038,10.655686 11.337786,12.013685 12.995799,13.4917 C 17.541311,17.54374 21.813011,21.891764 26.139096,26.173982 C 29.192346,29.196273 32.227767,32.236821 35.27,35.27 C 26.3,39.433333 17.33,43.596666 8.3599997,47.759998 z " + id="path2430" + sodipodi:nodetypes="cssssssssscc" /> + + objecttolerance="11"> + + @@ -13348,8 +13369,16 @@ http://www.inkscape.org/ id="color_management" inkscape:label="#color_management" transform="translate(190,344) scale(0.33)"> - - + + @@ -15843,4 +15872,51 @@ HMfpXQMffuRJXok8jsipdCSfv+XLrWvB7u+oLhrHsQRBJO+82ZKP3/Xk1nLQm+++W61W78ft83+d id="rect4581" style="opacity:1;fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.5999999;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + + + + + + + + diff --git a/src/verbs.cpp b/src/verbs.cpp index ee85380a9..770550dfd 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2212,7 +2212,7 @@ Verb *Verb::_base_verbs[] = { new EditVerb(SP_VERB_EDIT_DESELECT, "EditDeselect", N_("D_eselect"), N_("Deselect any selected objects or nodes"), "selection_deselect"), new EditVerb(SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER, "EditNextPathEffectParameter", N_("Next Path Effect Parameter"), - N_("Show next Path Effect parameter for editing"), NULL), + N_("Show next Path Effect parameter for editing"), "edit_next_parameter"), /* Selection */ new SelectionVerb(SP_VERB_SELECTION_TO_FRONT, "SelectionToFront", N_("Raise to _Top"), diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index a4d24203f..43124a79e 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -72,6 +72,7 @@ #include "sp-flowtext.h" #include "style.h" #include "selection.h" +#include "selection-chemistry.h" #include "document-private.h" #include "desktop-style.h" #include "../libnrtype/font-lister.h" @@ -243,6 +244,8 @@ static gchar const * ui_descr = " " " " " " + " " + " " " " " " " " @@ -844,6 +847,11 @@ static void toggle_show_handles (GtkToggleAction *act, gpointer /*data*/) { if (shape_editor) shape_editor->show_handles(show); } +void +sp_node_path_edit_nextLPEparam (GtkAction *act, gpointer data) { + sp_selection_next_patheffect_param( reinterpret_cast(data) ); +} + /* is called when the node selection is modified */ static void sp_node_toolbox_coord_changed(gpointer /*shape_editor*/, GObject *tbl) @@ -1067,6 +1075,16 @@ static void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), prefs_get_int_attribute( "tools.nodes", "show_handles", 1 ) ); } + { + InkAction* inky = ink_action_new( "EditNextLPEParameterAction", + _("Next Path Effect Parameter"), + _("Show next Path Effect parameter for editing"), + "edit_next_parameter", + Inkscape::ICON_SIZE_DECORATION ); + g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_node_path_edit_nextLPEparam), desktop ); + gtk_action_group_add_action( mainActions, GTK_ACTION(inky) ); + } + /* X coord of selected node(s) */ { EgeAdjustmentAction* eact = 0; -- 2.30.2