# HG changeset patch # User Eric Warmenhoven # Date 991295196 0 # Node ID d51ea669d84e3fb0e46dfb3826c71c553e0bea6b # Parent b1fad054b4f06f362350555f8904d3658faa8741 [gaim-migrate @ 1939] Stephan Dittmann's patch committer: Tailor Script diff -r b1fad054b4f0 -r d51ea669d84e pixmaps/Makefile.am --- a/pixmaps/Makefile.am Thu May 31 01:47:14 2001 +0000 +++ b/pixmaps/Makefile.am Thu May 31 07:46:36 2001 +0000 @@ -12,6 +12,7 @@ available-xa.xpm \ available.xpm \ away.xpm \ + away_big.xpm \ away_icon.xpm \ away_small.xpm \ bgcolor.xpm \ diff -r b1fad054b4f0 -r d51ea669d84e pixmaps/away_big.xpm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/away_big.xpm Thu May 31 07:46:36 2001 +0000 @@ -0,0 +1,45 @@ +/* XPM */ +static char * away_big_xpm[] = { +"24 24 18 1", +" c None", +". c #040404", +"+ c #374236", +"@ c #526E52", +"# c #6E926E", +"$ c #B0B2AB", +"% c #C0C1BD", +"& c #2F342E", +"* c #D8D9D4", +"= c #252925", +"- c #636362", +"; c #9B9B99", +"> c #EBECEA", +", c #1E221E", +"' c #767575", +") c #858683", +"! c #4D4D4D", +"~ c #627E62", +" ", +" ", +" ;+,,,,+; ", +" ,-;%>*%;-, ", +" ,)$>***>>$), ", +" ,)$*%$$$$%$$), ", +" ;-$*$$$$%%)=)$-; ", +" +;>$'-'%%)++;*;+ ", +" ,%*$-&&;;!=;**$, ", +" ,**;$)+&.!;****, ", +" ,**$$$)=&'*****, ", +" ,$*$$%$))%****;, ", +" +;*%$%%%******;+ ", +" ;-$*%$%%*%***$-; ", +" ,)$>*%%%***$), ", +" ,)$*****%$', , ", +" ,-;$**%;-,, ,, ", +" ;+,,,,+@#@,,,,@, ", +" ,@#~@@@@#@, ", +" ,@########@,", +" ,@@@@@@#@, ", +" ,,,,,,@, ", +" ,, ", +" , "}; diff -r b1fad054b4f0 -r d51ea669d84e src/buddy.c --- a/src/buddy.c Thu May 31 01:47:14 2001 +0000 +++ b/src/buddy.c Thu May 31 07:46:36 2001 +0000 @@ -47,6 +47,7 @@ #include "pixmaps/no_icon.xpm" #include "pixmaps/away_small.xpm" +#include "pixmaps/away_big.xpm" #include "pixmaps/add_small.xpm" #include "pixmaps/import_small.xpm" @@ -80,7 +81,7 @@ static GtkWidget *buddypane; static GtkWidget *imchatbox; static GtkWidget *edittree; -static GtkWidget *imbutton, *infobutton, *chatbutton; +static GtkWidget *imbutton, *infobutton, *chatbutton, *awaybutton; static GtkWidget *addbutton, *groupbutton, *rembutton; GtkWidget *blist = NULL; @@ -441,6 +442,7 @@ adjust_pic(rembutton, _("Remove"), (gchar **)gnome_remove_xpm); if (!(display_options & OPT_DISP_NO_BUTTONS)) { + adjust_pic(awaybutton, _("Chat"), (gchar **)away_big_xpm); adjust_pic(chatbutton, _("Chat"), (gchar **)join_xpm); adjust_pic(imbutton, _("IM"), (gchar **)tmp_send_xpm); adjust_pic(infobutton, _("Info"), (gchar **)tb_search_xpm); @@ -1500,6 +1502,32 @@ join_chat(); } +static void away_callback(GtkWidget *widget, GtkTree *tree) +{ + GSList *awy = away_messages; + GtkWidget *menu; + GtkWidget *menuitem; + + if (!awy) + return; + + menu = gtk_menu_new(); + + while (awy) { + struct away_message *a = awy->data; + + menuitem = gtk_menu_item_new_with_label(a->name); + gtk_menu_append(GTK_MENU(menu), menuitem); + gtk_signal_connect(GTK_OBJECT(menuitem), "activate", + GTK_SIGNAL_FUNC(do_away_message), a); + gtk_widget_show(menuitem); + + awy = awy->next; + } + + gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 1, time(NULL)); +} + struct group *find_group(struct gaim_connection *gc, char *group) { struct group *g; @@ -2455,6 +2483,7 @@ imbutton = gtk_button_new_with_label(_("IM")); infobutton = gtk_button_new_with_label(_("Info")); chatbutton = gtk_button_new_with_label(_("Chat")); + awaybutton = gtk_button_new_with_label(_("Away")); imchatbox = gtk_hbox_new(TRUE, 10); @@ -2463,25 +2492,30 @@ gtk_button_set_relief(GTK_BUTTON(imbutton), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(infobutton), GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(chatbutton), GTK_RELIEF_NONE); + gtk_button_set_relief(GTK_BUTTON(awaybutton), GTK_RELIEF_NONE); } /* Put the buttons in the hbox */ gtk_widget_show(imbutton); + gtk_widget_show(infobutton); gtk_widget_show(chatbutton); - gtk_widget_show(infobutton); + gtk_widget_show(awaybutton); gtk_box_pack_start(GTK_BOX(imchatbox), imbutton, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(imchatbox), infobutton, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(imchatbox), chatbutton, TRUE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(imchatbox), awaybutton, TRUE, TRUE, 0); gtk_container_border_width(GTK_CONTAINER(imchatbox), 5); gtk_signal_connect(GTK_OBJECT(imbutton), "clicked", GTK_SIGNAL_FUNC(im_callback), buddies); gtk_signal_connect(GTK_OBJECT(infobutton), "clicked", GTK_SIGNAL_FUNC(info_callback), buddies); gtk_signal_connect(GTK_OBJECT(chatbutton), "clicked", GTK_SIGNAL_FUNC(chat_callback), buddies); + gtk_signal_connect(GTK_OBJECT(awaybutton), "clicked", GTK_SIGNAL_FUNC(away_callback), buddies); gtk_tooltips_set_tip(tips,infobutton, _("Information on selected Buddy"), "Penguin"); gtk_tooltips_set_tip(tips,imbutton, _("Send Instant Message"), "Penguin"); gtk_tooltips_set_tip(tips,chatbutton, _("Start/join a Buddy Chat"), "Penguin"); + gtk_tooltips_set_tip(tips,awaybutton, _("Activate Away Message"), "Penguin"); gtk_box_pack_start(GTK_BOX(buddypane), imchatbox, FALSE, FALSE, 0);