Mercurial > pidgin
changeset 1242:8cb5c1000ea9
[gaim-migrate @ 1252]
i'm spiderman
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 12 Dec 2000 15:52:24 +0000 |
parents | 1881b8c12350 |
children | 6c05af408b71 |
files | ChangeLog src/buddy.c src/gaim.h src/prefs.c |
diffstat | 4 files changed, 37 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Dec 12 13:54:53 2000 +0000 +++ b/ChangeLog Tue Dec 12 15:52:24 2000 +0000 @@ -6,6 +6,7 @@ * Can optionally run command to play sound files * Icons for ICQ plugin (blatently stolen from GnomeICU) * Icons for Yahoo plugin (not-so-blatently stolen from GTKYahoo) + * Optionally display warning level next to name in buddy list version 0.11.0-pre2 (12/04/2000): * Fixed a segfault with a bad util.c
--- a/src/buddy.c Tue Dec 12 13:54:53 2000 +0000 +++ b/src/buddy.c Tue Dec 12 15:52:24 2000 +0000 @@ -1590,11 +1590,15 @@ b->label = gtk_label_new(buddy->show); gtk_misc_set_alignment(GTK_MISC(b->label), 0.0, 0.5); - gtk_box_pack_start(GTK_BOX(box), b->label, TRUE, TRUE, 1); + gtk_box_pack_start(GTK_BOX(box), b->label, FALSE, FALSE, 1); gtk_widget_show(b->label); + b->warn = gtk_label_new(""); + gtk_box_pack_start(GTK_BOX(box), b->warn, FALSE, FALSE, 1); + gtk_widget_show(b->warn); + b->idle = gtk_label_new(""); - gtk_box_pack_start(GTK_BOX(box), b->idle, FALSE, FALSE, 1); + gtk_box_pack_end(GTK_BOX(box), b->idle, FALSE, FALSE, 1); gtk_widget_show(b->idle); gs->members = g_slist_insert(gs->members, b, pos); @@ -1725,7 +1729,7 @@ * if it's not the one you were hoping for then you're shit out of luck */ static void update_idle_time(struct buddy_show *bs) { /* this also updates the tooltip since that has idle time in it */ - char idlet[16]; + char idlet[16], warnl[16]; time_t t; int ihrs, imin; struct buddy *b; @@ -1764,10 +1768,17 @@ itime = g_malloc(1); itime[0] = 0; } - if (b->evil) + if (b->evil) { g_snprintf(warn, sizeof warn, _("Warnings: %d%%\n"), b->evil); - else + g_snprintf(warnl, sizeof warnl, "(%d%%)", b->evil); + } else { warn[0] = '\0'; + warnl[0] = '\0'; + } + gtk_widget_hide(bs->warn); + gtk_label_set(GTK_LABEL(bs->warn), warnl); + if (display_options & OPT_DISP_SHOW_WARN) + gtk_widget_show(bs->warn); if (b->caps) g_snprintf(caps, sizeof caps, _("Capabilities: %s\n"), caps_string(b->caps));
--- a/src/gaim.h Tue Dec 12 13:54:53 2000 +0000 +++ b/src/gaim.h Tue Dec 12 15:52:24 2000 +0000 @@ -227,6 +227,7 @@ GtkWidget *item; GtkWidget *pix; GtkWidget *label; + GtkWidget *warn; GtkWidget *idle; char *name; char *show; @@ -467,6 +468,7 @@ #define OPT_DISP_NO_MT_GRP 0x00040000 #define OPT_DISP_CONV_BUTTON_XPM 0x00080000 #define OPT_DISP_CHAT_BUTTON_XPM 0x00100000 +#define OPT_DISP_SHOW_WARN 0x00200000 extern int sound_options; #define OPT_SOUND_LOGIN 0x00000001
--- a/src/prefs.c Tue Dec 12 13:54:53 2000 +0000 +++ b/src/prefs.c Tue Dec 12 15:52:24 2000 +0000 @@ -181,10 +181,26 @@ gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); gtk_widget_show(label); - gaim_button(_("Show numbers in groups"), &display_options, OPT_DISP_SHOW_GRPNUM, box); + gaim_button(_("Save Window Size/Position"), &general_options, OPT_GEN_SAVED_WINDOWS, box); +#ifdef USE_APPLET + gaim_button(_("Automatically show buddy list on sign on"), &general_options, OPT_GEN_APP_BUDDY_SHOW, box); + gaim_button(_("Display Buddy List near applet"), &general_options, OPT_GEN_NEAR_APPLET, box); +#endif + + sep = gtk_hseparator_new(); + gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); + gtk_widget_show(sep); + gaim_button(_("Hide groups with no online buddies"), &display_options, OPT_DISP_NO_MT_GRP, box); + gaim_button(_("Show numbers in groups"), &display_options, OPT_DISP_SHOW_GRPNUM, box); + + sep = gtk_hseparator_new(); + gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); + gtk_widget_show(sep); + + gaim_button(_("Show buddy type icons"), &display_options, OPT_DISP_SHOW_PIXMAPS, box); + gaim_button(_("Show warning levels"), &display_options, OPT_DISP_SHOW_WARN, box); gaim_button(_("Show idle times"), &display_options, OPT_DISP_SHOW_IDLETIME, box); - gaim_button(_("Show buddy type icons"), &display_options, OPT_DISP_SHOW_PIXMAPS, box); sep = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); @@ -193,16 +209,6 @@ gaim_button(_("Hide IM/Info/Chat buttons"), &display_options, OPT_DISP_NO_BUTTONS, box); gaim_button(_("Show pictures on buttons"), &display_options, OPT_DISP_SHOW_BUTTON_XPM, box); - sep = gtk_hseparator_new(); - gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); - gtk_widget_show(sep); - - gaim_button(_("Save Window Size/Position"), &general_options, OPT_GEN_SAVED_WINDOWS, box); -#ifdef USE_APPLET - gaim_button(_("Automatically show buddy list on sign on"), &general_options, OPT_GEN_APP_BUDDY_SHOW, box); - gaim_button(_("Display Buddy List near applet"), &general_options, OPT_GEN_NEAR_APPLET, box); -#endif - gtk_widget_show(prefdialog); }