| 286 |
286 |
| 287 for (c = cards; c != NULL; c = c->next) |
287 for (c = cards; c != NULL; c = c->next) |
| 288 { |
288 { |
| 289 EContact *contact = E_CONTACT(c->data); |
289 EContact *contact = E_CONTACT(c->data); |
| 290 const char *name; |
290 const char *name; |
| 291 GList *aims, *jabbers, *yahoos, *icqs, *novells, *ggs; |
291 GList *aims, *jabbers, *icqs, *novells, *ggs; |
| 292 |
292 |
| 293 name = e_contact_get_const(contact, E_CONTACT_FULL_NAME); |
293 name = e_contact_get_const(contact, E_CONTACT_FULL_NAME); |
| 294 |
294 |
| 295 aims = e_contact_get(contact, E_CONTACT_IM_AIM); |
295 aims = e_contact_get(contact, E_CONTACT_IM_AIM); |
| 296 jabbers = e_contact_get(contact, E_CONTACT_IM_JABBER); |
296 jabbers = e_contact_get(contact, E_CONTACT_IM_JABBER); |
| 297 yahoos = e_contact_get(contact, E_CONTACT_IM_YAHOO); |
|
| 298 icqs = e_contact_get(contact, E_CONTACT_IM_ICQ); |
297 icqs = e_contact_get(contact, E_CONTACT_IM_ICQ); |
| 299 novells = e_contact_get(contact, E_CONTACT_IM_GROUPWISE); |
298 novells = e_contact_get(contact, E_CONTACT_IM_GROUPWISE); |
| 300 ggs = e_contact_get(contact, E_CONTACT_IM_GADUGADU); |
299 ggs = e_contact_get(contact, E_CONTACT_IM_GADUGADU); |
| 301 |
300 |
| 302 if (aims == NULL && jabbers == NULL && yahoos == NULL && |
301 if (aims == NULL && jabbers == NULL && |
| 303 icqs == NULL && novells == NULL && ggs == NULL) |
302 icqs == NULL && novells == NULL && ggs == NULL) |
| 304 { |
303 { |
| 305 GtkTreeIter iter; |
304 GtkTreeIter iter; |
| 306 |
305 |
| 307 gtk_list_store_append(dialog->model, &iter); |
306 gtk_list_store_append(dialog->model, &iter); |
| 313 } |
312 } |
| 314 else |
313 else |
| 315 { |
314 { |
| 316 add_ims(dialog, contact, name, aims, "prpl-aim"); |
315 add_ims(dialog, contact, name, aims, "prpl-aim"); |
| 317 add_ims(dialog, contact, name, jabbers, "prpl-jabber"); |
316 add_ims(dialog, contact, name, jabbers, "prpl-jabber"); |
| 318 add_ims(dialog, contact, name, yahoos, "prpl-yahoo"); |
|
| 319 add_ims(dialog, contact, name, icqs, "prpl-icq"); |
317 add_ims(dialog, contact, name, icqs, "prpl-icq"); |
| 320 add_ims(dialog, contact, name, novells, "prpl-novell"); |
318 add_ims(dialog, contact, name, novells, "prpl-novell"); |
| 321 add_ims(dialog, contact, name, ggs, "prpl-gg"); |
319 add_ims(dialog, contact, name, ggs, "prpl-gg"); |
| 322 } |
320 } |
| 323 } |
321 } |
| 362 |
360 |
| 363 for (l = dialog->contacts; l != NULL; l = l->next) |
361 for (l = dialog->contacts; l != NULL; l = l->next) |
| 364 { |
362 { |
| 365 EContact *contact = E_CONTACT(l->data); |
363 EContact *contact = E_CONTACT(l->data); |
| 366 const char *name; |
364 const char *name; |
| 367 GList *aims, *jabbers, *yahoos, *icqs, *novells, *ggs; |
365 GList *aims, *jabbers, *icqs, *novells, *ggs; |
| 368 |
366 |
| 369 name = e_contact_get_const(contact, E_CONTACT_FULL_NAME); |
367 name = e_contact_get_const(contact, E_CONTACT_FULL_NAME); |
| 370 |
368 |
| 371 if (text != NULL && *text != '\0' && name != NULL && |
369 if (text != NULL && *text != '\0' && name != NULL && |
| 372 g_ascii_strncasecmp(name, text, strlen(text))) |
370 g_ascii_strncasecmp(name, text, strlen(text))) |
| 374 continue; |
372 continue; |
| 375 } |
373 } |
| 376 |
374 |
| 377 aims = e_contact_get(contact, E_CONTACT_IM_AIM); |
375 aims = e_contact_get(contact, E_CONTACT_IM_AIM); |
| 378 jabbers = e_contact_get(contact, E_CONTACT_IM_JABBER); |
376 jabbers = e_contact_get(contact, E_CONTACT_IM_JABBER); |
| 379 yahoos = e_contact_get(contact, E_CONTACT_IM_YAHOO); |
|
| 380 icqs = e_contact_get(contact, E_CONTACT_IM_ICQ); |
377 icqs = e_contact_get(contact, E_CONTACT_IM_ICQ); |
| 381 novells = e_contact_get(contact, E_CONTACT_IM_GROUPWISE); |
378 novells = e_contact_get(contact, E_CONTACT_IM_GROUPWISE); |
| 382 ggs = e_contact_get(contact, E_CONTACT_IM_GADUGADU); |
379 ggs = e_contact_get(contact, E_CONTACT_IM_GADUGADU); |
| 383 |
380 |
| 384 if (aims == NULL && jabbers == NULL && yahoos == NULL && |
381 if (aims == NULL && jabbers == NULL && |
| 385 icqs == NULL && novells == NULL && ggs == NULL) |
382 icqs == NULL && novells == NULL && ggs == NULL) |
| 386 { |
383 { |
| 387 GtkTreeIter iter; |
384 GtkTreeIter iter; |
| 388 |
385 |
| 389 gtk_list_store_append(dialog->model, &iter); |
386 gtk_list_store_append(dialog->model, &iter); |
| 395 } |
392 } |
| 396 else |
393 else |
| 397 { |
394 { |
| 398 add_ims(dialog, contact, name, aims, "prpl-aim"); |
395 add_ims(dialog, contact, name, aims, "prpl-aim"); |
| 399 add_ims(dialog, contact, name, jabbers, "prpl-jabber"); |
396 add_ims(dialog, contact, name, jabbers, "prpl-jabber"); |
| 400 add_ims(dialog, contact, name, yahoos, "prpl-yahoo"); |
|
| 401 add_ims(dialog, contact, name, icqs, "prpl-icq"); |
397 add_ims(dialog, contact, name, icqs, "prpl-icq"); |
| 402 add_ims(dialog, contact, name, novells, "prpl-novell"); |
398 add_ims(dialog, contact, name, novells, "prpl-novell"); |
| 403 add_ims(dialog, contact, name, ggs, "prpl-gg"); |
399 add_ims(dialog, contact, name, ggs, "prpl-gg"); |
| 404 } |
400 } |
| 405 } |
401 } |