[Xfce4-commits] <xfce4-settings:master> Reset the fields of the edit dialog when creating a property.

Jérôme Guelfucci noreply at xfce.org
Tue Jan 19 19:34:28 CET 2010


Updating branch refs/heads/master
         to 87ab44c89446121d45710355e93a97691db190bc (commit)
       from 06f1718754a0e288b9b1427540437128b205b3c5 (commit)

commit 87ab44c89446121d45710355e93a97691db190bc
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Mon Jan 11 13:11:25 2010 +0100

    Reset the fields of the edit dialog when creating a property.
    
    This caused the dialog to show the values of the previously created or
    edited property.

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

diff --git a/xfce4-settings-editor/main_window.c b/xfce4-settings-editor/main_window.c
index d417c32..65352ad 100644
--- a/xfce4-settings-editor/main_window.c
+++ b/xfce4-settings-editor/main_window.c
@@ -684,6 +684,12 @@ cb_property_new_button_clicked (GtkButton *button, GtkBuilder *builder)
     gtk_combo_box_set_active (GTK_COMBO_BOX (prop_type_combo), PROP_TYPE_STRING);
     gtk_widget_set_sensitive (GTK_WIDGET (prop_type_combo), TRUE);
 
+    /* Reset all the value fields */
+    gtk_entry_set_text (GTK_ENTRY (prop_name_entry), "");
+    gtk_entry_set_text (GTK_ENTRY (prop_value_text_entry), "");
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (prop_value_spin_button), 0);
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prop_value_checkbox), TRUE);
+
     if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_APPLY)
     {
         const gchar *prop_name = gtk_entry_get_text (GTK_ENTRY (prop_name_entry));



More information about the Xfce4-commits mailing list