diff options
author | Jonathan Blandford <jrb@redhat.com> | 2005-08-26 02:16:17 (GMT) |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2005-08-26 02:16:17 (GMT) |
commit | 37c2570fb37d29b576f70b210e3334cb3d7b04b1 (patch) | |
tree | 4ad2f1f4d953d120404f61ddb3c88f10bf38d1dd | |
parent | 0bdec82dd21f2f4f8794047356893af8323a4385 (diff) |
Check for avail. EvWindows when quiting to handle the finalize better,
Thu Aug 25 22:13:08 2005 Jonathan Blandford <jrb@redhat.com>
* shell/ev-window.c (ev_window_finalize): Check for
avail. EvWindows when quiting to handle the finalize better,
#314497
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | shell/ev-window.c | 21 |
2 files changed, 21 insertions, 6 deletions
@@ -1,3 +1,9 @@ +Thu Aug 25 22:13:08 2005 Jonathan Blandford <jrb@redhat.com> + + * shell/ev-window.c (ev_window_finalize): Check for + avail. EvWindows when quiting to handle the finalize better, + #314497 + 2005-08-26 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * properties/ev-properties-view.c: diff --git a/shell/ev-window.c b/shell/ev-window.c index 0c8139a..c634a07 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -2745,14 +2745,23 @@ zoom_control_changed_cb (EphyZoomAction *action, static void ev_window_finalize (GObject *object) { - GList *windows = gtk_window_list_toplevels (); + gboolean empty = TRUE; + GList *list, *windows; - if (windows == NULL) { - ev_application_shutdown (EV_APP); - } else { - g_list_free (windows); - } + windows = gtk_window_list_toplevels (); + + for (list = windows; list; list = list->next) { + if (EV_IS_WINDOW (list->data)) { + empty = FALSE; + break; + } + } + + if (empty) + ev_application_shutdown (EV_APP); + + g_list_free (windows); G_OBJECT_CLASS (ev_window_parent_class)->finalize (object); } |