[gnome-software] Hide the window on close



commit b4738beea5e747aa5bf753cd238ab7e4a30ea4ea
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 17 22:24:35 2013 -0400

    Hide the window on close
    
    With the way things are currently set up, we only create a single
    window, so we have to keep it around if we want to repeatedly
    show and hide it from an always-running service.

 src/gs-shell.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index e7deafb..f1b436a 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -444,6 +444,9 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
        /* fix up the header bar */
        main_window = GTK_WIDGET (gtk_builder_get_object (priv->builder, "window_software"));
 
+       g_signal_connect (main_window, "delete-event",
+                         G_CALLBACK (gtk_widget_hide_on_delete), NULL);
+
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "header"));
        g_object_ref (widget);
        gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (widget)), widget);


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