[Xfce4-commits] <xfce4-settings:master> Set value after setting the range and digits.

Nick Schermer noreply at xfce.org
Mon Feb 8 17:30:01 CET 2010


Updating branch refs/heads/master
         to fbe04a00dda59a2922cbd9f41aba45adb3319515 (commit)
       from f712f6dbadec39b664b4dab6adc6c2a6526307e7 (commit)

commit fbe04a00dda59a2922cbd9f41aba45adb3319515
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Feb 8 17:28:32 2010 +0100

    Set value after setting the range and digits.
    
    This fixed a bug where the value was incorrect the first time
    the edit dialog was shown.

 xfce4-settings-editor/main_window.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xfce4-settings-editor/main_window.c b/xfce4-settings-editor/main_window.c
index bdd8fd3..e51aa4f 100644
--- a/xfce4-settings-editor/main_window.c
+++ b/xfce4-settings-editor/main_window.c
@@ -784,9 +784,9 @@ cb_property_edit_button_clicked (GtkButton *button, GtkBuilder *builder)
                 gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
                 gtk_widget_hide (GTK_WIDGET (prop_value_sw));
                 gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
-                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_int (&value));
                 gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), G_MININT, G_MAXINT);
                 gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
+                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_int (&value));
                 break;
             case G_TYPE_UINT:
                 gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_UINT);
@@ -794,9 +794,9 @@ cb_property_edit_button_clicked (GtkButton *button, GtkBuilder *builder)
                 gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
                 gtk_widget_hide (GTK_WIDGET (prop_value_sw));
                 gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
-                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_uint (&value));
-                gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), 0, G_MAXINT);
+                gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), 0, G_MAXUINT);
                 gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
+                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_uint (&value));
                 break;
             case G_TYPE_INT64:
                 gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_INT64);
@@ -804,9 +804,9 @@ cb_property_edit_button_clicked (GtkButton *button, GtkBuilder *builder)
                 gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
                 gtk_widget_hide (GTK_WIDGET (prop_value_sw));
                 gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
-                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_int64 (&value));
                 gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), G_MININT64, G_MAXINT64);
                 gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
+                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_int64 (&value));
                 break;
             case G_TYPE_UINT64:
                 gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_UINT64);
@@ -814,9 +814,9 @@ cb_property_edit_button_clicked (GtkButton *button, GtkBuilder *builder)
                 gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
                 gtk_widget_hide (GTK_WIDGET (prop_value_sw));
                 gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
-                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_uint64 (&value));
                 gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), 0, G_MAXUINT64);
                 gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
+                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_uint64 (&value));
                 break;
             case G_TYPE_DOUBLE:
                 gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_DOUBLE);
@@ -824,9 +824,9 @@ cb_property_edit_button_clicked (GtkButton *button, GtkBuilder *builder)
                 gtk_widget_hide (GTK_WIDGET (prop_value_text_entry));
                 gtk_widget_hide (GTK_WIDGET (prop_value_sw));
                 gtk_widget_hide (GTK_WIDGET (prop_value_checkbox));
-                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_double (&value));
                 gtk_spin_button_set_range (GTK_SPIN_BUTTON (prop_value_spin_button), G_MINDOUBLE, G_MAXDOUBLE);
                 gtk_spin_button_set_digits (GTK_SPIN_BUTTON (prop_value_spin_button), 2);
+                gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), g_value_get_double (&value));
                 break;
             case G_TYPE_BOOLEAN:
                 gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_BOOLEAN);



More information about the Xfce4-commits mailing list