[gnome-software/wip/attente/gapplication: 2/4] Revert "Only quit if we're not running as a GApplication service"
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/attente/gapplication: 2/4] Revert "Only quit if we're not running as a GApplication service"
- Date: Tue, 22 Mar 2016 18:17:40 +0000 (UTC)
commit 6134acbaca00ce7c2051bc811e911a42b089fe08
Author: William Hua <william hua canonical com>
Date: Tue Mar 22 13:56:08 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 244b89b..fb8a84b 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]