[gnome-photos] application: Make app.quit use the same path as the close button



commit 0a17d0385031a5b7647a0897b5d1a45705423be7
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Apr 22 19:04:57 2016 +0200

    application: Make app.quit use the same path as the close button
    
    GtkHeaderBar's close button uses gtk_main_window_close. This emits
    GtkWidget::delete-event on the parent GtkWindow, which, by default,
    leads to gtk_widget_destroy. However, one can override the default by
    using gtk_widget_hide_on_delete as the GtkWidget::delete-event handler.
    
    Using the same code path for all the different ways in which the
    application can be quit will make our lives easier when we try to
    prevent the window from getting destroyed in the middle of a critical
    operation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764076

 src/photos-application.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 2a0e231..487c9c4 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -972,7 +972,7 @@ photos_application_remote_display_current (PhotosApplication *self)
 static void
 photos_application_quit (PhotosApplication *self, GVariant *parameter)
 {
-  gtk_widget_destroy (self->main_window);
+  gtk_window_close (GTK_WINDOW (self->main_window));
 }
 
 


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