Mercurial > pidgin
changeset 834:bac7089491c1
[gaim-migrate @ 844]
redesigned chat page a bit, and fixed some libfaim stuff. oh, and made some FIXME's more informative.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 02 Sep 2000 12:46:05 +0000 |
parents | 8d8ef8c3afe2 |
children | 88f8f98de02d |
files | libfaim/CHANGES.gaim pixmaps/Makefile.am pixmaps/tb_forward.xpm plugins/ChangeLog src/buddy_chat.c src/conversation.c src/gaim.h src/oscar.c src/prefs.c src/server.c |
diffstat | 10 files changed, 235 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/libfaim/CHANGES.gaim Sat Sep 02 10:57:07 2000 +0000 +++ b/libfaim/CHANGES.gaim Sat Sep 02 12:46:05 2000 +0000 @@ -1,3 +1,8 @@ + +Sat Sep 2 12:32:44 UTC 2000 EWarmenhoven + - Modified chat handling a bit so that if we've signed off, we don't + try to kill the chat connection when the window is closed. This + should get rid of a couple segfaults. Sat Sep 2 02:35:34 UTC 2000 EWarmenhoven - very good news. the very-long-message DOS against libfaim was fixed.
--- a/pixmaps/Makefile.am Sat Sep 02 10:57:07 2000 +0000 +++ b/pixmaps/Makefile.am Sat Sep 02 12:46:05 2000 +0000 @@ -88,6 +88,7 @@ smile_wink.xpm \ speaker.xpm \ strike.xpm \ + tb_forward.xpm \ tb_search.xpm \ think.xpm \ tmp_send.xpm \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/tb_forward.xpm Sat Sep 02 12:46:05 2000 +0000 @@ -0,0 +1,153 @@ +/* XPM */ +static char * tb_forward_xpm[] = { +"24 24 126 2", +" c None", +". c #000000", +"+ c #7B7B78", +"@ c #C7C7C3", +"# c #F1F0EB", +"$ c #BFBFBC", +"% c #5F5E5E", +"& c #E3E3DF", +"* c #F3F3EF", +"= c #F2F2EE", +"- c #F1F1EC", +"; c #F0EFEB", +"> c #D2D2CD", +", c #969592", +"' c #616060", +") c #B5B5B4", +"! c #F8F8F6", +"~ c #F7F7F5", +"{ c #F6F6F3", +"] c #F5F5F2", +"^ c #F4F4F0", +"/ c #F2F1ED", +"( c #F1F0EC", +"_ c #F0EFEA", +": c #EFEEE9", +"< c #4F4F4D", +"[ c #BDBCB8", +"} c #A7A6A3", +"| c #C6C6C4", +"1 c #7C7C7B", +"2 c #525251", +"3 c #DBDBD9", +"4 c #F5F4F1", +"5 c #F4F3F0", +"6 c #F3F2EE", +"7 c #999894", +"8 c #62625F", +"9 c #BCBCB6", +"0 c #EBE9E3", +"a c #838381", +"b c #D7D6D4", +"c c #A8A8A6", +"d c #515150", +"e c #7E7D7C", +"f c #DAD9D5", +"g c #EFEEE8", +"h c #EEEDE7", +"i c #4F4E4C", +"j c #BCBBB6", +"k c #EBE9E2", +"l c #EAE8E1", +"m c #F6F5F2", +"n c #F4F3EF", +"o c #B5B4B1", +"p c #9B9A97", +"q c #646361", +"r c #92918E", +"s c #EEEDE8", +"t c #EDECE6", +"u c #4E4E4C", +"v c #797976", +"w c #797874", +"x c #E9E8E1", +"y c #E8E7DF", +"z c #B4B3AF", +"A c #D0D0CD", +"B c #F2F2ED", +"C c #BFBEBA", +"D c #BEBDB9", +"E c #7A7A77", +"F c #979691", +"G c #EAE9E2", +"H c #959590", +"I c #787773", +"J c #B8B7B0", +"K c #E6E4DC", +"L c #A9A9A6", +"M c #626260", +"N c #ECEBE4", +"O c #EBEAE3", +"P c #E9E7E0", +"Q c #E8E6DF", +"R c #E7E5DD", +"S c #777671", +"T c #93918C", +"U c #BEBDB8", +"V c #989793", +"W c #ECEAE4", +"X c #E8E6DE", +"Y c #E6E4DB", +"Z c #E4E3DA", +"` c #75746F", +" . c #91908A", +".. c #EEECE7", +"+. c #62615F", +"@. c #EBEAE4", +"#. c #E7E6DE", +"$. c #E6E5DC", +"%. c #E5E4DB", +"&. c #E4E2DA", +"*. c #CCCBC4", +"=. c #A3A29D", +"-. c #B6B5B2", +";. c #BCBCB7", +">. c #CDCCC6", +",. c #959490", +"'. c #ECEBE5", +"). c #61615E", +"!. c #E9E8E0", +"~. c #CECDC7", +"{. c #797875", +"]. c #969590", +"^. c #CFCEC8", +"/. c #AEADA8", +"(. c #585754", +"_. c #7B7A76", +":. c #B39C82", +"<. c #BCA488", +"[. c #746554", +"}. c #7D6D5B", +"|. c #867561", +"1. c #8F7D68", +"2. c #98856E", +"3. c #A18D75", +"4. c #AA947B", +"5. c #C5AC8F", +" ", +" ", +" . . . . ", +" . . . . . + @ # $ . ", +" . . . . . % $ & * = - ; > , . ", +" . ' ) ! ~ { ] ^ * / ( _ : < [ } . ", +" . | 1 2 3 4 5 6 / # _ : 7 8 9 0 . ", +" . a b c d e f / # _ g h i j k l . ", +" . m 4 n o p q r s t u v w x y z . ", +" . A * B ( ; C D E u F G H I J K . ", +" . L / ( _ : M t N O l P Q R S T . ", +" . # _ g U V W 0 l P X R Y Z ` .. ", +" . ; g ..+.@.G x y #.$.%.&.*.=.. . ", +" . -.t ;.F G x y #.K >.,.. . . ", +" . '.).G !.Q ~.H . . . ", +" . {.].^./.. . . ", +" . (._.. . . . ", +" . . . :.. ", +" . . . . . . . . :.<.. ", +" . [.}.|.1.2.3.4.:.<.5.. ", +" . [.}.|.1.2.3.4.:.<.5.. ", +" . . . . . . . . :.<.. ", +" . :.. ", +" . . "};
--- a/plugins/ChangeLog Sat Sep 02 10:57:07 2000 +0000 +++ b/plugins/ChangeLog Sat Sep 02 12:46:05 2000 +0000 @@ -10,7 +10,8 @@ have no effect on existing plugins or the way plugins are made. The change was to make my life easier adding perl. It should also make adding new plugin events even easier than before (though I doubt that - any more will ever be added). + any more will ever be added). Also, events are printed to the debug + window. event_buddy_away was being triggered every blist_update for every away buddy. This got fixed, but now when you sign on, event_buddy_away may @@ -23,6 +24,9 @@ conversation is with. This gets triggered when a new conversation window is created, in case you couldn't figure it out on your own. + event_blist_update wasn't being called if you weren't reporting idle + time or if you were idle. This got fixed. + version 0.9.20: It's 3 am the night before finals, it's obviously a good time to hack gaim.
--- a/src/buddy_chat.c Sat Sep 02 10:57:07 2000 +0000 +++ b/src/buddy_chat.c Sat Sep 02 12:46:05 2000 +0000 @@ -33,6 +33,11 @@ #include "convo.h" +#include "pixmaps/tmp_send.xpm" +#include "pixmaps/close.xpm" +#include "pixmaps/tb_search.xpm" + +#include "pixmaps/tb_forward.xpm" #include "pixmaps/join.xpm" #include "pixmaps/cancel.xpm" @@ -109,7 +114,7 @@ if (!joinchat) { joinchat = gtk_window_new(GTK_WINDOW_DIALOG); gtk_window_set_policy(GTK_WINDOW(joinchat), FALSE, FALSE, TRUE); - gtk_widget_show(joinchat); + gtk_widget_realize(joinchat); bbox = gtk_hbox_new(TRUE, 10); topbox = gtk_hbox_new(FALSE, 5); vbox = gtk_vbox_new(FALSE, 5); @@ -517,6 +522,7 @@ GtkWidget *vpaned; GtkWidget *hpaned; GtkWidget *toolbar; + gboolean dispstyle; win = gtk_window_new(GTK_WINDOW_TOPLEVEL); b->window = win; @@ -525,15 +531,18 @@ hpaned = gtk_hpaned_new(); gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE); + gtk_widget_realize(win); - close = gtk_button_new_with_label(_("Close")); - invite_btn = gtk_button_new_with_label(_("Invite")); - whisper = gtk_button_new_with_label(_("Whisper")); - send = gtk_button_new_with_label(_("Send")); + dispstyle = (display_options & OPT_DISP_CHAT_SHOW_TEXT) ? TRUE : FALSE; - im = gtk_button_new_with_label(_("IM")); - ignore = gtk_button_new_with_label(_("Ignore")); - info = gtk_button_new_with_label(_("Info")); + close = picture_button2(win, _("Close"), cancel_xpm, dispstyle); + invite_btn = picture_button2(win, _("Invite"), join_xpm, dispstyle); + whisper = picture_button2(win, _("Whisper"), tb_forward_xpm, dispstyle); + send = picture_button2(win, _("Send"), tmp_send_xpm, dispstyle); + + im = picture_button2(win, _("IM"), tmp_send_xpm, FALSE); + ignore = picture_button2(win, _("Ignore"), close_xpm, FALSE); + info = picture_button2(win, _("Info"), tb_search_xpm, FALSE); if (display_options & OPT_DISP_COOL_LOOK) { @@ -666,6 +675,9 @@ b->smiley_dialog = NULL; b->link_dialog = NULL; b->log_dialog = NULL; + b->send = send; + b->whisper = whisper; + b->invite = invite_btn; b->close = close; sprintf(b->fontface, "%s", fontface); b->hasfont = 0; @@ -742,3 +754,34 @@ } } + +static GtkWidget *change_text(GtkWidget *win, char *text, GtkWidget *button, char **xpm) +{ + gboolean dispstyle = (display_options & OPT_DISP_CHAT_SHOW_TEXT) ? TRUE : FALSE; + GtkWidget *parent = button->parent; + gtk_widget_destroy(button); + button = picture_button2(win, text, xpm, dispstyle); + gtk_box_pack_start(GTK_BOX(parent), button, TRUE, TRUE, 5); + gtk_widget_show(button); + return button; +} + +void update_chat_button_pix() +{ + GList *bcs = buddy_chats; + struct conversation *c; + + while (bcs) { + c = (struct conversation *)bcs->data; + c->send = change_text(c->window, _("Send"), c->send, tmp_send_xpm); + c->whisper = change_text(c->window, _("Whisper"), c->whisper, tb_forward_xpm); + c->invite = change_text(c->window, _("Invite"), c->invite, join_xpm); + c->close = change_text(c->window, _("Close"), c->close, cancel_xpm); + gtk_object_set_user_data(GTK_OBJECT(c->close), c); + gtk_signal_connect(GTK_OBJECT(c->close), "clicked", GTK_SIGNAL_FUNC(close_callback),c); + gtk_signal_connect(GTK_OBJECT(c->send), "clicked", GTK_SIGNAL_FUNC(send_callback),c); + gtk_signal_connect(GTK_OBJECT(c->invite), "clicked", GTK_SIGNAL_FUNC(invite_callback),c); + gtk_signal_connect(GTK_OBJECT(c->whisper), "clicked", GTK_SIGNAL_FUNC(whisper_callback),c); + bcs = bcs->next; + } +}
--- a/src/conversation.c Sat Sep 02 10:57:07 2000 +0000 +++ b/src/conversation.c Sat Sep 02 12:46:05 2000 +0000 @@ -385,7 +385,7 @@ } else { if (c->is_direct) { if (!USE_OSCAR) { - /* FIXME */ + /* Direct IM TOC FIXME */ } else { gdk_input_remove(c->watcher); sprintf(debug_buff, "Closing DirectIM conversation (%p)\n", c->conn);
--- a/src/gaim.h Sat Sep 02 10:57:07 2000 +0000 +++ b/src/gaim.h Sat Sep 02 12:46:05 2000 +0000 @@ -294,6 +294,9 @@ GList *ignored; int id; GtkWidget *list; + GtkWidget *send; + GtkWidget *whisper; + GtkWidget *invite; GtkWidget *close; /* something to distinguish */ @@ -403,7 +406,7 @@ #define TYPE_SIGNOFF 4 #define TYPE_KEEPALIVE 5 -#define REVISION "gaim:$Revision: 840 $" +#define REVISION "gaim:$Revision: 844 $" #define FLAPON "FLAPON\r\n\r\n" #define ROAST "Tic/Toc" @@ -504,6 +507,7 @@ #define OPT_DISP_IGN_WHITE 0x00001000 #define OPT_DISP_NO_BUTTONS 0x00002000 #define OPT_DISP_CONV_SHOW_TEXT 0x00004000 +#define OPT_DISP_CHAT_SHOW_TEXT 0x00008000 extern int sound_options; #define OPT_SOUND_LOGIN 0x00000001 @@ -556,6 +560,7 @@ extern void setup_buddy_chats(); extern void build_imchat_box(gboolean); extern void do_quit(); +extern void update_chat_button_pix();
--- a/src/oscar.c Sat Sep 02 10:57:07 2000 +0000 +++ b/src/oscar.c Sat Sep 02 12:46:05 2000 +0000 @@ -47,7 +47,7 @@ static int inpa = -1; static int paspa = -1; static int cnpa = -1; -struct aim_session_t *gaim_sess; +struct aim_session_t *gaim_sess = NULL; struct aim_conn_t *gaim_conn; int gaim_caps = AIM_CAPS_CHAT | AIM_CAPS_SENDFILE | AIM_CAPS_GETFILE | AIM_CAPS_VOICE | AIM_CAPS_IMIMAGE | AIM_CAPS_BUDDYICON; @@ -260,6 +260,7 @@ inpa = -1; aim_logoff(gaim_sess); g_free(gaim_sess); + gaim_sess = NULL; debug_print(_("Signed off.\n")); }
--- a/src/prefs.c Sat Sep 02 10:57:07 2000 +0000 +++ b/src/prefs.c Sat Sep 02 12:46:05 2000 +0000 @@ -703,6 +703,7 @@ gtk_widget_show(label); gaim_button(_("Show people joining/leaving in window"), &display_options, OPT_DISP_CHAT_LOGON, box); + gaim_button(_("Show buttons with text"), &display_options, OPT_DISP_CHAT_SHOW_TEXT, box); gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_CHAT, box); gtk_widget_show(prefdialog); @@ -1628,6 +1629,8 @@ if (blist) update_button_pix(); + update_chat_button_pix(); + #ifdef USE_APPLET update_pixmaps(); #endif
--- a/src/server.c Sat Sep 02 10:57:07 2000 +0000 +++ b/src/server.c Sat Sep 02 12:46:05 2000 +0000 @@ -37,7 +37,6 @@ static int idle_timer = -1; static time_t lastsent = 0; static time_t login_time = 0; -static struct timeval lag_tv; static int is_idle = 0; int correction_time = 0; @@ -84,10 +83,10 @@ /* Not idle, really... :) */ update_all_buddies(); + plugin_event(event_blist_update, 0, 0, 0); + time(&t); - gettimeofday(&lag_tv, NULL); - if (report_idle != IDLE_GAIM) return TRUE; @@ -100,8 +99,6 @@ is_idle = 1; } - plugin_event(event_blist_update, 0, 0, 0); - return TRUE; } @@ -143,7 +140,7 @@ struct conversation *cnv = find_conversation(name); if (cnv && cnv->is_direct) { if (!USE_OSCAR) { - /* FIXME */ + /* Direct IM TOC FIXME */ } else { sprintf(debug_buff, "Sending DirectIM to %s\n", name); debug_print(debug_buff); @@ -264,7 +261,7 @@ sflap_send(buf, strlen(buf), TYPE_DATA); g_free(buf); } else { - /* FIXME */ + /* Oscar change_passwd FIXME */ } } @@ -565,7 +562,8 @@ if (c != NULL) { oscar_chats = g_list_remove(oscar_chats, c); gdk_input_remove(c->inpa); - aim_conn_kill(gaim_sess, &c->conn); + if (gaim_sess) + aim_conn_kill(gaim_sess, &c->conn); g_free(c->name); g_free(c); } @@ -1015,7 +1013,7 @@ if (!cnv) cnv = new_conversation(name); if (!USE_OSCAR) { - /* FIXME */ + /* Direct IM TOC FIXME */ } else { oscar_do_directim(name); } @@ -1024,7 +1022,7 @@ void serv_got_imimage(char *name, char *cookie, char *ip, struct aim_conn_t *conn, int watcher) { if (!USE_OSCAR) { - /* FIXME */ + /* Direct IM TOC FIXME */ } else { struct conversation *cnv = find_conversation(name); if (!cnv) cnv = new_conversation(name);