From d32d6b0c1cfbe47148a77af8cafbc01444f410ea Mon Sep 17 00:00:00 2001 From: cilix42 Date: Mon, 18 Aug 2008 00:36:32 +0000 Subject: [PATCH] Make number of subtools configurable --- src/widgets/toolbox.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 84a4f68e6..0ec8d9be1 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -4784,10 +4784,13 @@ static void sp_dropper_toolbox_prep(SPDesktop */*desktop*/, GtkActionGroup* main //######################## /* This is the list of subtools from which the toolbar of the LPETool is built automatically */ +static const int num_subtools = 4; + static Inkscape::LivePathEffect::EffectType lpesubtools[] = { Inkscape::LivePathEffect::ANGLE_BISECTOR, Inkscape::LivePathEffect::CIRCLE_3PTS, - Inkscape::LivePathEffect::PERP_BISECTOR + Inkscape::LivePathEffect::PERP_BISECTOR, + Inkscape::LivePathEffect::CIRCLE_3PTS, }; static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl) @@ -4884,14 +4887,14 @@ static void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActi GtkTreeIter iter; Inkscape::LivePathEffect::EffectType type; - for (int i = 0; i < 3; ++i) { + for (int i = 0; i < num_subtools; ++i) { type = lpesubtools[i]; - gtk_list_store_append( model, &iter ); - gtk_list_store_set( model, &iter, - 0, Inkscape::LivePathEffect::LPETypeConverter.get_label(type).c_str(), - 1, Inkscape::LivePathEffect::LPETypeConverter.get_label(type).c_str(), - 2, Inkscape::LivePathEffect::LPETypeConverter.get_key(type).c_str(), - -1 ); + gtk_list_store_append( model, &iter ); + gtk_list_store_set( model, &iter, + 0, Inkscape::LivePathEffect::LPETypeConverter.get_label(type).c_str(), + 1, Inkscape::LivePathEffect::LPETypeConverter.get_label(type).c_str(), + 2, Inkscape::LivePathEffect::LPETypeConverter.get_key(type).c_str(), + -1 ); } EgeSelectOneAction* act = ege_select_one_action_new( "LPEToolModeAction", (""), (""), NULL, GTK_TREE_MODEL(model) ); -- 2.30.2