pidgin/plugins/gevolution/assoc-buddy.c

branch
soc.2013.gobjectification.plugins
changeset 36545
23b59a16c808
parent 34708
dd67596485ca
child 36773
62148e91059f
equal deleted inserted replaced
36544:1bf8b6ef5aea 36545:23b59a16c808
132 static void 132 static void
133 populate_treeview(GevoAssociateBuddyDialog *dialog, const gchar *uri) 133 populate_treeview(GevoAssociateBuddyDialog *dialog, const gchar *uri)
134 { 134 {
135 EBook *book; 135 EBook *book;
136 EBookQuery *query; 136 EBookQuery *query;
137 const char *prpl_id; 137 const char *protocol_id;
138 gboolean status; 138 gboolean status;
139 GList *cards, *c; 139 GList *cards, *c;
140 GError *err = NULL; 140 GError *err = NULL;
141 141
142 if (dialog->book != NULL) 142 if (dialog->book != NULL)
186 g_object_unref(book); 186 g_object_unref(book);
187 187
188 return; 188 return;
189 } 189 }
190 190
191 prpl_id = purple_account_get_protocol_id(dialog->buddy->account); 191 protocol_id = purple_account_get_protocol_id(dialog->buddy->account);
192 192
193 for (c = cards; c != NULL; c = c->next) 193 for (c = cards; c != NULL; c = c->next)
194 { 194 {
195 EContact *contact = E_CONTACT(c->data); 195 EContact *contact = E_CONTACT(c->data);
196 const char *name; 196 const char *name;
205 COLUMN_NAME, name, 205 COLUMN_NAME, name,
206 COLUMN_DATA, contact, 206 COLUMN_DATA, contact,
207 -1); 207 -1);
208 208
209 /* See if this user has the buddy in its list. */ 209 /* See if this user has the buddy in its list. */
210 protocol_field = gevo_prpl_get_field(dialog->buddy->account, 210 protocol_field = gevo_protocol_get_field(dialog->buddy->account,
211 dialog->buddy); 211 dialog->buddy);
212 212
213 if (protocol_field > 0) 213 if (protocol_field > 0)
214 { 214 {
215 GList *ims, *l; 215 GList *ims, *l;
287 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, 287 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter,
288 COLUMN_NAME, &fullname, 288 COLUMN_NAME, &fullname,
289 COLUMN_DATA, &contact, 289 COLUMN_DATA, &contact,
290 -1); 290 -1);
291 291
292 protocol_field = gevo_prpl_get_field(dialog->buddy->account, dialog->buddy); 292 protocol_field = gevo_protocol_get_field(dialog->buddy->account, dialog->buddy);
293 293
294 if (protocol_field == 0) 294 if (protocol_field == 0)
295 return; /* XXX */ 295 return; /* XXX */
296 296
297 list = e_contact_get(contact, protocol_field); 297 list = e_contact_get(contact, protocol_field);

mercurial