aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-comp-editor-registry.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-05-27 00:46:49 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-05-27 00:46:49 +0800
commita1d69a1b83b4a1de9f54fef9a4e0da7703de9a55 (patch)
tree9930ac4b8d85e1712a79fec7dbae9950c78fa1c3 /calendar/gui/e-comp-editor-registry.c
parentfb1d17d150cb5178ca1d63431958d3df9dfc60b3 (diff)
downloadgsoc2013-evolution-a1d69a1b83b4a1de9f54fef9a4e0da7703de9a55.tar
gsoc2013-evolution-a1d69a1b83b4a1de9f54fef9a4e0da7703de9a55.tar.gz
gsoc2013-evolution-a1d69a1b83b4a1de9f54fef9a4e0da7703de9a55.tar.bz2
gsoc2013-evolution-a1d69a1b83b4a1de9f54fef9a4e0da7703de9a55.tar.lz
gsoc2013-evolution-a1d69a1b83b4a1de9f54fef9a4e0da7703de9a55.tar.xz
gsoc2013-evolution-a1d69a1b83b4a1de9f54fef9a4e0da7703de9a55.tar.zst
gsoc2013-evolution-a1d69a1b83b4a1de9f54fef9a4e0da7703de9a55.zip
if there are remaining items, return false (foreach_close_cb): don't
2002-05-26 JP Rosevear <jpr@ximian.com> * gui/e-comp-editor-registry.c (e_comp_editor_registry_close_all): if there are remaining items, return false (foreach_close_cb): don't remove the item if it couldn't be closed * gui/e-comp-editor-registry.h: update proto * gui/component-factory.c (request_quit): return a boolean indicating if everything was closed * gui/dialogs/comp-editor.h: update proto * gui/dialogs/comp-editor.c (comp_editor_close): return true if the editor was closed, false otherwise svn path=/trunk/; revision=17019
Diffstat (limited to 'calendar/gui/e-comp-editor-registry.c')
-rw-r--r--calendar/gui/e-comp-editor-registry.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c
index 4385cb1a84..46548a57c6 100644
--- a/calendar/gui/e-comp-editor-registry.c
+++ b/calendar/gui/e-comp-editor-registry.c
@@ -171,15 +171,16 @@ foreach_close_cb (gpointer key, gpointer value, gpointer data)
gtk_signal_disconnect_by_data (GTK_OBJECT (rdata->editor), data);
comp_editor_focus (rdata->editor);
- comp_editor_close (rdata->editor);
-
+ if (!comp_editor_close (rdata->editor))
+ return FALSE;
+
g_free (rdata->uid);
g_free (rdata);
return TRUE;
}
-void
+gboolean
e_comp_editor_registry_close_all (ECompEditorRegistry *reg)
{
ECompEditorRegistryPrivate *priv;
@@ -190,6 +191,10 @@ e_comp_editor_registry_close_all (ECompEditorRegistry *reg)
priv = reg->priv;
g_hash_table_foreach_remove (priv->editors, foreach_close_cb, reg);
+ if (g_hash_table_size (priv->editors) != 0)
+ return FALSE;
+
+ return TRUE;
}
static void