Code

Allow more than two options to choose from
authorcilix42 <cilix42@users.sourceforge.net>
Mon, 18 Aug 2008 00:35:43 +0000 (00:35 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Mon, 18 Aug 2008 00:35:43 +0000 (00:35 +0000)
src/widgets/toolbox.cpp

index c3c07fa8040688da0dc5cbeffaa56e072d711d59..8efea61ee7feb3f6b9c490114e1bf0a864082bee 100644 (file)
@@ -4786,7 +4786,8 @@ static void sp_dropper_toolbox_prep(SPDesktop */*desktop*/, GtkActionGroup* main
 static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl)
 {
     SPDesktop *desktop = (SPDesktop *) g_object_get_data(tbl, "desktop");
-    gint lpeToolMode = (ege_select_one_action_get_active(act) != 0) ? 1 : 0;
+
+    gint lpeToolMode = ege_select_one_action_get_active(act);
     if (sp_document_get_undo_sensitive(sp_desktop_document(desktop))) {
         prefs_set_int_attribute( "tools.lpetool", "mode", lpeToolMode );
     }
@@ -4922,7 +4923,7 @@ static void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActi
         ege_select_one_action_set_icon_column( act, 2 );
         ege_select_one_action_set_tooltip_column( act, 1  );
 
-        gint lpeToolMode = (prefs_get_int_attribute("tools.lpetool", "mode", 0) != 0) ? 1 : 0;
+        gint lpeToolMode = prefs_get_int_attribute("tools.lpetool", "mode", 0);
         ege_select_one_action_set_active( act, lpeToolMode );
         g_signal_connect_after( G_OBJECT(act), "changed", G_CALLBACK(sp_lpetool_mode_changed), holder );
     }