[gnome-software/wip/ubuntu-changes] Stop abusing GApplication



commit cd84bba90b61944f55e1edcda64da52d8963af59
Author: Allison Ryan Lortie <desrt desrt ca>
Date:   Mon Mar 21 14:28:23 2016 -0400

    Stop abusing GApplication

 src/gs-application.c |   16 ----------------
 src/gs-shell.c       |   22 ----------------------
 2 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index fa24d56..5a3578e 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -432,22 +432,6 @@ quit_activated (GSimpleAction *action,
                GVariant      *parameter,
                gpointer       app)
 {
-       GApplicationFlags flags;
-       GList *windows;
-       GtkWidget *window;
-
-       flags = g_application_get_flags (app);
-
-       if (flags & G_APPLICATION_IS_SERVICE) {
-               windows = gtk_application_get_windows (GTK_APPLICATION (app));
-               if (windows) {
-                       window = windows->data;
-                       gtk_widget_hide (window);
-               }
-
-               return;
-       }
-
        g_application_quit (G_APPLICATION (app));
 }
 
diff --git a/src/gs-shell.c b/src/gs-shell.c
index fb8a84b..66bbe38 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -604,25 +604,6 @@ window_button_press_event (GtkWidget *win, GdkEventButton *event, GsShell *shell
        return GDK_EVENT_STOP;
 }
 
-static gboolean
-main_window_closed_cb (GtkWidget *dialog, GdkEvent *event, gpointer user_data)
-{
-       GsShell *shell = user_data;
-       GsShellPrivate *priv = gs_shell_get_instance_private (shell);
-       BackEntry *entry;
-
-       /* When the window is closed, reset the initial mode to overview */
-       priv->mode = GS_SHELL_MODE_OVERVIEW;
-
-       /* ... and clear any remaining entries in the back button stack */
-       while ((entry = g_queue_pop_head (priv->back_entry_stack)) != NULL) {
-               free_back_entry (entry);
-       }
-
-       gtk_widget_hide (dialog);
-       return TRUE;
-}
-
 /**
  * gs_shell_updates_changed_cb:
  */
@@ -719,9 +700,6 @@ 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");
 
-       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"));
        if (in_desktop ("Unity")) {


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