summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-08-18 00:36:32 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-08-18 00:36:32 +0000
commit4e79a8fc72d0c06ed577e069cc966ca842cdba37 (patch)
treeed825b5dcab4b10f714b105acc6f5f2a4bfc927f /src
parentMake sp_lpetool_mode_changed() generic, i.e., read the activated subtool from... (diff)
downloadinkscape-4e79a8fc72d0c06ed577e069cc966ca842cdba37.tar.gz
inkscape-4e79a8fc72d0c06ed577e069cc966ca842cdba37.zip
Make number of subtools configurable
(bzr r6652)
Diffstat (limited to 'src')
-rw-r--r--src/widgets/toolbox.cpp19
1 files 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) );