[gnome-control-center] info: handle dialog closing consistently



commit c5157bb545eb9e650b28bc3c1353c94970c6ffec
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 5 14:01:44 2012 +0000

    info: handle dialog closing consistently
    
    The 'Other media' dialog is just hidden when the close button is
    clicked (so that it can be shown again), but when closing it with
    the Escape key, it gets destroyed and an attempt to bring it up
    again just shows a sad empty little square.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659948

 panels/info/cc-info-panel.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index a1b2bd6..46b2330 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -1293,6 +1293,10 @@ on_extra_options_button_clicked (GtkWidget    *button,
                     "response",
                     G_CALLBACK (on_extra_options_dialog_response),
                     self);
+  g_signal_connect (dialog,
+                    "delete-event",
+                    G_CALLBACK (gtk_widget_hide_on_delete),
+                    NULL);
   /* update other_application_combo */
   other_type_combo_box_changed (GTK_COMBO_BOX (combo_box), self);
   gtk_window_present (GTK_WINDOW (dialog));



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