aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/migration.c')
-rw-r--r--calendar/gui/migration.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index de43d4bb5f..76b8a52a16 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -47,6 +47,7 @@
#include <libedataserver/e-xml-hash-utils.h>
#include "calendar-config.h"
#include "calendar-config-keys.h"
+#include "e-cal-event.h"
#include "migration.h"
static e_gconf_map_t calendar_display_map[] = {
@@ -700,6 +701,8 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
{
ESourceGroup *on_this_computer = NULL, *on_the_web = NULL, *contacts = NULL;
ESource *personal_source = NULL;
+ ECalEvent *ece;
+ ECalEventTargetComponent *target;
gboolean retval = FALSE;
/* we call this unconditionally now - create_groups either
@@ -833,6 +836,21 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
}
e_source_list_sync (calendar_component_peek_source_list (component), NULL);
+
+ /** @Event: component.migration
+ * @Title: Migration step in component initialization
+ * @Target: ECalEventTargetComponent
+ *
+ * component.migration is emitted during the calendar component
+ * initialization process. This allows new calendar backend types
+ * to be distributed as an e-d-s backend and a plugin without
+ * reaching their grubby little fingers into migration.c
+ */
+ /* Fire off migration event */
+ ece = e_cal_event_peek ();
+ target = e_cal_event_target_new_component (ece, calendar_component_peek (), 0);
+ e_event_emit ((EEvent *) ece, "component.migration", (EEventTarget *) target);
+
retval = TRUE;
fail:
if (on_this_computer)