[goobox] use goo_window_close to close the window



commit 99cd74b468b468a8f67fa6bbb34cf22f517d1571
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Dec 25 18:53:04 2013 +0100

    use goo_window_close to close the window

 src/goo-application-actions-callbacks.c |    6 +++++-
 src/goo-window.c                        |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/goo-application-actions-callbacks.c b/src/goo-application-actions-callbacks.c
index 0059e18..84a232d 100644
--- a/src/goo-application-actions-callbacks.c
+++ b/src/goo-application-actions-callbacks.c
@@ -123,7 +123,11 @@ goo_application_activate_quit (GSimpleAction *action,
                               GVariant      *parameter,
                               gpointer       user_data)
 {
-       g_application_quit (G_APPLICATION (user_data));
+       GApplication *application = user_data;
+       GList        *windows;
+
+       while ((windows = gtk_application_get_windows (GTK_APPLICATION (application))) != NULL)
+               goo_window_close (GOO_WINDOW (windows->data));
 }
 
 
diff --git a/src/goo-window.c b/src/goo-window.c
index 5d94c60..b8e9a26 100644
--- a/src/goo-window.c
+++ b/src/goo-window.c
@@ -1010,7 +1010,7 @@ window_delete_event_cb (GtkWidget  *caller,
        if (goo_player_get_state (window->priv->player) == GOO_PLAYER_STATE_PLAYING)
                gtk_window_iconify (GTK_WINDOW (window));
        else
-               gtk_widget_destroy (GTK_WIDGET (window));
+               goo_window_close (GOO_WINDOW (window));
 
        return TRUE;
 }


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