[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 170/331] Revert "Only quit if we're not running as a GApplication service"



commit 6a8c9719343926757a9a82bc09ac43dd19d32ef8
Author: William Hua <william hua canonical com>
Date:   Thu Mar 24 09:50:05 2016 -0400

    Revert "Only quit if we're not running as a GApplication service"
    
    This reverts commit c66c12e634c1c807bbcbb287a2b36e91009068a7.

 src/gs-shell.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 3be3a15..c6528e5 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -623,13 +623,6 @@ main_window_closed_cb (GtkWidget *dialog, GdkEvent *event, gpointer user_data)
        return TRUE;
 }
 
-static void
-main_window_destroyed_cb (GtkWidget *widget,
-                         GsShell   *shell)
-{
-       g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()), "quit", NULL);
-}
-
 /**
  * gs_shell_updates_changed_cb:
  */
@@ -705,7 +698,6 @@ void
 gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *cancellable)
 {
        GsShellPrivate *priv = gs_shell_get_instance_private (shell);
-       GApplicationFlags flags;
        GtkWidget *widget;
 
        g_return_if_fail (GS_IS_SHELL (shell));
@@ -727,15 +719,8 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
        gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
                                           GS_DATA G_DIR_SEPARATOR_S "icons");
 
-       flags = g_application_get_flags (g_application_get_default ());
-
-       if (flags & G_APPLICATION_IS_SERVICE) {
-               g_signal_connect (priv->main_window, "delete-event",
-                                 G_CALLBACK (main_window_closed_cb), shell);
-       } else {
-               g_signal_connect (priv->main_window, "destroy",
-                                 G_CALLBACK (main_window_destroyed_cb), shell);
-       }
+       g_signal_connect (priv->main_window, "delete-event",
+                         G_CALLBACK (main_window_closed_cb), shell);
 
        /* fix up the header bar */
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "header"));


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