]> git.0d.be Git - empathy.git/commitdiff
Adjust for signature change in folks_groups_change_group()
authorTravis Reitter <treitter@gmail.com>
Mon, 26 Jul 2010 16:49:35 +0000 (18:49 +0200)
committerTravis Reitter <treitter@gmail.com>
Tue, 27 Jul 2010 10:51:15 +0000 (12:51 +0200)
libempathy-gtk/empathy-individual-view.c
libempathy/empathy-contact.c
libempathy/empathy-individual-manager.c

index ef4f938f3a7824fc171f514c1c1313ef374055cd..7083b238b6973edbf10c846890173ada095e2159 100644 (file)
@@ -319,6 +319,22 @@ OUT:
   return ret;
 }
 
+static void
+groups_change_group_cb (GObject *source,
+    GAsyncResult *result,
+    gpointer user_data)
+{
+  FolksGroups *groups = FOLKS_GROUPS (source);
+  GError *error = NULL;
+
+  folks_groups_change_group_finish (groups, result, &error);
+  if (error != NULL)
+    {
+      g_warning ("failed to change group: %s", error->message);
+      g_clear_error (&error);
+    }
+}
+
 static void
 individual_view_handle_drag (EmpathyIndividualView *self,
     FolksIndividual *individual,
@@ -349,10 +365,12 @@ individual_view_handle_drag (EmpathyIndividualView *self,
     }
 
   if (new_group != NULL)
-    folks_groups_change_group (FOLKS_GROUPS (individual), new_group, TRUE);
+    folks_groups_change_group (FOLKS_GROUPS (individual), new_group, TRUE,
+        groups_change_group_cb, NULL);
 
   if (old_group != NULL && action == GDK_ACTION_MOVE)
-    folks_groups_change_group (FOLKS_GROUPS (individual), old_group, FALSE);
+    folks_groups_change_group (FOLKS_GROUPS (individual), old_group, FALSE,
+        groups_change_group_cb, NULL);
 }
 
 static gboolean
index 9a2bd8fb5a28826115bea431d5464298180671df..6842cde09d8078f60afd055236836eabf5d551bb 100644 (file)
@@ -662,6 +662,22 @@ empathy_contact_set_alias (EmpathyContact *contact,
   g_object_unref (contact);
 }
 
+static void
+groups_change_group_cb (GObject *source,
+    GAsyncResult *result,
+    gpointer user_data)
+{
+  FolksGroups *groups = FOLKS_GROUPS (source);
+  GError *error = NULL;
+
+  folks_groups_change_group_finish (groups, result, &error);
+  if (error != NULL)
+    {
+      g_warning ("failed to change group: %s", error->message);
+      g_clear_error (&error);
+    }
+}
+
 void
 empathy_contact_change_group (EmpathyContact *contact, const gchar *group,
     gboolean is_member)
@@ -679,7 +695,8 @@ empathy_contact_change_group (EmpathyContact *contact, const gchar *group,
   if (persona != NULL)
     {
       if (FOLKS_IS_GROUPS (persona))
-        folks_groups_change_group (FOLKS_GROUPS (persona), group, is_member);
+        folks_groups_change_group (FOLKS_GROUPS (persona), group, is_member,
+          groups_change_group_cb, contact);
       return;
     }
 
index 32442f94c3d4f88ffb6e47fad6c49a6929e582f1..55541b29955a7c9e997acd2bdaacf47346d0ef3f 100644 (file)
@@ -367,12 +367,29 @@ empathy_individual_manager_remove (EmpathyIndividualManager *self,
       aggregator_remove_individual_cb, self);
 }
 
+static void
+groups_change_group_cb (GObject *source,
+    GAsyncResult *result,
+    gpointer user_data)
+{
+  FolksGroups *groups = FOLKS_GROUPS (source);
+  GError *error = NULL;
+
+  folks_groups_change_group_finish (groups, result, &error);
+  if (error != NULL)
+    {
+      g_warning ("failed to change group: %s", error->message);
+      g_clear_error (&error);
+    }
+}
+
 static void
 remove_group_cb (const gchar *id,
     FolksIndividual *individual,
     const gchar *group)
 {
-  folks_groups_change_group (FOLKS_GROUPS (individual), group, FALSE);
+  folks_groups_change_group (FOLKS_GROUPS (individual), group, FALSE,
+      groups_change_group_cb, NULL);
 }
 
 void