| 386 |
386 |
| 387 static void |
387 static void |
| 388 finch_notify_sr_new_rows(PurpleConnection *gc, |
388 finch_notify_sr_new_rows(PurpleConnection *gc, |
| 389 PurpleNotifySearchResults *results, void *data) |
389 PurpleNotifySearchResults *results, void *data) |
| 390 { |
390 { |
| 391 GntTree *tree = GNT_TREE(data); |
391 GntWindow *window = GNT_WINDOW(data); |
| |
392 GntTree *tree = GNT_TREE(g_object_get_data(G_OBJECT(window), "tree-widget")); |
| 392 GList *o; |
393 GList *o; |
| 393 |
394 |
| 394 /* XXX: Do I need to empty the tree here? */ |
395 gnt_tree_remove_all(GNT_TREE(tree)); |
| 395 |
396 |
| 396 for (o = results->rows; o; o = o->next) |
397 for (o = results->rows; o; o = o->next) |
| 397 { |
398 { |
| 398 gnt_tree_add_row_after(GNT_TREE(tree), o->data, |
399 gnt_tree_add_row_after(GNT_TREE(tree), o->data, |
| 399 gnt_tree_create_row_from_list(GNT_TREE(tree), o->data), |
400 gnt_tree_create_row_from_list(GNT_TREE(tree), o->data), |
| 481 gnt_box_add_widget(GNT_BOX(box), button); |
482 gnt_box_add_widget(GNT_BOX(box), button); |
| 482 } |
483 } |
| 483 |
484 |
| 484 gnt_box_add_widget(GNT_BOX(window), box); |
485 gnt_box_add_widget(GNT_BOX(window), box); |
| 485 |
486 |
| 486 finch_notify_sr_new_rows(gc, results, tree); |
487 g_object_set_data(G_OBJECT(window), "tree-widget", tree); |
| |
488 finch_notify_sr_new_rows(gc, results, window); |
| |
489 |
| |
490 g_signal_connect(G_OBJECT(window), "destroy", |
| |
491 G_CALLBACK(notify_msg_window_destroy_cb), GINT_TO_POINTER(PURPLE_NOTIFY_SEARCHRESULTS)); |
| 487 |
492 |
| 488 gnt_widget_show(window); |
493 gnt_widget_show(window); |
| 489 g_object_set_data(G_OBJECT(window), "notify-results", results); |
494 g_object_set_data(G_OBJECT(window), "notify-results", results); |
| 490 |
495 |
| 491 return tree; |
496 return window; |
| 492 } |
497 } |
| 493 |
498 |
| 494 static void * |
499 static void * |
| 495 finch_notify_uri(const char *url) |
500 finch_notify_uri(const char *url) |
| 496 { |
501 { |