aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
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/dialogs
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/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor.c13
-rw-r--r--calendar/gui/dialogs/comp-editor.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 21f5e1c9f3..18ca46af27 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -978,16 +978,21 @@ comp_editor_send_comp (CompEditor *editor, CalComponentItipMethod method)
klass->send_comp (editor, method);
}
-void
+gboolean
comp_editor_close (CompEditor *editor)
{
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
+ gboolean close;
+
+ g_return_val_if_fail (editor != NULL, FALSE);
+ g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
commit_all_fields (editor);
- if (prompt_to_save_changes (editor, TRUE))
+ close = prompt_to_save_changes (editor, TRUE);
+ if (close)
close_dialog (editor);
+
+ return close;
}
/**
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index 9297526e48..db4a407e25 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -83,7 +83,7 @@ gboolean comp_editor_save_comp (CompEditor *editor,
void comp_editor_delete_comp (CompEditor *editor);
void comp_editor_send_comp (CompEditor *editor,
CalComponentItipMethod method);
-void comp_editor_close (CompEditor *editor);
+gboolean comp_editor_close (CompEditor *editor);
void comp_editor_merge_ui (CompEditor *editor,
const char *filename,
BonoboUIVerb *verbs,