From: José Dapena Paz Date: Sat, 23 Jan 2010 19:45:52 +0000 (+0100) Subject: Add emision of signals for account created and removed through dbus X-Git-Tag: 3.90.5~38 X-Git-Url: https://vcs.maemo.org/git/?p=modest;a=commitdiff_plain;h=2a3a86b191a179d0bfaba637b474768b03a75b48 Add emision of signals for account created and removed through dbus --- diff --git a/src/gtk/modest-platform.c b/src/gtk/modest-platform.c index 35eeab7..9254016 100644 --- a/src/gtk/modest-platform.c +++ b/src/gtk/modest-platform.c @@ -2368,7 +2368,21 @@ modest_platform_get_list_to_move (ModestWindow *window) } void -modest_platform_emit_folder_updated_signal (const gchar *account_id, const gch +modest_platform_emit_folder_updated_signal (const gchar *account_id, const gchar *folder_id) { return; } + + +void +modest_platform_emit_account_created_signal (const gchar *account_id) +{ + return; +} + +void +modest_platform_emit_account_removed_signal (const gchar *account_id) +{ + return; +} + diff --git a/src/hildon2/modest-platform.c b/src/hildon2/modest-platform.c index 27f8f4f..d8f9225 100644 --- a/src/hildon2/modest-platform.c +++ b/src/hildon2/modest-platform.c @@ -3189,3 +3189,25 @@ modest_platform_emit_folder_updated_signal (const gchar *account_id, const gchar modest_dbus_emit_folder_updated_signal (con, account_id, folder_id); } + +void +modest_platform_emit_account_created_signal (const gchar *account_id) +{ + DBusConnection *con; + + con = modest_platform_get_dbus_connection (); + if (!con) return; + + modest_dbus_emit_account_created_signal (con, account_id); +} + +void +modest_platform_emit_account_removed_signal (const gchar *account_id) +{ + DBusConnection *con; + + con = modest_platform_get_dbus_connection (); + if (!con) return; + + modest_dbus_emit_account_removed_signal (con, account_id); +} diff --git a/src/modest-account-mgr.c b/src/modest-account-mgr.c index 48a96dc..c0b7cf2 100644 --- a/src/modest-account-mgr.c +++ b/src/modest-account-mgr.c @@ -342,6 +342,7 @@ modest_account_mgr_add_account_from_settings (ModestAccountMgr *self, /* Notify the observers */ g_signal_emit (self, signals[ACCOUNT_INSERTED_SIGNAL], 0, account_name); + modest_platform_emit_account_created_signal (account_name); /* if no default account has been defined yet, do so now */ default_account = modest_account_mgr_get_default_account (self); @@ -456,6 +457,7 @@ modest_account_mgr_add_account (ModestAccountMgr *self, /* Notify the observers */ g_signal_emit (self, signals[ACCOUNT_INSERTED_SIGNAL], 0, name); + modest_platform_emit_account_created_signal (name); /* if no default account has been defined yet, do so now */ default_account = modest_account_mgr_get_default_account (self); @@ -717,6 +719,7 @@ modest_account_mgr_remove_account (ModestAccountMgr * self, the keys, because otherwise a call to account_names will retrieve also the deleted account */ g_signal_emit (G_OBJECT(self), signals[ACCOUNT_REMOVED_SIGNAL], 0, name); + modest_platform_emit_account_removed_signal (name); return TRUE; } diff --git a/src/modest-platform.h b/src/modest-platform.h index ef5c8a6..bc389c5 100644 --- a/src/modest-platform.h +++ b/src/modest-platform.h @@ -567,6 +567,8 @@ DBusConnection* modest_platform_get_dbus_connection (void); #endif void modest_platform_emit_folder_updated_signal (const gchar *account_id, const gchar *folder_id); +void modest_platform_emit_account_created_signal (const gchar *account_id); +void modest_platform_emit_account_removed_signal (const gchar *account_id); G_END_DECLS