Mercurial > pidgin.yaz
changeset 1220:16ea7a3fdbb6
[gaim-migrate @ 1230]
updates to the ICQ plugin. pixmaps stolen from gnomeicu (in case the name didn't give that away)
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 08 Dec 2000 21:28:32 +0000 |
parents | 2528fc35aa32 |
children | 32d2a5e10c08 |
files | ChangeLog STATUS pixmaps/gnomeicu-away.xpm pixmaps/gnomeicu-dnd.xpm pixmaps/gnomeicu-ffc.xpm pixmaps/gnomeicu-na.xpm pixmaps/gnomeicu-occ.xpm pixmaps/gnomeicu-online.xpm plugins/icq/gaim_icq.c |
diffstat | 9 files changed, 560 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Dec 08 12:01:22 2000 +0000 +++ b/ChangeLog Fri Dec 08 21:28:32 2000 +0000 @@ -4,6 +4,7 @@ * Away messages arranged alphabetically (Thanks Justin) * More GUI adjustments * Can optionally run command to play sound files + * Icons for ICQ plugin (blatently stolen from GnomeICU) version 0.11.0-pre2 (12/04/2000): * Fixed a segfault with a bad util.c
--- a/STATUS Fri Dec 08 12:01:22 2000 +0000 +++ b/STATUS Fri Dec 08 21:28:32 2000 +0000 @@ -1,4 +1,4 @@ -STATUS of GAIM CVS tree. Last modified $Date: 2000-11-20 20:00:45 -0500 (Mon, 20 Nov 2000) $ by $Author: warmenhoven $. +STATUS of GAIM CVS tree. Last modified $Date: 2000-12-08 16:28:32 -0500 (Fri, 08 Dec 2000) $ by $Author: warmenhoven $. This file is meant to provide gaim users who use the CVS version to see whether they actually want to compile what they just checked out. Gaim CVS is usually @@ -36,21 +36,6 @@ won't display correctly. -TOC -=== - -TOC is working reasonably well. The options to use a proxy got moved to the -account editor, and are set up on a per-account basis, in case you were -wondering. - - -Oscar -===== - -Oscar is working reasonably well. Please see gaim/libfaim/README.gaim for more -details on Oscar. - - Applet ====== @@ -72,3 +57,45 @@ Perl also got a good reworking, but also has a few more features now. Again, porting from 0.10.x to 0.11.0 should be simple, but read the docs to see what's going on. + + +TOC +=== + +TOC is working reasonably well. The options to use a proxy got moved to the +account editor, and are set up on a per-account basis, in case you were +wondering. TOC can be used to sign into ICQ; though you should use the ICQ +plugin as it offers more functionality. + + +Oscar +===== + +Oscar is working reasonably well. Please see gaim/libfaim/README.gaim for more +details on Oscar. Oscar can be used to sign into ICQ; though you should use the +ICQ plugin as it offers more functionality. + + +Yahoo +===== + +Yahoo currently supports signing on/off, changing status (only to user-defined +so far though), checking other people's status (via right-clicking in the +buddy list), and sending/receiving messages. Chat support is planned but not +yet implemented. + + +IRC +=== + +Rob, I'll let you fill this one in ;) + + +ICQ +=== + +ICQ currently supports signing on/off, changing status (icq-away == aim-idle, +icq-n/a == aim-away), checking other people's status (but not status message), +sending/receiving messages, and receiving URLs. Keepalives are sent regardless +of whether or not you want them; it's necessary since it's a UDP protocol. +Chat and file transfer are planned but not yet implemented.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/gnomeicu-away.xpm Fri Dec 08 21:28:32 2000 +0000 @@ -0,0 +1,43 @@ +/* XPM */ +static char * icon_away_xpm[] = { +"13 12 28 1", +" c None", +". c #8B8B8B", +"+ c #FFFF00", +"@ c #999900", +"# c #7F7F7F", +"$ c #0B483A", +"% c #006DFF", +"& c #093C30", +"* c #4C4C4C", +"= c #0D5645", +"- c #175B40", +"; c #0D5041", +"> c #0E5948", +", c #0E5747", +"' c #84B9FF", +") c #0C4D3E", +"! c #0D5444", +"~ c #0B4639", +"{ c #0B4437", +"] c #0C4F40", +"^ c #0A3F33", +"/ c #0B4A3C", +"( c #0C4B3D", +"_ c #0B3C31", +": c #0E4337", +"< c #0C3F33", +"[ c #09382D", +"} c #09382E", +".++@+...+..# ", +".+@@+$%+@+&#*", +".++++=-+@@+#*", +".;>,',,%++&#*", +".),>%!')~'&#*", +".{)!]])~~^&#*", +".~'/+)('~%_#*", +".^:+@+<[}}&#*", +"##+@+#######*", +" **+.###*****", +" .###* ", +" .#######* "};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/gnomeicu-dnd.xpm Fri Dec 08 21:28:32 2000 +0000 @@ -0,0 +1,34 @@ +/* XPM */ +static char * icon_dnd_xpm[] = { +"15 15 16 1", +" c None", +". c #C1BB7C", +"+ c #CFC395", +"@ c #D2BE94", +"# c #A69C45", +"$ c #A49A43", +"% c #AD9C53", +"& c #908125", +"* c #726751", +"= c #867B23", +"- c #84760E", +"; c #72660E", +"> c #7B4900", +", c #FFFFFF", +"' c #000000", +") c #666666", +" . ", +" +@# ", +" $%& ", +" * =-; * ", +" * > * ", +" * * ", +" * * ", +"*,,,,,,,,,,,,,*", +"*,'',,',','',,*", +"*,',',')',',',*", +"*,',',')',',',*", +"*,'',,',','',,*", +"*,,,,,,,,,,,,,*", +"***************", +" "};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/gnomeicu-ffc.xpm Fri Dec 08 21:28:32 2000 +0000 @@ -0,0 +1,110 @@ +/* XPM */ +static char * icon_ffc_xpm[] = { +"16 16 91 1", +" c None", +". c #000000", +"+ c #A9A943", +"@ c #BFBF4B", +"# c #1A1A0A", +"$ c #B6B648", +"% c #FCFC64", +"& c #EDED5E", +"* c #E5E55A", +"= c #75752E", +"- c #FAFA63", +"; c #DBDB57", +"> c #CBCB50", +", c #DADA56", +"' c #353515", +") c #7F7F32", +"! c #E9E95C", +"~ c #B2B247", +"{ c #D5D555", +"] c #E6E65B", +"^ c #7A7A30", +"/ c #E5E55B", +"( c #566A56", +"_ c #738D73", +": c #738C73", +"< c #7B827B", +"[ c #363615", +"} c #CACA4F", +"| c #28520F", +"1 c #008F00", +"2 c #009B00", +"3 c #009100", +"4 c #578357", +"5 c #535353", +"6 c #282810", +"7 c #FEFE64", +"8 c #FFFF65", +"9 c #20450D", +"0 c #00B000", +"a c #00B500", +"b c #009E00", +"c c #009200", +"d c #1D231D", +"e c #A8A942", +"f c #BEBF4A", +"g c #8F8F38", +"h c #004A00", +"i c #00A800", +"j c #009F00", +"k c #758F75", +"l c #005500", +"m c #005F00", +"n c #006000", +"o c #005E00", +"p c #005A00", +"q c #009000", +"r c #758E75", +"s c #00A600", +"t c #01AA01", +"u c #01A901", +"v c #00AB00", +"w c #00AA00", +"x c #009A00", +"y c #029002", +"z c #598359", +"A c #788778", +"B c #2B8E2B", +"C c #309230", +"D c #2F8F2F", +"E c #2C862C", +"F c #2D8B2D", +"G c #2B832B", +"H c #2A832A", +"I c #2A862A", +"J c #648164", +"K c #454545", +"L c #656565", +"M c #787878", +"N c #808080", +"O c #7E7E7E", +"P c #797979", +"Q c #4F4F4F", +"R c #5F5F5F", +"S c #818181", +"T c #737373", +"U c #383838", +"V c #6F6F6F", +"W c #7F7F7F", +"X c #7D7D7D", +"Y c #717171", +"Z c #525252", +" ", +" ...... ", +" .+@@@@+. ", +" #$%&**&%+. ", +" =--;>>;-,' ", +" )!~~~{~~]^ ", +" ^%%&*/&%%^(_:< ", +" [>-;>};->|12345", +" 6!7777890abc45", +" ..def@ghij345", +" klmnop3bq45", +" rstuvwbxyz5", +" ABCDEFGHIJ5", +" KLLMNOPLLLQ", +" RSOTU ", +" VMWOXYZ "};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/gnomeicu-na.xpm Fri Dec 08 21:28:32 2000 +0000 @@ -0,0 +1,96 @@ +/* XPM */ +static char * icon_na_xpm[] = { +"15 15 78 1", +" c None", +". c #F9F900", +"+ c #F9E100", +"@ c #897B00", +"# c #CFCF2C", +"$ c #888C78", +"% c #7C7E7E", +"& c #B3B300", +"* c #96A911", +"= c #737E61", +"- c #535353", +"; c #8A8F7A", +"> c #86A821", +", c #86AB23", +"' c #AAC95C", +") c #377553", +"! c #1A5F48", +"~ c #91BB62", +"{ c #CCCC00", +"] c #A5B20C", +"^ c #80885F", +"/ c #77817F", +"( c #0C5041", +"_ c #0E5747", +": c #2074B8", +"< c #14606F", +"[ c #508EB2", +"} c #1B6169", +"| c #7BA158", +"1 c #548068", +"2 c #5A6A66", +"3 c #77807E", +"4 c #0B483A", +"5 c #0C5141", +"6 c #0B5455", +"7 c #0B5047", +"8 c #1C5B59", +"9 c #0B4639", +"0 c #124B43", +"a c #124641", +"b c #2A626A", +"c c #54898E", +"d c #A6BA13", +"e c #5F8827", +"f c #165247", +"g c #8CB4A9", +"h c #EEEE00", +"i c #EDED00", +"j c #676740", +"k c #797F7D", +"l c #3E6240", +"m c #98AB13", +"n c #C8C800", +"o c #CECE20", +"p c #3E5D49", +"q c #506837", +"r c #BBBB00", +"s c #BABA00", +"t c #EAEA00", +"u c #454545", +"v c #797951", +"w c #B7B714", +"x c #C7C72A", +"y c #8F8F71", +"z c #7E7E7E", +"A c #87876A", +"B c #A5A526", +"C c #595946", +"D c #767655", +"E c #818181", +"F c #737373", +"G c #383838", +"H c #6F6F6F", +"I c #787878", +"J c #7F7F7F", +"K c #7D7D7D", +"L c #717171", +"M c #525252", +" ", +" .......+.+ ", +" .@..@.+@+. ", +" .@@.@+@+@+ ", +" .@.@@.@@@+ ", +" .@.+@+@+@+#$% ", +" ++++++++++&*=-", +" ;>,')!~{]^-", +" /(_:<[}|12-", +" 34567890a2-", +" 3bcdefghi.j", +" klmnopqrstj", +" uvwxyzABBBC", +" DEzFG ", +" HIJzKLM "};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/gnomeicu-occ.xpm Fri Dec 08 21:28:32 2000 +0000 @@ -0,0 +1,83 @@ +/* XPM */ +static char * icon_occ_xpm[] = { +"15 15 65 1", +" c None", +". c #89898D", +"+ c #80809E", +"@ c #7F7F9E", +"# c #7F7F88", +"$ c #86879A", +"% c #6870ED", +"& c #5F6DED", +"* c #5F6CED", +"= c #5E6CED", +"- c #5C6AEC", +"; c #5969EA", +"> c #636DEB", +", c #797AA0", +"' c #535353", +") c #919394", +"! c #A7BEC9", +"~ c #84ACC0", +"{ c #79A0B4", +"] c #88B0C4", +"^ c #79A0B5", +"/ c #739CB2", +"( c #73A0B7", +"_ c #98B6C5", +": c #8E9395", +"< c #7BA2B6", +"[ c #658B9E", +"} c #6F95A9", +"| c #7AA3B7", +"1 c #6890A3", +"2 c #77A4BB", +"3 c #97B6C5", +"4 c #A5BCC8", +"5 c #85AFC5", +"6 c #82ABC1", +"7 c #80AAC0", +"8 c #83AFC6", +"9 c #7BA8BF", +"0 c #7CABC2", +"a c #97B5C5", +"b c #A6BCC7", +"c c #7FA3B6", +"d c #7294A5", +"e c #7194A5", +"f c #7396A7", +"g c #81A9BD", +"h c #789DB0", +"i c #9DB8C5", +"j c #8B8C8D", +"k c #A1ABB0", +"l c #898C8E", +"m c #6D6C6D", +"n c #656565", +"o c #787878", +"p c #808080", +"q c #7E7E7E", +"r c #797979", +"s c #4F4F4F", +"t c #777777", +"u c #818181", +"v c #737373", +"w c #505050", +"x c #7F7F7F", +"y c #7D7D7D", +"z c #626262", +" .+++@@@+@# ", +" $%&&*=-;>,' ", +" )!~{]^/(_:' ", +" )!<[}|123:' ", +" )4567890a:' ", +" )bcdefghi:' ", +" jkkkkkkkkl' ", +" mnnopqrnnns ", +" tuqvw ", +" qqxqytz ", +" ", +" sss ", +" s s ss ss ", +" s s s s ", +" sss ss ss s "};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/gnomeicu-online.xpm Fri Dec 08 21:28:32 2000 +0000 @@ -0,0 +1,69 @@ +/* XPM */ +static char * icon_online_xpm[] = { +"16 16 50 1", +" c None", +". c #8B8B8B", +"+ c #7F7F7F", +"@ c #00A700", +"# c #00B600", +"$ c #00B100", +"% c #00B400", +"& c #00AB00", +"* c #009C00", +"= c #009E00", +"- c #009D00", +"; c #009700", +"> c #008D00", +", c #4C4C4C", +"' c #00A800", +") c #00CE00", +"! c #00CA00", +"~ c #00C600", +"{ c #00B700", +"] c #00A100", +"^ c #00BC00", +"/ c #00D300", +"( c #00CF00", +"_ c #00CB00", +": c #00CC00", +"< c #00BF00", +"[ c #00A500", +"} c #009900", +"| c #00D100", +"1 c #00C500", +"2 c #00C400", +"3 c #009500", +"4 c #00A200", +"5 c #00B800", +"6 c #00BB00", +"7 c #009400", +"8 c #00AE00", +"9 c #00AD00", +"0 c #00B000", +"a c #00A300", +"b c #00A400", +"c c #019701", +"d c #058E05", +"e c #089C08", +"f c #0A9D0A", +"g c #069406", +"h c #038803", +"i c #028502", +"j c #008600", +"k c #7E7E7E", +" ", +" ", +" ...........+ ", +" .@#$%&*=-;>+, ", +" .')!!!~{];>+, ", +" .^/(_:(<[}>+, ", +" .#)|)12%[3>+, ", +" .4%~56%[[7>+, ", +" .@898%0abcd+, ", +" .7efghgijj>+, ", +" +++k++++++++, ", +" ,,,.+++,,,,, ", +" .+++, ", +" .+++++++, ", +" ", +" "};
--- a/plugins/icq/gaim_icq.c Fri Dec 08 12:01:22 2000 +0000 +++ b/plugins/icq/gaim_icq.c Fri Dec 08 21:28:32 2000 +0000 @@ -5,6 +5,13 @@ #include "prpl.h" /* needed for prpl */ #include "gaim.h" /* needed for every other damn thing */ +#include "pixmaps/gnomeicu-online.xpm" +#include "pixmaps/gnomeicu-away.xpm" +#include "pixmaps/gnomeicu-dnd.xpm" +#include "pixmaps/gnomeicu-na.xpm" +#include "pixmaps/gnomeicu-occ.xpm" +#include "pixmaps/gnomeicu-ffc.xpm" + struct icq_data { ICQLINK *link; int cur_status; @@ -99,12 +106,16 @@ g_free(tmp); } -static void icq_user_online(ICQLINK *link, unsigned long uin, unsigned long status, +static void icq_user_online(ICQLINK *link, unsigned long uin, unsigned long st, unsigned long ip, unsigned short port, unsigned long real_ip, unsigned char tcp_flags) { struct gaim_connection *gc = find_gaim_conn_by_icq_link(link); - char buf[256]; g_snprintf(buf, sizeof buf, "%lu", uin); - serv_got_update(gc, buf, 1, 0, 0, 0, (status==STATUS_ONLINE) ? UC_NORMAL : UC_UNAVAILABLE, 0); + guint status; + char buf[256]; + + g_snprintf(buf, sizeof buf, "%lu", uin); + status = (st == STATUS_ONLINE) ? UC_NORMAL : UC_UNAVAILABLE | (st << 5); + serv_got_update(gc, buf, 1, 0, 0, 0, status, 0); } static void icq_user_offline(ICQLINK *link, unsigned long uin) { @@ -113,10 +124,14 @@ serv_got_update(gc, buf, 0, 0, 0, 0, 0, 0); } -static void icq_user_status(ICQLINK *link, unsigned long uin, unsigned long status) { +static void icq_user_status(ICQLINK *link, unsigned long uin, unsigned long st) { struct gaim_connection *gc = find_gaim_conn_by_icq_link(link); - char buf[256]; g_snprintf(buf, sizeof buf, "%lu", uin); - serv_got_update(gc, buf, 1, 0, 0, 0, (status==STATUS_ONLINE) ? UC_NORMAL : UC_UNAVAILABLE, 0); + guint status; + char buf[256]; + + g_snprintf(buf, sizeof buf, "%lu", uin); + status = (st == STATUS_ONLINE) ? UC_NORMAL : UC_UNAVAILABLE | (st << 5); + serv_got_update(gc, buf, 1, 0, 0, 0, status, 0); } static gint icq_set_timeout_cb(struct icq_data *id) { @@ -162,6 +177,22 @@ signoff(gc); } +static void icq_info_reply(struct icq_link *link, unsigned long uin, const char *nick, + const char *first, const char *last, const char *email, char auth) { + char buf[16 * 1024]; + + g_snprintf(buf, sizeof buf, + "<B>UIN:</B> %lu<BR>" + "<B>Nick:</B> %s<BR>" + "<B>Name:</B> %s %s<BR>" + "<B>Email:</B> %s\n", + uin, + nick, + first, last, + email); + g_show_info_text(buf); +} + static void icq_login(struct aim_user *user) { struct gaim_connection *gc = new_gaim_conn(user); struct icq_data *id = gc->proto_data = g_new0(struct icq_data, 1); @@ -179,6 +210,7 @@ link->icq_UserOnline = icq_user_online; link->icq_UserOffline = icq_user_offline; link->icq_UserStatusUpdate = icq_user_status; + link->icq_InfoReply = icq_info_reply; link->icq_WrongPassword = icq_wrong_passwd; link->icq_InvalidUIN = icq_invalid_uin; link->icq_Log = icq_do_log; @@ -259,15 +291,58 @@ } } +static char **icq_list_icon(int uc) { + guint status; + if (uc == UC_NORMAL) + return icon_online_xpm; + status = uc >> 5; + if (status & STATUS_NA) + return icon_na_xpm; + if (status & STATUS_DND) + return icon_dnd_xpm; + if (status & STATUS_OCCUPIED) + return icon_occ_xpm; + if (status & STATUS_AWAY) + return icon_away_xpm; + if (status & STATUS_FREE_CHAT) + return icon_ffc_xpm; + if (status & STATUS_INVISIBLE) + return NULL; + return icon_online_xpm; +} + +static void icq_get_info(struct gaim_connection *gc, char *who) { + struct icq_data *id = (struct icq_data *)gc->proto_data; + icq_SendInfoReq(id->link, atol(who)); +} + +static void icq_info(GtkObject *obj, char *who) { + serv_get_info(gtk_object_get_user_data(obj), who); +} + +static void icq_action_menu(GtkWidget *menu, struct gaim_connection *gc, char *who) { + GtkWidget *button; + + button = gtk_menu_item_new_with_label(_("Get Info")); + gtk_signal_connect(GTK_OBJECT(button), "activate", + GTK_SIGNAL_FUNC(icq_info), who); + gtk_object_set_user_data(GTK_OBJECT(button), gc); + gtk_menu_append(GTK_MENU(menu), button); + gtk_widget_show(button); +} + static void icq_init(struct prpl *ret) { ret->protocol = PROTO_ICQ; ret->name = icq_name; + ret->list_icon = icq_list_icon; + ret->action_menu = icq_action_menu; ret->login = icq_login; ret->close = icq_close; ret->send_im = icq_send_msg; ret->add_buddy = icq_add_buddy; ret->add_buddies = icq_add_buddies; ret->remove_buddy = icq_rem_buddy; + ret->get_info = icq_get_info; ret->set_away = icq_set_away; ret->keepalive = icq_keepalive;