diff options
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 16 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-migrate.c | 2 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-migrate.h | 4 |
3 files changed, 18 insertions, 4 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index ad43ba8f27..e74b0d7dda 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -170,10 +170,22 @@ impl_requestCreateItem (PortableServer_Servant servant, e_book_async_get_default_addressbook (book_loaded_cb, g_strdup (item_type_name)); } -static CORBA_boolean +static void impl_upgradeFromVersion (PortableServer_Servant servant, short major, short minor, short revision, CORBA_Environment *ev) { - return addressbook_migrate (addressbook_component_peek (), major, minor, revision); + GError *err = NULL; + + if (!addressbook_migrate (addressbook_component_peek (), major, minor, revision, &err)) { + GNOME_Evolution_Component_UpgradeFailed *failedex; + + failedex = GNOME_Evolution_Component_UpgradeFailed__alloc(); + failedex->what = CORBA_string_dup(_("Failed upgrading Addressbook settings or folders.")); + failedex->why = CORBA_string_dup(err->message); + CORBA_exception_set(ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UpgradeFailed, failedex); + } + + if (err) + g_error_free(err); } static CORBA_boolean diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 5474ba9c00..32fbf1ca3e 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -1043,7 +1043,7 @@ migration_context_free (MigrationContext *context) } int -addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision) +addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, GError **err) { ESourceGroup *on_this_computer; ESourceGroup *on_ldap_servers; diff --git a/addressbook/gui/component/addressbook-migrate.h b/addressbook/gui/component/addressbook-migrate.h index 89dce7a91b..dc7c473e12 100644 --- a/addressbook/gui/component/addressbook-migrate.h +++ b/addressbook/gui/component/addressbook-migrate.h @@ -24,6 +24,8 @@ #include "addressbook-component.h" -int addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision); +struct _GError; + +int addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, struct _GError **err); #endif /* _ADDRESSBOOK_MIGRATE_H_ */ |