diff options
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r-- | shell/ev-window.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 47ee1e8..19b78f3 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -2691,21 +2691,13 @@ zoom_control_changed_cb (EphyZoomAction *action, static void ev_window_finalize (GObject *object) { - gboolean empty = TRUE; - GList *list, *windows; + GList *windows = ev_application_get_windows (EV_APP); - - windows = gtk_window_list_toplevels (); - - for (list = windows; list; list = list->next) { - if (EV_IS_WINDOW (list->data)) { - empty = FALSE; - break; - } - } - - if (empty) + if (windows == NULL) { ev_application_shutdown (EV_APP); + } else { + g_list_free (windows); + } g_list_free (windows); G_OBJECT_CLASS (ev_window_parent_class)->finalize (object); |