Mercurial > pidgin
diff src/buddy.c @ 5060:db4280b42f2f
[gaim-migrate @ 5411]
Dave Camp sent me two patches, one to remove the excess space in group name
rows, and another to remove that space and the folder icon. I think it
actually looks better with the folder icon, but many people have complained
that this is "redundant" whatever that means. Thanks, Dave.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 07 Apr 2003 16:47:16 +0000 |
parents | 5b1d70deda02 |
children | b37d7d09ec83 |
line wrap: on
line diff
--- a/src/buddy.c Mon Apr 07 05:40:10 2003 +0000 +++ b/src/buddy.c Mon Apr 07 16:47:16 2003 +0000 @@ -1180,7 +1180,7 @@ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtkblist->treemodel = gtk_tree_store_new(BLIST_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, + gtkblist->treemodel = gtk_tree_store_new(BLIST_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_POINTER); gtkblist->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(gtkblist->treemodel)); @@ -1206,15 +1206,24 @@ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(gtkblist->treeview), FALSE); + column = gtk_tree_view_column_new (); + rend = gtk_cell_renderer_pixbuf_new(); - column = gtk_tree_view_column_new_with_attributes("Status", rend, "pixbuf", STATUS_ICON_COLUMN, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); + gtk_tree_view_column_pack_start (column, rend, FALSE); + gtk_tree_view_column_set_attributes (column, rend, + "pixbuf", STATUS_ICON_COLUMN, + "visible", STATUS_ICON_VISIBLE_COLUMN, + NULL); g_object_set(rend, "xalign", 0.0, "ypad", 0, NULL); rend = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes("Name", rend, "markup", NAME_COLUMN, NULL); + gtk_tree_view_column_pack_start (column, rend, TRUE); + gtk_tree_view_column_set_attributes (column, rend, + "markup", NAME_COLUMN, + NULL); + g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); - g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL); rend = gtk_cell_renderer_text_new(); gtkblist->warning_column = gtk_tree_view_column_new_with_attributes("Warning", rend, "markup", WARNING_COLUMN, NULL); @@ -1450,8 +1459,6 @@ static void make_a_group(GaimBlistNode *node, GtkTreeIter *iter) { GaimBlistNode *sibling; GtkTreeIter siblingiter; - GdkPixbuf *groupicon = gtk_widget_render_icon(gtkblist->treeview, - GAIM_STOCK_GROUP, GTK_ICON_SIZE_SMALL_TOOLBAR, NULL); struct group *group = (struct group *)node; char *esc = g_markup_escape_text(group->name, -1); char *mark; @@ -1471,12 +1478,12 @@ gtk_tree_store_insert_after(gtkblist->treemodel, iter, NULL, sibling ? &siblingiter : NULL); gtk_tree_store_set(gtkblist->treemodel, iter, - STATUS_ICON_COLUMN, groupicon, + STATUS_ICON_COLUMN, NULL, + STATUS_ICON_VISIBLE_COLUMN, FALSE, NAME_COLUMN, mark, NODE_COLUMN, node, -1); g_free(mark); - g_object_unref(groupicon); } @@ -1596,6 +1603,7 @@ gtk_tree_store_set(gtkblist->treemodel, &iter, STATUS_ICON_COLUMN, status, + STATUS_ICON_VISIBLE_COLUMN, TRUE, NAME_COLUMN, mark, WARNING_COLUMN, warning, IDLE_COLUMN, idle,