summaryrefslogtreecommitdiff
path: root/finch/gntnotify.c
diff options
context:
space:
mode:
authorMark Doliner <markdoliner@pidgin.im>2007-09-17 06:42:08 +0000
committerMark Doliner <markdoliner@pidgin.im>2007-09-17 06:42:08 +0000
commitd744d33af254f6427a1be1bfef62c5575d8a1c90 (patch)
treeed6bda5f3a07e09066e6612c0ece25e645257103 /finch/gntnotify.c
parent55d2b99fb9ee8980ddbbf11ee6b0d25b7519120a (diff)
downloadpidgin-d744d33af254f6427a1be1bfef62c5575d8a1c90.tar.gz
Access search results directly instead of going through the API because
it's way more efficient this way,a nd mark the old functions as deprecated.
Diffstat (limited to 'finch/gntnotify.c')
-rw-r--r--finch/gntnotify.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/finch/gntnotify.c b/finch/gntnotify.c
index f086633ff1..f0e0032f8b 100644
--- a/finch/gntnotify.c
+++ b/finch/gntnotify.c
@@ -352,14 +352,17 @@ finch_notify_searchresults(PurpleConnection *gc, const char *title,
gnt_box_add_widget(GNT_BOX(window),
gnt_label_new_with_format(secondary, GNT_TEXT_FLAG_NORMAL));
- columns = purple_notify_searchresults_get_columns_count(results);
+ columns = g_list_length(results->columns);
tree = gnt_tree_new_with_columns(columns);
gnt_tree_set_show_title(GNT_TREE(tree), TRUE);
gnt_box_add_widget(GNT_BOX(window), tree);
- for (i = 0; i < columns; i++)
- gnt_tree_set_column_title(GNT_TREE(tree), i,
- purple_notify_searchresults_column_get_title(results, i));
+ i = 0;
+ for (iter = results->columns; iter; iter = iter->next)
+ {
+ gnt_tree_set_column_title(GNT_TREE(tree), i, iter->data);
+ i++;
+ }
box = gnt_hbox_new(TRUE);