# HG changeset patch # User Nathan Walp # Date 1047421885 0 # Node ID 8ecc83cad126328236b44341f91a18351e480b04 # Parent 8708bbf40e4051b86dcc4ae84b678d343b272cdb [gaim-migrate @ 5030] dim grey is such a cool color. committer: Tailor Script diff -r 8708bbf40e40 -r 8ecc83cad126 src/buddy.c --- 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("%s", + text = g_strdup_printf("%s", 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("%s\n%s %s", + text = g_strdup_printf("%s\n%s %s", esc, idletime, warning); else - text = g_strdup_printf("%s\n%s %s", esc, idletime, warning); + text = g_strdup_printf("%s\n%s %s", 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("%s", + warning); + g_free(warning); + warning = w2; + } + + if(idle) { + char *i2 = g_strdup_printf("%s", + idle); + g_free(idle); + idle = i2; + } + } + + gtk_tree_store_set(gtkblist->treemodel, &iter, STATUS_ICON_COLUMN, status, NAME_COLUMN, mark, diff -r 8708bbf40e40 -r 8ecc83cad126 src/prefs.c --- 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("%s - %s\n" - "%s", - theme->name, theme->author, theme->desc);; + "%s", + theme->name, theme->author, theme->desc); gtk_list_store_append (smiley_theme_store, &iter); pixbuf = gdk_pixbuf_new_from_file(theme->icon, NULL);