aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/cal-editor-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:37:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:40:49 +0800
commitcfb9c32b6657165e4d5e11aa7b47804f679a61f8 (patch)
tree1f9c8954df7a357b5dc20a13ac82bf31c1112083 /calendar/gui/cal-editor-utils.c
parentfefeb30f58447f2fa7bcbee16dbe68a9333ce89d (diff)
parent0f7f4cfe38b3c4cd83efbe9922ae15c5aee00317 (diff)
downloadgsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.gz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.bz2
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.lz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.xz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.zst
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.zip
Merge commit 'origin/kill-bonobo'
Diffstat (limited to 'calendar/gui/cal-editor-utils.c')
-rw-r--r--calendar/gui/cal-editor-utils.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/calendar/gui/cal-editor-utils.c b/calendar/gui/cal-editor-utils.c
index ece9abe532..0da7ca2af9 100644
--- a/calendar/gui/cal-editor-utils.c
+++ b/calendar/gui/cal-editor-utils.c
@@ -47,14 +47,19 @@ extern ECompEditorRegistry *comp_editor_registry;
* It blocks until finished and should be called in the main thread.
**/
void
-open_component_editor (ECal *client, ECalComponent *comp, gboolean is_new, GError **error)
+open_component_editor (EShell *shell,
+ ECal *client,
+ ECalComponent *comp,
+ gboolean is_new,
+ GError **error)
{
ECalComponentId *id;
CompEditorFlags flags = 0;
CompEditor *editor = NULL;
- g_return_if_fail (client != NULL);
- g_return_if_fail (comp != NULL);
+ g_return_if_fail (E_IS_SHELL (shell));
+ g_return_if_fail (E_IS_CAL (client));
+ g_return_if_fail (E_IS_CAL_COMPONENT (comp));
id = e_cal_component_get_id (comp);
g_return_if_fail (id != NULL);
@@ -63,7 +68,7 @@ open_component_editor (ECal *client, ECalComponent *comp, gboolean is_new, GErro
if (is_new) {
flags |= COMP_EDITOR_NEW_ITEM;
} else {
- editor = e_comp_editor_registry_find (comp_editor_registry, id->uid);
+ editor = comp_editor_find_instance (id->uid);
}
if (!editor) {
@@ -75,7 +80,7 @@ open_component_editor (ECal *client, ECalComponent *comp, gboolean is_new, GErro
if (e_cal_component_has_attendees (comp))
flags |= COMP_EDITOR_MEETING;
- editor = event_editor_new (client, flags);
+ editor = event_editor_new (client, shell, flags);
if (flags & COMP_EDITOR_MEETING)
event_editor_show_meeting (EVENT_EDITOR (editor));
@@ -84,7 +89,7 @@ open_component_editor (ECal *client, ECalComponent *comp, gboolean is_new, GErro
if (e_cal_component_has_attendees (comp))
flags |= COMP_EDITOR_IS_ASSIGNED;
- editor = task_editor_new (client, flags);
+ editor = task_editor_new (client, shell, flags);
if (flags & COMP_EDITOR_IS_ASSIGNED)
task_editor_show_assignment (TASK_EDITOR (editor));
@@ -93,7 +98,7 @@ open_component_editor (ECal *client, ECalComponent *comp, gboolean is_new, GErro
if (e_cal_component_has_organizer (comp))
flags |= COMP_EDITOR_IS_SHARED;
- editor = memo_editor_new (client, flags);
+ editor = memo_editor_new (client, shell, flags);
break;
default:
if (error)
@@ -106,8 +111,6 @@ open_component_editor (ECal *client, ECalComponent *comp, gboolean is_new, GErro
/* request save for new events */
comp_editor_set_changed (editor, is_new);
-
- e_comp_editor_registry_add (comp_editor_registry, editor, TRUE);
}
}