diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-11-12 15:37:13 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-11-12 15:37:13 +0000 |
commit | 71490fe5f17e66d8900cb12ce38506745b2bc539 (patch) | |
tree | 866b6fdf6bcbad7de21fa32ecfd91909b1d8f16c | |
parent | 6ebcb0f048fcf0107c6d7deb99a7f4717467561a (diff) | |
download | telepathy-mission-control-71490fe5f17e66d8900cb12ce38506745b2bc539.tar.gz |
Revert "Make sure to not delete() nor commit() and account deleted from storage"
This reverts commit 6ebcb0f048fcf0107c6d7deb99a7f4717467561a.
-rw-r--r-- | mission-control-plugins/account-storage.c | 5 | ||||
-rw-r--r-- | src/mcd-account-manager.c | 2 | ||||
-rw-r--r-- | src/mcd-account.c | 5 | ||||
-rw-r--r-- | src/mcd-storage.c | 7 | ||||
-rw-r--r-- | src/mcd-storage.h | 6 |
5 files changed, 7 insertions, 18 deletions
diff --git a/mission-control-plugins/account-storage.c b/mission-control-plugins/account-storage.c index dd478d88..a5b89f0c 100644 --- a/mission-control-plugins/account-storage.c +++ b/mission-control-plugins/account-storage.c @@ -261,11 +261,8 @@ class_init (gpointer klass, * Emitted if an external entity deletes an account * in the backend the emitting plugin handles. * - * Should not be fired until mcp_account_storage_ready() has been called. + * Should not be fired until mcp_account_storage_ready() has been called * - * mcp_account_storage_commit() and mcp_account_storage_delete() won't be - * called for this account, it is assumed that the storage backend already - * deleted all the related information. */ signals[DELETED] = g_signal_new ("deleted", type, G_SIGNAL_RUN_LAST, 0, NULL, NULL, diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c index 8495d44d..822058a3 100644 --- a/src/mcd-account-manager.c +++ b/src/mcd-account-manager.c @@ -569,7 +569,7 @@ on_account_removed (McdAccount *account, McdAccountManager *account_manager) name = mcd_account_get_unique_name (account); g_hash_table_remove (priv->accounts, name); - mcd_storage_delete_account (storage, name, MCD_DBUS_PROP_SET_FLAG_NONE); + mcd_storage_delete_account (storage, name); mcd_account_manager_write_conf_async (account_manager, account, NULL, NULL); } diff --git a/src/mcd-account.c b/src/mcd-account.c index 12e15134..752e9266 100644 --- a/src/mcd-account.c +++ b/src/mcd-account.c @@ -733,7 +733,7 @@ mcd_account_delete (McdAccount *account, return; } - mcd_storage_delete_account (priv->storage, name, flags); + mcd_storage_delete_account (priv->storage, name); data_dir_str = get_old_account_data_path (priv); @@ -760,8 +760,7 @@ mcd_account_delete (McdAccount *account, g_free (data_dir_str); } - if ((flags & MCD_DBUS_PROP_SET_FLAG_ALREADY_IN_STORAGE) == 0) - mcd_storage_commit (priv->storage, name); + mcd_storage_commit (priv->storage, name); if (callback != NULL) callback (account, NULL, user_data); diff --git a/src/mcd-storage.c b/src/mcd-storage.c index f83f1b4c..37b1c266 100644 --- a/src/mcd-storage.c +++ b/src/mcd-storage.c @@ -1971,8 +1971,7 @@ mcd_storage_create_account (McdStorage *self, */ void mcd_storage_delete_account (McdStorage *self, - const gchar *account, - McdDBusPropSetFlags flags) + const gchar *account) { McpAccountManager *ma = MCP_ACCOUNT_MANAGER (self); McdStorageAccount *sa; @@ -1983,9 +1982,7 @@ mcd_storage_delete_account (McdStorage *self, sa = lookup_account (self, account); g_return_if_fail (sa != NULL); - if ((flags & MCD_DBUS_PROP_SET_FLAG_ALREADY_IN_STORAGE) == 0) - mcp_account_storage_delete (sa->storage, ma, account, NULL); - + mcp_account_storage_delete (sa->storage, ma, account, NULL); g_hash_table_remove (self->accounts, account); } diff --git a/src/mcd-storage.h b/src/mcd-storage.h index 0ea52ebd..eb2ce36c 100644 --- a/src/mcd-storage.h +++ b/src/mcd-storage.h @@ -22,8 +22,6 @@ #include <glib-object.h> #include <mission-control-plugins/mission-control-plugins.h> -#include <src/mcd-dbusprop.h> - #ifndef MCD_STORAGE_H #define MCD_STORAGE_H @@ -99,9 +97,7 @@ gchar *mcd_storage_create_account (McdStorage *storage, const gchar *identification, GError **error); -void mcd_storage_delete_account (McdStorage *storage, - const gchar *account, - McdDBusPropSetFlags flags); +void mcd_storage_delete_account (McdStorage *storage, const gchar *account); void mcd_storage_commit (McdStorage *storage, const gchar *account); |