Mercurial > pidgin
changeset 4718:8ecc83cad126
[gaim-migrate @ 5030]
dim grey is such a cool color.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 11 Mar 2003 22:31:25 +0000 |
parents | 8708bbf40e40 |
children | da5dc9bc840a |
files | src/buddy.c src/prefs.c |
diffstat | 2 files changed, 35 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy.c Tue Mar 11 21:28:43 2003 +0000 +++ b/src/buddy.c Tue Mar 11 22:31:25 2003 +0000 @@ -184,17 +184,17 @@ if (event->button != 3) return FALSE; - + /* Here we figure out which node was clicked */ if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), event->x, event->y, &path, NULL, NULL, NULL)) return FALSE; gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter, path); gtk_tree_model_get_value (GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &val); node = g_value_get_pointer(&val); - - if (!GAIM_BLIST_NODE_IS_BUDDY(node)) + + if (!GAIM_BLIST_NODE_IS_BUDDY(node)) return FALSE; - + menu = gtk_menu_new(); /* Protocol specific options */ @@ -511,7 +511,7 @@ } - /* Idle gray buddies affects the whole row. This converts the status icon to greyscale. */ + /* Idle grey buddies affects the whole row. This converts the status icon to greyscale. */ if (b->idle && blist_options & OPT_BLIST_GREY_IDLERS) gdk_pixbuf_saturate_and_pixelate(scale, scale, 0, FALSE); return scale; @@ -548,7 +548,7 @@ if (!(blist_options & OPT_BLIST_SHOW_ICONS)) { if (b->idle > 0 && blist_options & OPT_BLIST_GREY_IDLERS) { - text = g_strdup_printf("<span color='gray'>%s</span>", + text = g_strdup_printf("<span color='dim grey'>%s</span>", esc); g_free(esc); return text; @@ -572,11 +572,11 @@ warning = g_strdup_printf(_("Warned (%d%%)"), b->evil); if (b->idle && blist_options & OPT_BLIST_GREY_IDLERS) - text = g_strdup_printf("<span color='grey'>%s</span>\n<span color='gray' size='smaller'>%s %s</span>", + text = g_strdup_printf("<span color='dim grey'>%s</span>\n<span color='dim grey' size='smaller'>%s %s</span>", esc, idletime, warning); else - text = g_strdup_printf("%s\n<span color='gray' size='smaller'>%s %s</span>", esc, idletime, warning); + text = g_strdup_printf("%s\n<span color='dim grey' size='smaller'>%s %s</span>", esc, idletime, warning); if (idletime[0]) g_free(idletime); @@ -675,12 +675,12 @@ g_object_set(rend, "ypad", 0.0, NULL); rend = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes("Warning", rend, "text", WARNING_COLUMN, NULL); + column = gtk_tree_view_column_new_with_attributes("Warning", rend, "markup", WARNING_COLUMN, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); g_object_set(rend, "xalign", 1.0, "ypad", 0.0, NULL); rend = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes("Idle", rend, "text", IDLE_COLUMN, NULL); + column = gtk_tree_view_column_new_with_attributes("Idle", rend, "markup", IDLE_COLUMN, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); g_object_set(rend, "xalign", 1.0, "ypad", 0.0, NULL); @@ -688,7 +688,7 @@ column = gtk_tree_view_column_new_with_attributes("Buddy Icon", rend, "pixbuf", BUDDY_ICON_COLUMN, NULL); g_object_set(rend, "xalign", 1.0, "ypad", 0.0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); - + g_signal_connect(G_OBJECT(gtkblist->treeview), "row-activated", G_CALLBACK(gtk_blist_row_activated_cb), NULL); g_signal_connect(G_OBJECT(gtkblist->treeview), "button-press-event", G_CALLBACK(gtk_blist_button_press_cb), NULL); @@ -893,7 +893,10 @@ time(&t); ihrs = (t - ((struct buddy *)node)->idle) / 3600; imin = ((t - ((struct buddy*)node)->idle) / 60) % 60; - idle = g_strdup_printf("%d:%02d", ihrs, imin); + if(ihrs > 0) + idle = g_strdup_printf("(%d:%02d)", ihrs, imin); + else + idle = g_strdup_printf("(%d)", imin); } if ((((struct buddy*)node)->evil > 0) && @@ -901,6 +904,24 @@ warning = g_strdup_printf("%d%%", ((struct buddy*)node)->evil); } + if((blist_options & OPT_BLIST_GREY_IDLERS) + && ((struct buddy *)node)->idle) { + if(warning) { + char *w2 = g_strdup_printf("<span color='dim grey'>%s</span>", + warning); + g_free(warning); + warning = w2; + } + + if(idle) { + char *i2 = g_strdup_printf("<span color='dim grey'>%s</span>", + idle); + g_free(idle); + idle = i2; + } + } + + gtk_tree_store_set(gtkblist->treemodel, &iter, STATUS_ICON_COLUMN, status, NAME_COLUMN, mark,
--- a/src/prefs.c Tue Mar 11 21:28:43 2003 +0000 +++ b/src/prefs.c Tue Mar 11 22:31:25 2003 +0000 @@ -232,8 +232,8 @@ while (themes) { struct smiley_theme *theme = themes->data; char *description = g_strdup_printf("<span size='larger' weight='bold'>%s</span> - %s\n" - "<span size='smaller' foreground='gray'>%s</span>", - theme->name, theme->author, theme->desc);; + "<span size='smaller' foreground='dim grey'>%s</span>", + theme->name, theme->author, theme->desc); gtk_list_store_append (smiley_theme_store, &iter); pixbuf = gdk_pixbuf_new_from_file(theme->icon, NULL);