[gtk+/gtk-2-24] filechooserbutton: Update the combo box even after the dialog is cancelled



commit 979e8bd9ec9599fd902fef8c531846c7fed72b01
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Mar 8 12:43:10 2013 -0600

    filechooserbutton: Update the combo box even after the dialog is cancelled
    
    We assumed that we didn't have to update the combo box if the dialog got cancelled,
    as it should simply retain its previous contents.  But this assumption doesn't work
    as the dialog is brought up with the 'Other...' item - we don't want the
    combo box to keep showing 'Other...' if the dialog is cancelled.
    
    The test from the previous commit now passes.
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 gtk/gtkfilechooserbutton.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index f998855..c02964b 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -2959,9 +2959,6 @@ dialog_response_cb (GtkDialog *dialog,
 
       g_signal_emit_by_name (button, "current-folder-changed");
       g_signal_emit_by_name (button, "selection-changed");
-
-      update_label_and_image (button);
-      update_combo_box (button);
     }
   else
     {
@@ -2979,6 +2976,9 @@ dialog_response_cb (GtkDialog *dialog,
       priv->active = FALSE;
     }
 
+  update_label_and_image (button);
+  update_combo_box (button);
+
   gtk_widget_set_sensitive (priv->combo_box, TRUE);
   gtk_widget_hide (priv->dialog);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]