[gnome-control-center] privacy: Make popups work more than once



commit ca72a56c760dc2fd484747a693149cc8231a57e0
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 5 18:35:39 2012 -0500

    privacy: Make popups work more than once
    
    When closing the popups with Esc, the window gets a delete event.
    Since we want to keep the dialog around, we need to handle that
    by connecting the gtk_widget_hide_on_delete handler.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689747

 panels/privacy/cc-privacy-panel.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c
index 73bb8d3..cfab38f 100644
--- a/panels/privacy/cc-privacy-panel.c
+++ b/panels/privacy/cc-privacy-panel.c
@@ -273,6 +273,8 @@ add_screen_lock (CcPrivacyPanel *self)
   dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "screen_lock_dialog"));
   g_signal_connect_swapped (w, "clicked",
                             G_CALLBACK (gtk_widget_hide), dialog);
+  g_signal_connect (dialog, "delete-event",
+                    G_CALLBACK (gtk_widget_hide_on_delete), NULL);
 
   w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "automatic_screen_lock"));
   g_settings_bind (self->priv->lock_settings, "lock-enabled",
@@ -338,6 +340,8 @@ add_name_visibility (CcPrivacyPanel *self)
   dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "name_dialog"));
   g_signal_connect_swapped (w, "clicked",
                             G_CALLBACK (gtk_widget_hide), dialog);
+  g_signal_connect (dialog, "delete-event",
+                    G_CALLBACK (gtk_widget_hide_on_delete), NULL);
 
   w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "stealth_mode"));
   g_settings_bind (self->priv->privacy_settings, "hide-identity",
@@ -444,6 +448,8 @@ add_usage_history (CcPrivacyPanel *self)
   dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "recent_dialog"));
   g_signal_connect_swapped (w, "clicked",
                             G_CALLBACK (gtk_widget_hide), dialog);
+  g_signal_connect (dialog, "delete-event",
+                    G_CALLBACK (gtk_widget_hide_on_delete), NULL);
 
   w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "recently_used_switch"));
   g_settings_bind (self->priv->privacy_settings, REMEMBER_RECENT_FILES,
@@ -572,6 +578,8 @@ add_trash_temp (CcPrivacyPanel *self)
   dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "trash_dialog"));
   g_signal_connect_swapped (w, "clicked",
                             G_CALLBACK (gtk_widget_hide), dialog);
+  g_signal_connect (dialog, "delete-event",
+                    G_CALLBACK (gtk_widget_hide_on_delete), NULL);
 
   w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "purge_trash_switch"));
   g_settings_bind (self->priv->privacy_settings, REMOVE_OLD_TRASH_FILES,



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