[Pkg-telepathy-commits] [telepathy-mission-control-6] 04/280: Remove partially-implemented McpAccountStorage::altered

Simon McVittie smcv at debian.org
Thu Mar 27 20:06:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 551fa1aca67bff62f49de1ef577c60247fe19300
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue Sep 10 12:20:00 2013 +0100

    Remove partially-implemented McpAccountStorage::altered
    
    https://bugs.freedesktop.org/show_bug.cgi?id=69176
    Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
 mission-control-plugins/account-storage.c | 34 +---------------
 mission-control-plugins/account-storage.h |  3 --
 src/mcd-account-manager.c                 | 65 -------------------------------
 3 files changed, 1 insertion(+), 101 deletions(-)

diff --git a/mission-control-plugins/account-storage.c b/mission-control-plugins/account-storage.c
index 3991c0c..f4bec62 100644
--- a/mission-control-plugins/account-storage.c
+++ b/mission-control-plugins/account-storage.c
@@ -103,7 +103,6 @@
 enum
 {
   CREATED,
-  ALTERED,
   TOGGLED,
   DELETED,
   ALTERED_ONE,
@@ -192,23 +191,6 @@ class_init (gpointer klass,
       1, G_TYPE_STRING);
 
   /**
-   * McpAccountStorage::altered
-   * @account: the unique name of the altered account
-   *
-   * This signal does not appear to be fully implemented
-   * (see <ulink href="https://bugs.freedesktop.org/show_bug.cgi?id=28288"
-   *  >freedesktop.org bug 28288</ulink>).
-   * Emit #McpAccountStorage::altered-one instead.
-   *
-   * Should not be fired until mcp_account_storage_ready() has been called
-   *
-   */
-  signals[ALTERED] = g_signal_new ("altered",
-      type, G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED, 0, NULL, NULL,
-      g_cclosure_marshal_VOID__STRING, G_TYPE_NONE,
-      1, G_TYPE_STRING);
-
-  /**
    * McpAccountStorage::altered-one
    * @account: the unique name of the altered account
    * @name: the name of the altered property (its key)
@@ -966,7 +948,7 @@ mcp_account_storage_list (const McpAccountStorage *storage,
  * @am: an #McpAccountManager instance
  *
  * Informs the plugin that it is now permitted to create new accounts,
- * ie it can now fire its "created", "altered", "toggled" and "deleted"
+ * ie it can now fire its "created", "altered-one", "toggled" and "deleted"
  * signals.
  */
 void
@@ -1180,20 +1162,6 @@ mcp_account_storage_emit_created (McpAccountStorage *storage,
 }
 
 /**
- * mcp_account_storage_emit_altered:
- * @storage: an #McpAccountStorage instance
- * @account: the unique name of the altered account
- *
- * Emits the #McpAccountStorage::altered signal
- */
-void
-mcp_account_storage_emit_altered (McpAccountStorage *storage,
-    const gchar *account)
-{
-  g_signal_emit (storage, signals[ALTERED], 0, account);
-}
-
-/**
  * mcp_account_storage_emit_altered_one:
  * @storage: an #McpAccountStorage instance
  * @account: the unique name of the altered account
diff --git a/mission-control-plugins/account-storage.h b/mission-control-plugins/account-storage.h
index 91cdd78..171f460 100644
--- a/mission-control-plugins/account-storage.h
+++ b/mission-control-plugins/account-storage.h
@@ -284,9 +284,6 @@ gboolean mcp_account_storage_set_parameter (McpAccountStorage *storage,
 
 void mcp_account_storage_emit_created (McpAccountStorage *storage,
     const gchar *account);
-G_DEPRECATED_FOR (something that is actually implemented)
-void mcp_account_storage_emit_altered (McpAccountStorage *storage,
-    const gchar *account);
 void mcp_account_storage_emit_altered_one (McpAccountStorage *storage,
     const gchar *account,
     const gchar *key);
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 57296cd..66cc851 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -146,70 +146,6 @@ static void account_loaded (McdAccount *account,
                             const GError *error,
                             gpointer user_data);
 
-/* calback chain for asynchronously updates from backends: */
-static void
-async_altered_validity_cb (McdAccount *account, const GError *invalid_reason, gpointer data)
-{
-    DEBUG ("asynchronously altered account %s is %svalid",
-           mcd_account_get_unique_name (account), (invalid_reason == NULL) ? "" : "in");
-
-    g_object_unref (account);
-}
-
-static void
-async_altered_manager_cb (McdManager *cm, const GError *error, gpointer data)
-{
-    McdAccount *account = data;
-    const gchar *name = NULL;
-
-    if (cm != NULL)
-        name = mcd_manager_get_name (cm);
-
-    if (error != NULL)
-        DEBUG ("manager %s not ready: %s", name, error->message);
-    else
-        DEBUG ("manager %s is ready", name);
-
-    /* this triggers the final parameter check which results in dbus signals *
-     * being fired and (potentially) the account going online automatically  */
-    mcd_account_check_validity (account, async_altered_validity_cb, NULL);
-
-    g_object_unref (cm);
-}
-
-/* account has been updated by a third party, and the McpAccountStorage *
- * plugin has just informed us of this fact                             */
-static void
-altered_cb (GObject *storage, const gchar *name, gpointer data)
-{
-    McdAccountManager *am = MCD_ACCOUNT_MANAGER (data);
-    McdMaster *master = mcd_master_get_default ();
-    McdAccount *account = NULL;
-    McdManager *cm = NULL;
-    const gchar *cm_name = NULL;
-
-    account = mcd_account_manager_lookup_account (am, name);
-
-    if (G_UNLIKELY (!account))
-    {
-        g_warning ("%s: account %s does not exist", G_STRFUNC, name);
-        return;
-    }
-
-    /* in theory, the CM is already ready by this point, but make sure: */
-    cm_name = mcd_account_get_manager_name (account);
-
-    if (cm_name != NULL)
-        cm = _mcd_master_lookup_manager (master, cm_name);
-
-    if (cm != NULL)
-    {
-        g_object_ref (cm);
-        g_object_ref (account);
-        mcd_manager_call_when_ready (cm, async_altered_manager_cb, account);
-    }
-}
-
 static void
 async_altered_one_manager_cb (McdManager *cm,
                               const GError *error,
@@ -1658,7 +1594,6 @@ _mcd_account_manager_constructed (GObject *obj)
     guint i = 0;
     static struct { const gchar *name; GCallback handler; } sig[] =
       { { "created", G_CALLBACK (created_cb) },
-        { "altered", G_CALLBACK (altered_cb) },
         { "toggled", G_CALLBACK (toggled_cb) },
         { "deleted", G_CALLBACK (deleted_cb) },
         { "altered-one", G_CALLBACK (altered_one_cb) },

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list