summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-05-16 02:39:05 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-05-16 02:39:05 +0000
commit2c4a12df266ae54394936a5d22e8ad3e0317ae02 (patch)
tree27f03878bbb0e3333de3beeb7f503de5d3412bca /src/widgets/toolbox.cpp
parentAdd Pedro to the excludes, at least until after the release (diff)
downloadinkscape-2c4a12df266ae54394936a5d22e8ad3e0317ae02.tar.gz
inkscape-2c4a12df266ae54394936a5d22e8ad3e0317ae02.zip
show handles toggle
(bzr r850)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 27cc68e25..3d6434bf2 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -376,7 +376,11 @@ sp_node_path_edit_symmetrical(void)
sp_node_selected_set_type(Inkscape::NodePath::NODE_SYMM);
}
-
+static void toggle_show_handles (GtkWidget *button, gpointer data) {
+ bool show = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ prefs_set_int_attribute ("tools.nodes", "show_handles", show ? 1 : 0);
+ sp_nodepath_show_handles(show);
+}
//################################
//## Node Editing Toolbox ##
@@ -435,6 +439,26 @@ sp_node_toolbox_new(SPDesktop *desktop)
sp_toolbox_button_normal_new_from_verb(tb, Inkscape::ICON_SIZE_SMALL_TOOLBAR, Inkscape::Verb::get(SP_VERB_SELECTION_OUTLINE), view, tt);
+ aux_toolbox_space(tb, AUX_BETWEEN_BUTTON_GROUPS);
+
+ GtkWidget *cvbox = gtk_vbox_new (FALSE, 0);
+ GtkWidget *cbox = gtk_hbox_new (FALSE, 0);
+
+ {
+ GtkWidget *button = sp_button_new_from_data( Inkscape::ICON_SIZE_DECORATION,
+ SP_BUTTON_TYPE_TOGGLE,
+ NULL,
+ "nodes_show_handles",
+ _("Show the Bezier handles of selected nodes"),
+ tt);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), prefs_get_int_attribute ("tools.nodes", "show_handles", 1));
+ g_signal_connect_after (G_OBJECT (button), "clicked", G_CALLBACK (toggle_show_handles), desktop);
+ gtk_box_pack_start(GTK_BOX(cbox), button, FALSE, FALSE, 0);
+ }
+
+ gtk_box_pack_start(GTK_BOX(cvbox), cbox, TRUE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(tb), cvbox, FALSE, FALSE, 0);
+
gtk_widget_show_all(tb);
return tb;