You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric W. <war...@us...> - 2001-10-08 20:37:35
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv21418 Modified Files: configure.ac Log Message: Jim Knoble says: $ prefix=/usr $ exec_prefix='${prefix}' $ bindir='${exec_prefix}/bin' $ echo "--- bindir is ${bindir}" --- bindir is ${exec_prefix}/bin $ eval echo "--- bindir is ${bindir}" --- bindir is ${prefix}/bin $ eval eval echo "--- bindir is ${bindir}" ^^^^^^^^^^^ --- bindir is /usr/bin ^^^^^^^^^^ $ Be sure to comment that so that no one tries using any weird quotes or shell metacharacters there. Stupid shells. Where's the fvcking recursive expansion operator? Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- configure.ac 2001/10/05 22:08:13 1.19 +++ configure.ac 2001/10/08 20:37:32 1.20 @@ -394,7 +394,7 @@ echo echo Print debugging messages.... : $enable_debug echo -echo Gaim will be installed in $prefix/bin. +eval eval echo Gaim will be installed in $bindir. if test "x$gaimpath" != "x" ; then echo Warning: You have an old copy of gaim at $gaimpath. fi |
From: Eric W. <war...@us...> - 2001-10-08 20:30:48
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv20049 Modified Files: conn.c Log Message: this was fvcking stupid Index: conn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/conn.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- conn.c 2001/08/15 19:23:03 1.2 +++ conn.c 2001/10/08 20:30:45 1.3 @@ -272,9 +272,9 @@ { if (!session) return 0; + yahoo_logoff(session); if (session->name) g_free(session->name); - yahoo_logoff(session); session->name = NULL; while (session->connlist) yahoo_close(session, session->connlist->data); |
From: Eric W. <war...@us...> - 2001-10-08 15:07:45
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv7207 Modified Files: about.c Log Message: bmiller's patch Index: about.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/about.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- about.c 2001/10/05 21:05:04 1.49 +++ about.c 2001/10/08 15:07:42 1.50 @@ -101,24 +101,26 @@ vbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); gtk_container_add(GTK_CONTAINER(about), vbox); + gtk_widget_show(vbox); frame = gtk_frame_new("Gaim " VERSION); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); + gtk_widget_show(frame); fbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); gtk_container_add(GTK_CONTAINER(frame), fbox); + gtk_widget_show(fbox); /* Left side, TOP */ style = gtk_widget_get_style(about); pm = gdk_pixmap_create_from_xpm_d(about->window, &bm, &style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo); pixmap = gtk_pixmap_new(pm, bm); - gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); - gtk_box_pack_start(GTK_BOX(fbox), pixmap, FALSE, FALSE, 0); + gtk_widget_show(pixmap); label = gtk_label_new( @@ -127,23 +129,21 @@ "IRC: #gaim on irc.openprojects.net")); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - gtk_box_pack_start(GTK_BOX(fbox), label, TRUE, TRUE, 0); + gtk_widget_show(label); text = gtk_text_new(NULL, NULL); - gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, _("Rob Flynn (maintainer) ro...@ma...\nEric Warmenhoven (lead coder) war...@ya...\n\nBenjamin Miller\nDecklin Foster\nJim Duchek\nMark Spencer (original author) mar...@ma..."), 198); - - gtk_widget_show(text); - gtk_box_pack_start(GTK_BOX(fbox), text, TRUE, TRUE, 0); + gtk_widget_show(text); /* Close Button */ hbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show(hbox); button = picture_button(about, _("Close"), cancel_xpm); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); @@ -168,13 +168,10 @@ button = picture_button(about, _("Web Site"), about_small_xpm); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(about_click), NULL); - - if (misc_options & OPT_MISC_COOL_LOOK) - gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); } /* Let's give'em something to talk about -- woah woah woah */ - gtk_widget_show_all(about); + gtk_widget_show(about); } |
From: Eric W. <war...@us...> - 2001-10-08 03:22:56
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv15360 Modified Files: conversation.c Log Message: hi there. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.274 retrieving revision 1.275 diff -u -d -r1.274 -r1.275 --- conversation.c 2001/10/08 01:12:57 1.274 +++ conversation.c 2001/10/08 03:22:53 1.275 @@ -1367,10 +1367,13 @@ /* XXX CUI: this is really bad and should be moved somewhere else later. */ if (!c->is_chat && c->gc) { int index = g_slist_index(connections, c->gc); + int sconv = strlen(c->name); int sname = strlen(who); int swhat = strlen(what); UI_build_broadcast(CUI_TYPE_MESSAGE, CUI_MESSAGE_RECV, sizeof(index), &index, + sizeof(sconv), &sconv, + sconv, c->name, sizeof(sname), &sname, sname, who, sizeof(flags), &flags, |
From: Eric W. <war...@us...> - 2001-10-08 01:13:00
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv24967 Modified Files: conversation.c Log Message: chat shouldn't go through CUI_MESSAGE. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.273 retrieving revision 1.274 diff -u -d -r1.273 -r1.274 --- conversation.c 2001/10/08 01:12:02 1.273 +++ conversation.c 2001/10/08 01:12:57 1.274 @@ -1365,7 +1365,7 @@ } /* XXX CUI: this is really bad and should be moved somewhere else later. */ - if (c->gc) { + if (!c->is_chat && c->gc) { int index = g_slist_index(connections, c->gc); int sname = strlen(who); int swhat = strlen(what); |
From: Eric W. <war...@us...> - 2001-10-08 01:12:05
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv24840 Modified Files: conversation.c core.c core.h Log Message: i hope this works Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.272 retrieving revision 1.273 diff -u -d -r1.272 -r1.273 --- conversation.c 2001/10/04 15:57:10 1.272 +++ conversation.c 2001/10/08 01:12:02 1.273 @@ -1334,27 +1334,11 @@ char buf2[BUF_LONG]; char mdate[64]; - if (!c->is_chat && !g_list_find(conversations, c)) - return; - if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c))) return; - - strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); - - gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COMMENTS; - - if (convo_options & OPT_CONVO_IGNORE_COLOUR) - gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COLOURS; - - if (convo_options & OPT_CONVO_IGNORE_FONTS) - gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_FONTS; - if (convo_options & OPT_CONVO_IGNORE_SIZES) - gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_SIZES; - - if (!(logging_options & OPT_LOG_STRIP_HTML)) - gtk_font_options = gtk_font_options ^ GTK_IMHTML_RETURN_LOG; + if (!c->is_chat && !g_list_find(conversations, c)) + return; if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) { if (!who) { @@ -1380,6 +1364,36 @@ } } + /* XXX CUI: this is really bad and should be moved somewhere else later. */ + if (c->gc) { + int index = g_slist_index(connections, c->gc); + int sname = strlen(who); + int swhat = strlen(what); + UI_build_broadcast(CUI_TYPE_MESSAGE, CUI_MESSAGE_RECV, + sizeof(index), &index, + sizeof(sname), &sname, + sname, who, + sizeof(flags), &flags, + sizeof(swhat), &swhat, + swhat, what, + sizeof(mtime), &mtime, -1); + } + + strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); + + gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COMMENTS; + + if (convo_options & OPT_CONVO_IGNORE_COLOUR) + gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COLOURS; + + if (convo_options & OPT_CONVO_IGNORE_FONTS) + gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_FONTS; + + if (convo_options & OPT_CONVO_IGNORE_SIZES) + gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_SIZES; + + if (!(logging_options & OPT_LOG_STRIP_HTML)) + gtk_font_options = gtk_font_options ^ GTK_IMHTML_RETURN_LOG; if (flags & WFLAG_SYSTEM) { if (convo_options & OPT_CONVO_SHOW_TIME) Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- core.c 2001/10/06 06:21:01 1.10 +++ core.c 2001/10/08 01:12:02 1.11 @@ -34,12 +34,50 @@ #include <errno.h> #include <signal.h> #include <getopt.h> +#include <stdarg.h> #include "gaim.h" static gint UI_fd = -1; GSList *uis = NULL; +static guchar *UI_build(int *len, guchar type, guchar subtype, va_list args1) +{ + va_list args2; + guchar *buffer; + int pos; + int size; + void *data; + + G_VA_COPY(args2, args1); + + buffer = g_malloc(sizeof(guchar) * 2 + 4); + *len = sizeof(guchar) * 2 + 4; + pos = 0; + + memcpy(buffer + pos, &type, sizeof(type)); pos += sizeof(type); + memcpy(buffer + pos, &subtype, sizeof(subtype)); pos += sizeof(subtype); + + /* we come back and do size last */ + pos += 4; + + size = va_arg(args2, int); + while (size != -1) { + *len += size; + buffer = g_realloc(buffer, *len); + + data = va_arg(args2, void *); + memcpy(buffer + pos, data, size); + pos += size; + + size = va_arg(args2, int); + } + + va_end(args2); + + return buffer; +} + gint UI_write(struct UI *ui, guchar *data, gint len) { guchar *send = g_new0(guchar, len + 6); @@ -53,6 +91,21 @@ return sent; } +void UI_build_write(struct UI *ui, guchar type, guchar subtype, ...) +{ + va_list ap; + gchar *data; + int len; + + va_start(ap, subtype); + data = UI_build(&len, type, subtype, ap); + va_end(ap); + + UI_write(ui, data, len); + + g_free(data); +} + void UI_broadcast(guchar *data, gint len) { GSList *u = uis; @@ -63,6 +116,24 @@ } } +void UI_build_broadcast(guchar type, guchar subtype, ...) +{ + va_list ap; + gchar *data; + int len; + + if (!uis) + return; + + va_start(ap, subtype); + data = UI_build(&len, type, subtype, ap); + va_end(ap); + + UI_broadcast(data, len); + + g_free(data); +} + static void meta_handler(struct UI *ui, guchar subtype, guchar *data) { switch (subtype) { @@ -290,9 +361,11 @@ case CUI_TYPE_BUDDY: buddy_handler(ui, subtype, in); break; + */ case CUI_TYPE_MESSAGE: message_handler(ui, subtype, in); break; + /* case CUI_TYPE_CHAT: chat_handler(ui, subtype, in); break; Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- core.h 2001/10/06 04:37:34 1.6 +++ core.h 2001/10/08 01:12:02 1.7 @@ -156,7 +156,9 @@ /* Functions in core.c */ extern gint UI_write(struct UI *, guchar *, int); +extern void UI_build_write(struct UI *, guchar, guchar, ...); extern void UI_broadcast(guchar *data, int); +extern void UI_build_broadcast(guchar, guchar, ...); /* Don't ever use these; when gaim-core is done these will be * merged into the core's main() and won't be called directly */ extern int core_main(); |
From: Eric W. <war...@us...> - 2001-10-06 06:21:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv29919 Modified Files: core.c Log Message: fuck you too dennis Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- core.c 2001/10/06 04:37:34 1.9 +++ core.c 2001/10/06 06:21:01 1.10 @@ -92,6 +92,7 @@ static void plugin_handler(struct UI *ui, guchar subtype, guchar *data) { +#ifdef GAIM_PLUGINS guint id; struct gaim_plugin *p; @@ -124,6 +125,7 @@ debug_printf("unhandled plugin subtype %d\n", subtype); break; } +#endif } static void user_handler(struct UI *ui, guchar subtype, guchar *data) |
From: Eric W. <war...@us...> - 2001-10-06 05:41:27
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv12669 Modified Files: multi.c Log Message: hello Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- multi.c 2001/10/06 05:34:44 1.90 +++ multi.c 2001/10/06 05:41:25 1.91 @@ -517,8 +517,8 @@ if (u->user) { gtk_entry_set_text(GTK_ENTRY(name), u->user->username); gtk_entry_set_text(GTK_ENTRY(pass), u->user->password); + gtk_entry_set_editable(GTK_ENTRY(name), FALSE); } - gtk_entry_set_editable(GTK_ENTRY(name), FALSE); } static void generate_prpl_options(struct mod_user *u, GtkWidget *book) |
From: Eric W. <war...@us...> - 2001-10-06 05:34:47
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv10098 Modified Files: multi.c Log Message: hi Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- multi.c 2001/10/06 04:05:50 1.89 +++ multi.c 2001/10/06 05:34:44 1.90 @@ -424,7 +424,8 @@ GtkWidget *browse; GtkWidget *reset; - g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", u->user->iconfile); + if (u->user) + g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", u->user->iconfile); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); @@ -513,8 +514,10 @@ u->rempass = rempass; u->checkmail = checkmail; u->iconsel = iconsel; - gtk_entry_set_text(GTK_ENTRY(name), u->user->username); - gtk_entry_set_text(GTK_ENTRY(pass), u->user->password); + if (u->user) { + gtk_entry_set_text(GTK_ENTRY(name), u->user->username); + gtk_entry_set_text(GTK_ENTRY(pass), u->user->password); + } gtk_entry_set_editable(GTK_ENTRY(name), FALSE); } |
From: Eric W. <war...@us...> - 2001-10-06 04:37:37
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv19347 Modified Files: core.c core.h module.c Log Message: it can send ims. Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- core.c 2001/10/06 02:49:18 1.8 +++ core.c 2001/10/06 04:37:34 1.9 @@ -90,6 +90,42 @@ } } +static void plugin_handler(struct UI *ui, guchar subtype, guchar *data) +{ + guint id; + struct gaim_plugin *p; + + switch (subtype) { + /* + case CUI_PLUGIN_LIST: + break; + */ + case CUI_PLUGIN_LOAD: + p = load_plugin(data); + /* XXX need to broadcast to UIs that plugin has been loaded */ + break; + case CUI_PLUGIN_UNLOAD: + memcpy(&id, data, sizeof(id)); + p = g_list_nth_data(plugins, id); + if (p) { + unload_plugin(p); + /* XXX need to broadcast to UIs that plugin has been unloaded */ + } + break; + case CUI_PLUGIN_RELOAD: + memcpy(&id, data, sizeof(id)); + p = g_list_nth_data(plugins, id); + if (p) { + p = reload_plugin(p); + /* XXX need to broadcast to UIs that plugin has been reloaded */ + } + break; + default: + debug_printf("unhandled plugin subtype %d\n", subtype); + break; + } +} + static void user_handler(struct UI *ui, guchar subtype, guchar *data) { guint id; @@ -117,6 +153,53 @@ break; default: debug_printf("unhandled user subtype %d\n", subtype); + break; + } +} + +static void message_handler(struct UI *ui, guchar subtype, guchar *data) +{ + switch (subtype) { + case CUI_MESSAGE_LIST: + break; + case CUI_MESSAGE_SEND: + if (!data) + return; + { + guint id; + struct gaim_connection *gc; + guint len; + char *who, *msg; + gint flags; + int pos = 0; + + memcpy(&id, data + pos, sizeof(id)); + pos += sizeof(id); + gc = g_slist_nth_data(connections, id); + if (!gc) + return; + + memcpy(&len, data + pos, sizeof(len)); + pos += sizeof(len); + who = g_strndup(data + pos, len + 1); + pos += len; + + memcpy(&len, data + pos, sizeof(len)); + pos += sizeof(len); + msg = g_strndup(data + pos, len + 1); + pos += len; + + memcpy(&flags, data + pos, sizeof(flags)); + serv_send_im(gc, who, msg, flags); + + g_free(who); + g_free(msg); + } + break; + case CUI_MESSAGE_RECV: + break; + default: + debug_printf("unhandled message subtype %d\n", subtype); break; } } Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- core.h 2001/10/06 04:05:50 1.5 +++ core.h 2001/10/06 04:37:34 1.6 @@ -187,7 +187,6 @@ extern void remove_all_plugins(); #endif extern int plugin_event(enum gaim_event, void *, void *, void *, void *); -extern void plugin_handler(struct UI *, guchar, guchar *); /* Functions in server.c */ extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort); Index: module.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/module.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- module.c 2001/10/06 02:49:18 1.6 +++ module.c 2001/10/06 04:37:34 1.7 @@ -524,39 +524,3 @@ } } #endif - -void plugin_handler(struct UI *ui, guchar subtype, guchar *data) -{ - guint id; - struct gaim_plugin *p; - - switch (subtype) { - /* - case CUI_PLUGIN_LIST: - break; - */ - case CUI_PLUGIN_LOAD: - p = load_plugin(data); - /* XXX need to broadcast to UIs that plugin has been loaded */ - break; - case CUI_PLUGIN_UNLOAD: - memcpy(&id, data, sizeof(id)); - p = g_list_nth_data(plugins, id); - if (p) { - unload_plugin(p); - /* XXX need to broadcast to UIs that plugin has been unloaded */ - } - break; - case CUI_PLUGIN_RELOAD: - memcpy(&id, data, sizeof(id)); - p = g_list_nth_data(plugins, id); - if (p) { - p = reload_plugin(p); - /* XXX need to broadcast to UIs that plugin has been reloaded */ - } - break; - default: - debug_printf("unhandled plugin subtype %d\n", subtype); - break; - } -} |
From: Eric W. <war...@us...> - 2001-10-06 04:05:56
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv8644/src Modified Files: core.h gaim.h multi.c ui.h Log Message: aim_user is split. mod_user probably only needs to be in multi.c but eh. moved struct conversation to ui.h. still need to create struct buddy_chat for the prpls to use. Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- core.h 2001/10/06 02:25:46 1.4 +++ core.h 2001/10/06 04:05:50 1.5 @@ -41,6 +41,22 @@ #define UC_NORMAL 8 #define UC_UNAVAILABLE 16 +struct aim_user { + char username[64]; + char password[32]; + char user_info[2048]; + int options; + int protocol; + /* prpls can use this to save information about the user, + * like which server to connect to, etc */ + char proto_opt[7][256]; + + /* buddy icon file */ + char iconfile[256]; + + struct gaim_connection *gc; +}; + enum gaim_event { event_signon = 0, event_signoff, Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.280 retrieving revision 1.281 diff -u -d -r1.280 -r1.281 --- gaim.h 2001/10/06 02:49:18 1.280 +++ gaim.h 2001/10/06 04:05:50 1.281 @@ -124,51 +124,6 @@ #endif #endif -struct aim_user { - char username[64]; - char password[32]; - char user_info[2048]; - int options; - int protocol; - /* prpls can use this to save information about the user, - * like which server to connect to, etc */ - char proto_opt[7][256]; - - /* buddy icon file */ - char iconfile[256]; - - struct gaim_connection *gc; - - /* CUI: everything below here should be in struct mod_aim_user */ - - /* stuff for modify window */ - GtkWidget *mod; - GtkWidget *main; - GtkWidget *name; - GtkWidget *pwdbox; - GtkWidget *pass; - GtkWidget *rempass; - int tmp_options; - int tmp_protocol; - GList *opt_entries; - - /* stuff for password prompt */ - GtkWidget *passprmt; - GtkWidget *passentry; - - /* stuff for icon selection */ - char tmp_iconfile[256]; - GtkWidget *iconsel; - GtkWidget *iconentry; - GtkWidget *icondlg; - - /* stuff for mail check prompt */ - GtkWidget *checkmail; - - /* when you get kicked offline, only show one dialog */ - GtkWidget *kick_dlg; -}; - #define OPT_USR_AUTO 0x00000001 /*#define OPT_USR_KEEPALV 0x00000002 this shouldn't be optional */ #define OPT_USR_REM_PASS 0x00000004 @@ -207,85 +162,6 @@ int protocol; int options; -}; - -/* struct buddy_chat went away and got merged with this. */ -struct conversation { - struct gaim_connection *gc; - - /* stuff used for both IM and chat */ - GtkWidget *window; - char name[80]; - GtkWidget *text; - GtkWidget *entry; - GtkWidget *italic; - GtkWidget *bold; - GtkWidget *underline; - GtkWidget *fgcolorbtn; - GtkWidget *bgcolorbtn; - GtkWidget *link; - GtkWidget *wood; - GtkWidget *log_button; - GtkWidget *strike; - GtkWidget *font; - GtkWidget *smiley; - GtkWidget *fg_color_dialog; - GtkWidget *bg_color_dialog; - GtkWidget *font_dialog; - GtkWidget *smiley_dialog; - GtkWidget *link_dialog; - GtkWidget *log_dialog; - int makesound; - char fontface[128]; - int hasfont; - int fontsize; - int hassize; - GdkColor bgcol; - int hasbg; - GdkColor fgcol; - int hasfg; - - GString *history; - - GtkWidget *send; - - /* stuff used just for IM */ - GtkWidget *lbox; - GtkWidget *bbox; - GtkWidget *sw; - GtkWidget *info; - GtkWidget *warn; - GtkWidget *block; - GtkWidget *add; - GtkWidget *sep1; - GtkWidget *sep2; - GtkWidget *menu; - GtkWidget *check; - gboolean unseen; - -#if USE_PIXBUF - /* buddy icon stuff. sigh. */ - GtkWidget *icon; - GdkPixbuf *unanim; - GdkPixbufAnimation *anim; - guint32 icon_timer; - int frame; -#endif - - /* stuff used just for chat */ - GList *in_room; - GList *ignored; - char *topic; - int id; - GtkWidget *count; - GtkWidget *list; - GtkWidget *whisper; - GtkWidget *invite; - GtkWidget *close; - GtkWidget *topic_text; - - /* something to distinguish */ - gboolean is_chat; }; #define CONVERSATION_TITLE "%s - Gaim" Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- multi.c 2001/10/06 00:10:29 1.88 +++ multi.c 2001/10/06 04:05:50 1.89 @@ -44,17 +44,25 @@ static GtkWidget *acctedit = NULL; static GtkWidget *list = NULL; /* the clist of names in the accteditor */ -static GtkWidget *newmod = NULL; /* the dialog for creating a new account */ -static GtkWidget *newmain = NULL; /* the notebook that holds options */ -static struct aim_user tmpusr = { "", "", "", OPT_USR_REM_PASS, DEFAULT_PROTO, - {"", "", "", "", "", "", ""}, "", NULL, NULL, NULL, NULL, NULL, NULL, NULL, - OPT_USR_REM_PASS, DEFAULT_PROTO, NULL, NULL, NULL, "", NULL, NULL, NULL, NULL, NULL -}; -static void generate_prpl_options(struct aim_user *, GtkWidget *); +static GSList *mod_users = NULL; + +static struct mod_user *find_mod_user(struct aim_user *a) +{ + GSList *m = mod_users; + while (m) { + struct mod_user *u = m->data; + if (u->user == a) + return u; + m = m->next; + } + return NULL; +} +static void generate_prpl_options(struct mod_user *, GtkWidget *); + struct mod_usr_opt { - struct aim_user *user; + struct mod_user *user; int opt; }; @@ -181,23 +189,15 @@ return win; } -static void delmod(GtkWidget *w, struct aim_user *u) +static void delmod(GtkWidget *w, struct mod_user *u) { - gtk_widget_destroy(w); - if (u) { - u->mod = NULL; - } else { - newmod = NULL; - } + mod_users = g_slist_remove(mod_users, u); + g_free(u); } static void mod_opt(GtkWidget *b, struct mod_usr_opt *m) { - if (m->user) { - m->user->tmp_options = m->user->tmp_options ^ m->opt; - } else { - tmpusr.options = tmpusr.options ^ m->opt; - } + m->user->options = m->user->options ^ m->opt; } static void free_muo(GtkWidget *b, struct mod_usr_opt *m) @@ -205,16 +205,12 @@ g_free(m); } -static GtkWidget *acct_button(const char *text, struct aim_user *u, int option, GtkWidget *box) +static GtkWidget *acct_button(const char *text, struct mod_user *u, int option, GtkWidget *box) { GtkWidget *button; struct mod_usr_opt *muo = g_new0(struct mod_usr_opt, 1); button = gtk_check_button_new_with_label(text); - if (u) { - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (u->options & option)); - } else { - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (tmpusr.options & option)); - } + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (u->options & option)); gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0); muo->user = u; muo->opt = option; @@ -224,103 +220,76 @@ return button; } -static void ok_mod(GtkWidget *w, struct aim_user *u) +static void ok_mod(GtkWidget *w, struct mod_user *u) { GList *tmp; const char *txt; int i; - - if (u) { - u->options = u->tmp_options; - u->protocol = u->tmp_protocol; - txt = gtk_entry_get_text(GTK_ENTRY(u->pass)); - if (u->options & OPT_USR_REM_PASS) - g_snprintf(u->password, sizeof(u->password), "%s", txt); - else - u->password[0] = '\0'; - i = gtk_clist_find_row_from_data(GTK_CLIST(list), u); - gtk_clist_set_text(GTK_CLIST(list), i, 2, - (u->options & OPT_USR_AUTO) ? "True" : "False"); - gtk_clist_set_text(GTK_CLIST(list), i, 3, proto_name(u->protocol)); - - tmp = u->opt_entries; - while (tmp) { - GtkEntry *entry = tmp->data; - int pos = (int)gtk_object_get_user_data(GTK_OBJECT(entry)); - g_snprintf(u->proto_opt[pos], sizeof(u->proto_opt[pos]), "%s", - gtk_entry_get_text(entry)); - tmp = tmp->next; - } - if (u->opt_entries) - g_list_free(u->opt_entries); - u->opt_entries = NULL; + struct aim_user *a; - g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", u->tmp_iconfile); - if (u->icondlg) - gtk_widget_destroy(u->icondlg); - u->icondlg = NULL; + if (!u->user) { + txt = gtk_entry_get_text(GTK_ENTRY(u->name)); + u->user = new_user(txt, u->protocol, u->options); + } + a = u->user; - gtk_widget_destroy(u->mod); - } else { - txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.name)); - u = new_user(txt, tmpusr.protocol, tmpusr.options); + a->options = u->options; + a->protocol = u->protocol; + txt = gtk_entry_get_text(GTK_ENTRY(u->pass)); + if (a->options & OPT_USR_REM_PASS) + g_snprintf(a->password, sizeof(a->password), "%s", txt); + else + a->password[0] = '\0'; - txt = gtk_entry_get_text(GTK_ENTRY(tmpusr.pass)); - g_snprintf(u->password, sizeof(u->password), "%s", txt); + i = gtk_clist_find_row_from_data(GTK_CLIST(list), a); + gtk_clist_set_text(GTK_CLIST(list), i, 2, + (a->options & OPT_USR_AUTO) ? "True" : "False"); + gtk_clist_set_text(GTK_CLIST(list), i, 3, proto_name(a->protocol)); - tmp = tmpusr.opt_entries; - while (tmp) { - GtkEntry *entry = tmp->data; - int pos = (int)gtk_object_get_user_data(GTK_OBJECT(entry)); - g_snprintf(u->proto_opt[pos], sizeof(u->proto_opt[pos]), "%s", + tmp = u->opt_entries; + while (tmp) { + GtkEntry *entry = tmp->data; + int pos = (int)gtk_object_get_user_data(GTK_OBJECT(entry)); + g_snprintf(a->proto_opt[pos], sizeof(a->proto_opt[pos]), "%s", gtk_entry_get_text(entry)); - tmp = tmp->next; - } - if (tmpusr.opt_entries) - g_list_free(tmpusr.opt_entries); - tmpusr.opt_entries = NULL; + tmp = tmp->next; + } + if (u->opt_entries) + g_list_free(u->opt_entries); + u->opt_entries = NULL; - g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", tmpusr.tmp_iconfile); - if (tmpusr.icondlg) - gtk_widget_destroy(tmpusr.icondlg); - tmpusr.icondlg = NULL; + g_snprintf(a->iconfile, sizeof(a->iconfile), "%s", u->iconfile); + if (u->icondlg) + gtk_widget_destroy(u->icondlg); + u->icondlg = NULL; - gtk_widget_destroy(newmod); - } + gtk_widget_destroy(u->mod); + save_prefs(); } -static void cancel_mod(GtkWidget *w, struct aim_user *u) +static void cancel_mod(GtkWidget *w, struct mod_user *u) { - if (u) { - if (u->opt_entries) - g_list_free(u->opt_entries); - u->opt_entries = NULL; - gtk_widget_destroy(u->mod); - if (u->icondlg) - gtk_widget_destroy(u->icondlg); - u->icondlg = NULL; - } else { - if (tmpusr.opt_entries) - g_list_free(tmpusr.opt_entries); - tmpusr.opt_entries = NULL; - gtk_widget_destroy(newmod); - if (tmpusr.icondlg) - gtk_widget_destroy(tmpusr.icondlg); - tmpusr.icondlg = NULL; - } + if (u->opt_entries) + g_list_free(u->opt_entries); + u->opt_entries = NULL; + if (u->icondlg) + gtk_widget_destroy(u->icondlg); + u->icondlg = NULL; + gtk_widget_destroy(u->mod); } static void set_prot(GtkWidget *opt, int proto) { - struct aim_user *u = gtk_object_get_user_data(GTK_OBJECT(opt)); + struct mod_user *u = gtk_object_get_user_data(GTK_OBJECT(opt)); struct prpl *p, *q; q = find_prpl(proto); - if (u && (u->tmp_protocol != proto)) { + if (u->protocol != proto) { int i; for (i = 0; i < 7; i++) u->proto_opt[i][0] = '\0'; - p = find_prpl(u->tmp_protocol); + p = find_prpl(u->protocol); + if (!(p->options & OPT_PROTO_NO_PASSWORD) && (q->options & OPT_PROTO_NO_PASSWORD)) { gtk_widget_hide(u->pwdbox); gtk_widget_hide(u->rempass); @@ -333,41 +302,19 @@ } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { gtk_widget_hide(u->checkmail); } + if (!(p->options & OPT_PROTO_BUDDY_ICON) && (q->options & OPT_PROTO_BUDDY_ICON)) { gtk_widget_show(u->iconsel); } else if ((p->options & OPT_PROTO_BUDDY_ICON) && !(q->options & OPT_PROTO_BUDDY_ICON)) { gtk_widget_hide(u->iconsel); } - u->tmp_protocol = proto; + + u->protocol = proto; generate_prpl_options(u, u->main); - } else if (!u && (tmpusr.tmp_protocol != proto)) { - int i; - for (i = 0; i < 7; i++) - tmpusr.proto_opt[i][0] = '\0'; - p = find_prpl(tmpusr.tmp_protocol); - if (!(p->options & OPT_PROTO_NO_PASSWORD) && (q->options & OPT_PROTO_NO_PASSWORD)) { - gtk_widget_hide(tmpusr.pwdbox); - gtk_widget_hide(tmpusr.rempass); - } else if ((p->options & OPT_PROTO_NO_PASSWORD) && !(q->options & OPT_PROTO_NO_PASSWORD)) { - gtk_widget_show(tmpusr.pwdbox); - gtk_widget_show(tmpusr.rempass); - } - if (!(p->options & OPT_PROTO_MAIL_CHECK) && (q->options & OPT_PROTO_MAIL_CHECK)) { - gtk_widget_show(tmpusr.checkmail); - } else if ((p->options & OPT_PROTO_MAIL_CHECK) && !(q->options & OPT_PROTO_MAIL_CHECK)) { - gtk_widget_hide(tmpusr.checkmail); - } - if (!(p->options & OPT_PROTO_BUDDY_ICON) && (q->options & OPT_PROTO_BUDDY_ICON)) { - gtk_widget_show(tmpusr.iconsel); - } else if ((p->options & OPT_PROTO_BUDDY_ICON) && !(q->options & OPT_PROTO_BUDDY_ICON)) { - gtk_widget_hide(tmpusr.iconsel); - } - tmpusr.tmp_protocol = tmpusr.protocol = proto; - generate_prpl_options(NULL, newmain); } } -static GtkWidget *make_protocol_menu(GtkWidget *box, struct aim_user *u) +static GtkWidget *make_protocol_menu(GtkWidget *box, struct mod_user *u) { GtkWidget *optmenu; GtkWidget *menu; @@ -385,17 +332,10 @@ while (p) { e = (struct prpl *)p->data; - if (u) { - if (e->protocol == u->tmp_protocol) - found = TRUE; - if (!found) - count++; - } else { - if (e->protocol == tmpusr.tmp_protocol) - found = TRUE; - if (!found) - count++; - } + if (e->protocol == u->protocol) + found = TRUE; + if (!found) + count++; if (e->name) opt = gtk_menu_item_new_with_label((*e->name)()); else @@ -414,7 +354,7 @@ return optmenu; } -static void des_icon_sel(GtkWidget *w, struct aim_user *u) +static void des_icon_sel(GtkWidget *w, struct mod_user *u) { w = u->icondlg; if (u->icondlg) @@ -423,44 +363,41 @@ gtk_widget_destroy(w); } -static void set_icon(GtkWidget *w, struct aim_user *u) +static void set_icon(GtkWidget *w, struct mod_user *u) { - GtkWidget *sel = u ? u->icondlg : tmpusr.icondlg; + GtkWidget *sel = u->icondlg; char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sel)); if (file_is_dir(file, sel)) return; - if (u) { - gtk_entry_set_text(GTK_ENTRY(u->iconentry), file); - g_snprintf(u->tmp_iconfile, sizeof(u->tmp_iconfile), "%s", file); - u->icondlg = NULL; - } else { - gtk_entry_set_text(GTK_ENTRY(tmpusr.iconentry), file); - g_snprintf(tmpusr.tmp_iconfile, sizeof(tmpusr.tmp_iconfile), "%s", file); - tmpusr.icondlg = NULL; - } + gtk_entry_set_text(GTK_ENTRY(u->iconentry), file); + g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", file); + u->icondlg = NULL; gtk_widget_destroy(sel); } -static void sel_icon_dlg(GtkWidget *w, struct aim_user *u) +static void sel_icon_dlg(GtkWidget *w, struct mod_user *u) { GtkWidget *dlg; char buf[256]; - if ((u && u->icondlg) || (!u && tmpusr.icondlg)) { - if (u) - gtk_widget_show(u->icondlg); - else - gtk_widget_show(tmpusr.icondlg); + if (u->icondlg) { + gtk_widget_show(u->icondlg); return; } dlg = gtk_file_selection_new(_("Gaim - Load Buddy Icon")); gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(dlg)); - g_snprintf(buf, sizeof(buf), "%s/", g_get_home_dir()); - gtk_file_selection_set_filename(GTK_FILE_SELECTION(dlg), buf); + if (u->iconfile) { + char *tmp = g_dirname(u->iconfile); + gtk_file_selection_set_filename(GTK_FILE_SELECTION(dlg), tmp); + g_free(tmp); + } else { + g_snprintf(buf, sizeof(buf), "%s/", g_get_home_dir()); + gtk_file_selection_set_filename(GTK_FILE_SELECTION(dlg), buf); + } gtk_signal_connect(GTK_OBJECT(dlg), "destroy", GTK_SIGNAL_FUNC(des_icon_sel), u); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dlg)->cancel_button), "clicked", @@ -468,26 +405,18 @@ gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(dlg)->ok_button), "clicked", GTK_SIGNAL_FUNC(set_icon), u); - if (u) - u->icondlg = dlg; - else - tmpusr.icondlg = dlg; + u->icondlg = dlg; gtk_widget_show(dlg); } -static void reset_icon(GtkWidget *w, struct aim_user *u) +static void reset_icon(GtkWidget *w, struct mod_user *u) { - if (u) { - u->tmp_iconfile[0] = 0; - gtk_entry_set_text(GTK_ENTRY(u->iconentry), ""); - } else { - tmpusr.tmp_iconfile[0] = 0; - gtk_entry_set_text(GTK_ENTRY(tmpusr.iconentry), ""); - } + u->iconfile[0] = 0; + gtk_entry_set_text(GTK_ENTRY(u->iconentry), ""); } -static GtkWidget *build_icon_selection(struct aim_user *u, GtkWidget *box) +static GtkWidget *build_icon_selection(struct mod_user *u, GtkWidget *box) { GtkWidget *hbox; GtkWidget *label; @@ -495,10 +424,7 @@ GtkWidget *browse; GtkWidget *reset; - if (u) - g_snprintf(u->tmp_iconfile, sizeof(u->tmp_iconfile), "%s", u->iconfile); - else - g_snprintf(tmpusr.tmp_iconfile, sizeof(tmpusr.tmp_iconfile), "%s", tmpusr.iconfile); + g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", u->user->iconfile); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); @@ -509,17 +435,11 @@ gtk_widget_show(label); name = gtk_entry_new(); - if (u) - gtk_entry_set_text(GTK_ENTRY(name), u->iconfile); - else - gtk_entry_set_text(GTK_ENTRY(name), tmpusr.iconfile); + gtk_entry_set_text(GTK_ENTRY(name), u->iconfile); gtk_entry_set_editable(GTK_ENTRY(name), FALSE); gtk_box_pack_start(GTK_BOX(hbox), name, TRUE, TRUE, 5); gtk_widget_show(name); - if (u) - u->iconentry = name; - else - tmpusr.iconentry = name; + u->iconentry = name; browse = gtk_button_new_with_label(_("Browse")); gtk_signal_connect(GTK_OBJECT(browse), "clicked", GTK_SIGNAL_FUNC(sel_icon_dlg), u); @@ -534,7 +454,7 @@ return hbox; } -static void generate_general_options(struct aim_user *u, GtkWidget *book) +static void generate_general_options(struct mod_user *u, GtkWidget *book) { GtkWidget *vbox; GtkWidget *hbox; @@ -587,35 +507,30 @@ gtk_widget_show_all(vbox); - if (u) { - u->name = name; - u->pwdbox = pwdbox; - u->pass = pass; - u->rempass = rempass; - u->checkmail = checkmail; - u->iconsel = iconsel; - gtk_entry_set_text(GTK_ENTRY(name), u->username); - gtk_entry_set_text(GTK_ENTRY(pass), u->password); - gtk_entry_set_editable(GTK_ENTRY(name), FALSE); - } else { - tmpusr.name = name; - tmpusr.pwdbox = pwdbox; - tmpusr.pass = pass; - tmpusr.rempass = rempass; - tmpusr.checkmail = checkmail; - tmpusr.iconsel = iconsel; - } + u->name = name; + u->pwdbox = pwdbox; + u->pass = pass; + u->rempass = rempass; + u->checkmail = checkmail; + u->iconsel = iconsel; + gtk_entry_set_text(GTK_ENTRY(name), u->user->username); + gtk_entry_set_text(GTK_ENTRY(pass), u->user->password); + gtk_entry_set_editable(GTK_ENTRY(name), FALSE); } -static void generate_prpl_options(struct aim_user *u, GtkWidget *book) +static void generate_prpl_options(struct mod_user *u, GtkWidget *book) { - struct prpl *p; + struct prpl *p = find_prpl(u->protocol); - if (u) - p = find_prpl(u->tmp_protocol); - else - p = find_prpl(tmpusr.protocol); + GList *op, *tmp; + + GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *label; + GtkWidget *entry; + char buf[256]; + /* page 0 is general, keep it. page 1 is options for our * particular protocol, so clear it out and make a new one. */ @@ -624,66 +539,53 @@ if (!p) return; - if (u && u->opt_entries) { + if (u->opt_entries) { g_list_free(u->opt_entries); u->opt_entries = NULL; - } else if (!u && tmpusr.opt_entries) { - g_list_free(tmpusr.opt_entries); - tmpusr.opt_entries = NULL; } - if (p->user_opts) { - GList *op = (*p->user_opts)(); - GList *tmp = op; - - GtkWidget *vbox; - GtkWidget *hbox; - GtkWidget *label; - GtkWidget *entry; + if (!p->user_opts) + return; - char buf[256]; + tmp = op = (*p->user_opts)(); - vbox = gtk_vbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); - g_snprintf(buf, sizeof(buf), "%s Options", (*p->name)()); - gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(buf)); - gtk_widget_show(vbox); + vbox = gtk_vbox_new(FALSE, 5); + gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); + g_snprintf(buf, sizeof(buf), "%s Options", (*p->name)()); + gtk_notebook_append_page(GTK_NOTEBOOK(book), vbox, gtk_label_new(buf)); + gtk_widget_show(vbox); - while (op) { - struct proto_user_opt *puo = op->data; + while (op) { + struct proto_user_opt *puo = op->data; - hbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - gtk_widget_show(hbox); + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show(hbox); - label = gtk_label_new(puo->label); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - gtk_widget_show(label); + label = gtk_label_new(puo->label); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + gtk_widget_show(label); - entry = gtk_entry_new(); - gtk_box_pack_end(GTK_BOX(hbox), entry, FALSE, FALSE, 0); - gtk_object_set_user_data(GTK_OBJECT(entry), (void *)puo->pos); - if (u && u->proto_opt[puo->pos][0]) { - debug_printf("setting text %s\n", u->proto_opt[puo->pos]); - gtk_entry_set_text(GTK_ENTRY(entry), u->proto_opt[puo->pos]); - } else { - gtk_entry_set_text(GTK_ENTRY(entry), puo->def); - } - gtk_widget_show(entry); + entry = gtk_entry_new(); + gtk_box_pack_end(GTK_BOX(hbox), entry, FALSE, FALSE, 0); + gtk_object_set_user_data(GTK_OBJECT(entry), (void *)puo->pos); + if (u->proto_opt[puo->pos][0]) { + debug_printf("setting text %s\n", u->proto_opt[puo->pos]); + gtk_entry_set_text(GTK_ENTRY(entry), u->proto_opt[puo->pos]); + } else { + gtk_entry_set_text(GTK_ENTRY(entry), puo->def); + } + gtk_widget_show(entry); - if (u) - u->opt_entries = g_list_append(u->opt_entries, entry); - else - tmpusr.opt_entries = g_list_append(tmpusr.opt_entries, entry); + u->opt_entries = g_list_append(u->opt_entries, entry); - g_free(puo); - op = op->next; - } - g_list_free(tmp); + g_free(puo); + op = op->next; } + g_list_free(tmp); } -static void show_acct_mod(struct aim_user *u) +static void show_acct_mod(struct aim_user *a) { /* here we can have all the aim_user options, including ones not shown in the main acctedit * window. this can keep the size of the acctedit window small and readable, and make this @@ -699,11 +601,32 @@ struct prpl *p; - if (!u && newmod) { - gtk_widget_show(newmod); - return; - } - if (u && u->mod) { + struct mod_user *u = find_mod_user(a); + + if (!u) { + u = g_new0(struct mod_user, 1); + u->user = a; + mod_users = g_slist_append(mod_users, u); + + if (a) { + u->options = a->options; + if (find_prpl(a->protocol)) + u->protocol = a->protocol; + else if (protocols) + u->protocol = ((struct prpl *)protocols->data)->protocol; + else + u->protocol = -1; + g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", a->iconfile); + } else { + u->options = OPT_USR_REM_PASS; + if (find_prpl(DEFAULT_PROTO)) + u->protocol = DEFAULT_PROTO; + else if (protocols) + u->protocol = ((struct prpl *)protocols->data)->protocol; + else + u->protocol = -1; + } + } else { gtk_widget_show(u->mod); return; } @@ -725,21 +648,6 @@ gtk_box_pack_start(GTK_BOX(box), book, FALSE, FALSE, 0); gtk_widget_show(book); - if (u) { - if (find_prpl(u->protocol)) - u->tmp_protocol = u->protocol; - else if (protocols) - u->tmp_protocol = ((struct prpl *)protocols->data)->protocol; - else - u->tmp_protocol = -1; - } else { - if (find_prpl(tmpusr.protocol)) - tmpusr.tmp_protocol = tmpusr.protocol; - else if (protocols) - tmpusr.tmp_protocol = ((struct prpl *)protocols->data)->protocol; - else - tmpusr.tmp_protocol = -1; - } generate_general_options(u, book); generate_prpl_options(u, book); @@ -757,36 +665,18 @@ gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_mod), u); gtk_widget_show(button); - if (u) { - u->mod = mod; - u->main = book; /* sorry, i think i broke the joke :) */ - u->tmp_options = u->options; - } else { - newmod = mod; - newmain = book; - } + u->mod = mod; + u->main = book; /* sorry, i think i broke the joke :) */ - if (u) { - p = find_prpl(u->tmp_protocol); - if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { - gtk_widget_hide(u->pwdbox); - gtk_widget_hide(u->rempass); - } - if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) - gtk_widget_hide(u->checkmail); - if (p && (!(p->options & OPT_PROTO_BUDDY_ICON))) - gtk_widget_hide(u->iconsel); - } else { - p = find_prpl(tmpusr.tmp_protocol); - if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { - gtk_widget_hide(tmpusr.pwdbox); - gtk_widget_hide(tmpusr.rempass); - } - if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) - gtk_widget_hide(tmpusr.checkmail); - if (p && (!(p->options & OPT_PROTO_BUDDY_ICON))) - gtk_widget_hide(tmpusr.iconsel); + p = find_prpl(u->protocol); + if (p && (p->options & OPT_PROTO_NO_PASSWORD)) { + gtk_widget_hide(u->pwdbox); + gtk_widget_hide(u->rempass); } + if (p && (!(p->options & OPT_PROTO_MAIL_CHECK))) + gtk_widget_hide(u->checkmail); + if (p && (!(p->options & OPT_PROTO_BUDDY_ICON))) + gtk_widget_hide(u->iconsel); gtk_widget_show(mod); } @@ -812,28 +702,45 @@ } } -static void pass_des(GtkWidget *w, struct aim_user *u) +struct pass_prompt { + struct aim_user *u; + GtkWidget *win; + GtkWidget *entry; +}; +static GSList *passes = NULL; + +static struct pass_prompt *find_pass_prompt(struct aim_user *u) { - gtk_widget_destroy(w); - u->passprmt = NULL; + GSList *p = passes; + while (p) { + struct pass_prompt *r = p->data; + if (r->u == u) + return r; + p = p->next; + } + return NULL; } -static void pass_cancel(GtkWidget *w, struct aim_user *u) +static void pass_des(GtkWidget *w, struct pass_prompt *p) { - gtk_widget_destroy(u->passprmt); - u->passprmt = NULL; + passes = g_slist_remove(passes, p); + g_free(p); } -static void pass_signon(GtkWidget *w, struct aim_user *u) +static void pass_cancel(GtkWidget *w, struct pass_prompt *p) { - const char *txt = gtk_entry_get_text(GTK_ENTRY(u->passentry)); - g_snprintf(u->password, sizeof(u->password), "%s", txt); + gtk_widget_destroy(p->win); +} + +static void pass_signon(GtkWidget *w, struct pass_prompt *p) +{ + const char *txt = gtk_entry_get_text(GTK_ENTRY(p->entry)); + g_snprintf(p->u->password, sizeof(p->u->password), "%s", txt); #ifdef USE_APPLET set_user_state(signing_on); #endif - gtk_widget_destroy(u->passprmt); - u->passprmt = NULL; - serv_login(u); + serv_login(p->u); + gtk_widget_destroy(p->win); } static void do_pass_dlg(struct aim_user *u) @@ -845,20 +752,26 @@ char buf[96]; GtkWidget *label; GtkWidget *button; + struct pass_prompt *p = find_pass_prompt(u); - if (u->passprmt) { - gtk_widget_show(u->passprmt); + if (p) { + gtk_widget_show(p->win); return; } - u->passprmt = gtk_window_new(GTK_WINDOW_DIALOG); - gtk_window_set_wmclass(GTK_WINDOW(u->passprmt), "password", "Gaim"); - gtk_container_border_width(GTK_CONTAINER(u->passprmt), 5); - gtk_signal_connect(GTK_OBJECT(u->passprmt), "destroy", GTK_SIGNAL_FUNC(pass_des), u); - gtk_widget_realize(u->passprmt); - aol_icon(u->passprmt->window); + p = g_new0(struct pass_prompt, 1); + p->u = u; + passes = g_slist_append(passes, p); + + p->win = gtk_window_new(GTK_WINDOW_DIALOG); + gtk_window_set_wmclass(GTK_WINDOW(p->win), "password", "Gaim"); + gtk_container_border_width(GTK_CONTAINER(p->win), 5); + gtk_signal_connect(GTK_OBJECT(p->win), "destroy", GTK_SIGNAL_FUNC(pass_des), p); + gtk_widget_realize(p->win); + aol_icon(p->win->window); + frame = gtk_frame_new(_("Enter Password")); - gtk_container_add(GTK_CONTAINER(u->passprmt), frame); + gtk_container_add(GTK_CONTAINER(p->win), frame); gtk_widget_show(frame); vbox = gtk_vbox_new(FALSE, 5); @@ -874,26 +787,26 @@ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_widget_show(label); - u->passentry = gtk_entry_new(); - gtk_entry_set_visibility(GTK_ENTRY(u->passentry), FALSE); - gtk_box_pack_start(GTK_BOX(hbox), u->passentry, FALSE, FALSE, 5); - gtk_signal_connect(GTK_OBJECT(u->passentry), "activate", GTK_SIGNAL_FUNC(pass_signon), u); - gtk_widget_grab_focus(u->passentry); - gtk_widget_show(u->passentry); + p->entry = gtk_entry_new(); + gtk_entry_set_visibility(GTK_ENTRY(p->entry), FALSE); + gtk_box_pack_start(GTK_BOX(hbox), p->entry, FALSE, FALSE, 5); + gtk_signal_connect(GTK_OBJECT(p->entry), "activate", GTK_SIGNAL_FUNC(pass_signon), p); + gtk_widget_grab_focus(p->entry); + gtk_widget_show(p->entry); hbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); gtk_widget_show(hbox); - button = picture_button(u->passprmt, _("Cancel"), cancel_xpm); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pass_cancel), u); + button = picture_button(p->win, _("Cancel"), cancel_xpm); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pass_cancel), p); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); - button = picture_button(u->passprmt, _("Signon"), ok_xpm); - gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pass_signon), u); + button = picture_button(p->win, _("Signon"), ok_xpm); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pass_signon), p); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5); - gtk_widget_show(u->passprmt); + gtk_widget_show(p->win); } static void acct_signin(GtkWidget *w, gpointer d) @@ -1232,21 +1145,42 @@ gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, message); } -static void set_kick_null(GtkObject *obj, struct aim_user *u) +struct kick_dlg { + struct aim_user *user; + GtkWidget *dlg; +}; +static GSList *kicks = NULL; + +static struct kick_dlg *find_kick_dlg(struct aim_user *u) { - u->kick_dlg = NULL; + GSList *k = kicks; + while (k) { + struct kick_dlg *d = k->data; + if (d->user == u) + return d; + k = k->next; + } + return NULL; +} + +static void set_kick_null(GtkObject *obj, struct kick_dlg *k) +{ + kicks = g_slist_remove(kicks, k); + g_free(k); } void hide_login_progress(struct gaim_connection *gc, char *why) { char buf[2048]; + struct kick_dlg *k = find_kick_dlg(gc->user); struct signon_meter *meter = find_signon_meter(gc); sprintf(buf, _("%s\n%s was unable to sign on: %s"), full_date(), gc->username, why); - if (gc->user->kick_dlg) - gtk_widget_destroy(gc->user->kick_dlg); - gc->user->kick_dlg = do_error_dialog(buf, _("Signon Error")); - gtk_signal_connect(GTK_OBJECT(gc->user->kick_dlg), "destroy", - GTK_SIGNAL_FUNC(set_kick_null), gc->user); + if (k) + gtk_widget_destroy(k->dlg); + k = g_new0(struct kick_dlg, 1); + k->user = gc->user; + k->dlg = do_error_dialog(buf, _("Signon Error")); + gtk_signal_connect(GTK_OBJECT(k->dlg), "destroy", GTK_SIGNAL_FUNC(set_kick_null), k); if (meter) { gtk_widget_destroy(meter->window); meters = g_slist_remove(meters, meter); Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ui.h 2001/10/06 02:25:46 1.5 +++ ui.h 2001/10/06 04:05:53 1.6 @@ -83,6 +83,85 @@ int entry_height; }; +/* struct buddy_chat went away and got merged with this. */ +struct conversation { + struct gaim_connection *gc; + + /* stuff used for both IM and chat */ + GtkWidget *window; + char name[80]; + GtkWidget *text; + GtkWidget *entry; + GtkWidget *italic; + GtkWidget *bold; + GtkWidget *underline; + GtkWidget *fgcolorbtn; + GtkWidget *bgcolorbtn; + GtkWidget *link; + GtkWidget *wood; + GtkWidget *log_button; + GtkWidget *strike; + GtkWidget *font; + GtkWidget *smiley; + GtkWidget *fg_color_dialog; + GtkWidget *bg_color_dialog; + GtkWidget *font_dialog; + GtkWidget *smiley_dialog; + GtkWidget *link_dialog; + GtkWidget *log_dialog; + int makesound; + char fontface[128]; + int hasfont; + int fontsize; + int hassize; + GdkColor bgcol; + int hasbg; + GdkColor fgcol; + int hasfg; + + GString *history; + + GtkWidget *send; + + /* stuff used just for IM */ + GtkWidget *lbox; + GtkWidget *bbox; + GtkWidget *sw; + GtkWidget *info; + GtkWidget *warn; + GtkWidget *block; + GtkWidget *add; + GtkWidget *sep1; + GtkWidget *sep2; + GtkWidget *menu; + GtkWidget *check; + gboolean unseen; + +#if USE_PIXBUF + /* buddy icon stuff. sigh. */ + GtkWidget *icon; + GdkPixbuf *unanim; + GdkPixbufAnimation *anim; + guint32 icon_timer; + int frame; +#endif + + /* stuff used just for chat */ + GList *in_room; + GList *ignored; + char *topic; + int id; + GtkWidget *count; + GtkWidget *list; + GtkWidget *whisper; + GtkWidget *invite; + GtkWidget *close; + GtkWidget *topic_text; + + /* something to distinguish */ + gboolean is_chat; +}; + struct log_conversation { char name[80]; char filename[512]; @@ -105,6 +184,33 @@ time_t tm; struct gaim_connection *gc; int flags; +}; + +struct mod_user { + struct aim_user *user; + + /* these are temporary */ + int options; + int protocol; + char proto_opt[7][256]; + + /* stuff for modify window */ + GtkWidget *mod; + GtkWidget *main; + GtkWidget *name; + GtkWidget *pwdbox; + GtkWidget *pass; + GtkWidget *rempass; + GList *opt_entries; + + /* stuff for icon selection */ + char iconfile[256]; + GtkWidget *iconsel; + GtkWidget *iconentry; + GtkWidget *icondlg; + + /* stuff for mail check prompt */ + GtkWidget *checkmail; }; #define EDIT_GC 0 |
From: Eric W. <war...@us...> - 2001-10-06 02:49:22
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv13906 Modified Files: core.c gaim.h module.c Log Message: you can sign people on now. Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- core.c 2001/10/06 02:25:46 1.7 +++ core.c 2001/10/06 02:49:18 1.8 @@ -90,6 +90,37 @@ } } +static void user_handler(struct UI *ui, guchar subtype, guchar *data) +{ + guint id; + struct aim_user *u; + + switch (subtype) { + /* + case CUI_USER_LIST: + break; + case CUI_USER_ADD: + break; + case CUI_USER_REMOVE: + break; + case CUI_USER_MODIFY: + break; + */ + case CUI_USER_SIGNON: + if (!data) + return; + memcpy(&id, data, sizeof(id)); + u = g_slist_nth_data(aim_users, id); + if (u) + serv_login(u); + /* don't need to do anything here because the UI will get updates from other handlers */ + break; + default: + debug_printf("unhandled user subtype %d\n", subtype); + break; + } +} + static gint gaim_recv(GIOChannel *source, void *buf, gint len) { gint total = 0; @@ -144,15 +175,18 @@ return FALSE; } - in = g_new0(guchar, len); - if (gaim_recv(source, in, len) != len) { - debug_printf("UI has abandoned us!\n"); - uis = g_slist_remove(uis, ui); - g_io_channel_close(ui->channel); - g_source_remove(ui->inpa); - g_free(ui); - return FALSE; - } + if (len) { + in = g_new0(guchar, len); + if (gaim_recv(source, in, len) != len) { + debug_printf("UI has abandoned us!\n"); + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + return FALSE; + } + } else + in = NULL; switch (type) { case CUI_TYPE_META: @@ -161,10 +195,10 @@ case CUI_TYPE_PLUGIN: plugin_handler(ui, subtype, in); break; - /* case CUI_TYPE_USER: user_handler(ui, subtype, in); break; + /* case CUI_TYPE_CONN: conn_handler(ui, subtype, in); break; @@ -183,7 +217,8 @@ break; } - g_free(in); + if (in) + g_free(in); return TRUE; } Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.279 retrieving revision 1.280 diff -u -d -r1.279 -r1.280 --- gaim.h 2001/10/06 02:25:46 1.279 +++ gaim.h 2001/10/06 02:49:18 1.280 @@ -56,6 +56,7 @@ #define CUI_USER_ADD 2 #define CUI_USER_REMOVE 3 #define CUI_USER_MODIFY 4 /* this handles moving them in the list too */ +#define CUI_USER_SIGNON 5 #define CUI_CONN_LIST 1 #define CUI_CONN_PROGRESS 2 Index: module.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/module.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- module.c 2001/10/06 02:25:46 1.5 +++ module.c 2001/10/06 02:49:18 1.6 @@ -527,23 +527,36 @@ void plugin_handler(struct UI *ui, guchar subtype, guchar *data) { + guint id; + struct gaim_plugin *p; + switch (subtype) { /* case CUI_PLUGIN_LIST: break; */ case CUI_PLUGIN_LOAD: - load_plugin(data); + p = load_plugin(data); /* XXX need to broadcast to UIs that plugin has been loaded */ break; - /* case CUI_PLUGIN_UNLOAD: + memcpy(&id, data, sizeof(id)); + p = g_list_nth_data(plugins, id); + if (p) { + unload_plugin(p); + /* XXX need to broadcast to UIs that plugin has been unloaded */ + } break; case CUI_PLUGIN_RELOAD: + memcpy(&id, data, sizeof(id)); + p = g_list_nth_data(plugins, id); + if (p) { + p = reload_plugin(p); + /* XXX need to broadcast to UIs that plugin has been reloaded */ + } break; - */ default: - debug_printf("unhandled plugin subtype: %d\n", subtype); + debug_printf("unhandled plugin subtype %d\n", subtype); break; } } |
From: Eric W. <war...@us...> - 2001-10-06 02:25:49
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv5143 Modified Files: core.c core.h gaim.h module.c ui.h Log Message: can load plugins. won't get any indication of it though. Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- core.c 2001/10/06 01:55:59 1.6 +++ core.c 2001/10/06 02:25:46 1.7 @@ -38,10 +38,6 @@ #include "gaim.h" static gint UI_fd = -1; -struct UI { - GIOChannel *channel; - guint inpa; -}; GSList *uis = NULL; gint UI_write(struct UI *ui, guchar *data, gint len) @@ -70,27 +66,27 @@ static void meta_handler(struct UI *ui, guchar subtype, guchar *data) { switch (subtype) { - case CUI_META_LIST: - break; - case CUI_META_QUIT: - while (uis) { - ui = uis->data; - uis = g_slist_remove(uis, ui); - g_io_channel_close(ui->channel); - g_source_remove(ui->inpa); - g_free(ui); - } - do_quit(); - break; - case CUI_META_DETACH: + case CUI_META_LIST: + break; + case CUI_META_QUIT: + while (uis) { + ui = uis->data; uis = g_slist_remove(uis, ui); g_io_channel_close(ui->channel); g_source_remove(ui->inpa); g_free(ui); - break; - default: - debug_printf("unhandled meta subtype %d\n", subtype); - break; + } + do_quit(); + break; + case CUI_META_DETACH: + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + break; + default: + debug_printf("unhandled meta subtype %d\n", subtype); + break; } } @@ -162,10 +158,10 @@ case CUI_TYPE_META: meta_handler(ui, subtype, in); break; - /* case CUI_TYPE_PLUGIN: plugin_handler(ui, subtype, in); break; + /* case CUI_TYPE_USER: user_handler(ui, subtype, in); break; Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- core.h 2001/10/06 00:10:29 1.3 +++ core.h 2001/10/06 02:25:46 1.4 @@ -74,6 +74,11 @@ /* any others? it's easy to add... */ }; +struct UI { + GIOChannel *channel; + guint inpa; +}; + #ifdef GAIM_PLUGINS struct gaim_plugin { @@ -89,8 +94,6 @@ void *data; }; -extern GList *plugins; -extern GList *callbacks; #endif struct buddy { @@ -114,6 +117,13 @@ struct gaim_connection *gc; /* the connection it belongs to */ }; +/* Globals in core.c */ +extern GSList *uis; + +/* Globals in plugins.c */ +extern GList *plugins; +extern GList *callbacks; + /* Functions in buddy.c */ extern struct buddy *find_buddy(struct gaim_connection *, char *); extern struct group *find_group(struct gaim_connection *, char *); @@ -129,6 +139,8 @@ extern void parse_toc_buddy_list(struct gaim_connection *, char *, int); /* Functions in core.c */ +extern gint UI_write(struct UI *, guchar *, int); +extern void UI_broadcast(guchar *data, int); /* Don't ever use these; when gaim-core is done these will be * merged into the core's main() and won't be called directly */ extern int core_main(); @@ -156,9 +168,10 @@ extern void gaim_signal_connect(GModule *, enum gaim_event, void *, void *); extern void gaim_signal_disconnect(GModule *, enum gaim_event, void *); extern void gaim_plugin_unload(GModule *); +extern void remove_all_plugins(); #endif extern int plugin_event(enum gaim_event, void *, void *, void *, void *); -extern void remove_all_plugins(); +extern void plugin_handler(struct UI *, guchar, guchar *); /* Functions in server.c */ extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.278 retrieving revision 1.279 diff -u -d -r1.278 -r1.279 --- gaim.h 2001/10/06 00:10:29 1.278 +++ gaim.h 2001/10/06 02:25:46 1.279 @@ -511,7 +511,6 @@ extern char *stylize(gchar *, int); extern void show_usage (int, char *); extern int do_auto_login (char *); -extern int file_is_dir (const char *, GtkWidget *); extern char *gaim_user_dir(); extern void strncpy_nohtml(gchar *, const gchar *, size_t); extern void strncpy_withhtml(gchar *, const gchar *, size_t); Index: module.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/module.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- module.c 2001/10/04 00:05:18 1.4 +++ module.c 2001/10/06 02:25:46 1.5 @@ -524,3 +524,26 @@ } } #endif + +void plugin_handler(struct UI *ui, guchar subtype, guchar *data) +{ + switch (subtype) { + /* + case CUI_PLUGIN_LIST: + break; + */ + case CUI_PLUGIN_LOAD: + load_plugin(data); + /* XXX need to broadcast to UIs that plugin has been loaded */ + break; + /* + case CUI_PLUGIN_UNLOAD: + break; + case CUI_PLUGIN_RELOAD: + break; + */ + default: + debug_printf("unhandled plugin subtype: %d\n", subtype); + break; + } +} Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ui.h 2001/10/06 00:10:29 1.4 +++ ui.h 2001/10/06 02:25:46 1.5 @@ -286,6 +286,7 @@ extern void aol_icon(GdkWindow *); extern GtkWidget *picture_button(GtkWidget *, char *, char **); extern GtkWidget *picture_button2(GtkWidget *, char *, char **, short); +extern int file_is_dir(const char *, GtkWidget *); /* Functions in multi.c */ extern void account_editor(GtkWidget *, GtkWidget *); |
From: Eric W. <war...@us...> - 2001-10-06 01:56:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26844 Modified Files: core.c Log Message: you can detach and/or quit. how fun. Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- core.c 2001/10/06 00:10:29 1.5 +++ core.c 2001/10/06 01:55:59 1.6 @@ -67,6 +67,33 @@ } } +static void meta_handler(struct UI *ui, guchar subtype, guchar *data) +{ + switch (subtype) { + case CUI_META_LIST: + break; + case CUI_META_QUIT: + while (uis) { + ui = uis->data; + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + } + do_quit(); + break; + case CUI_META_DETACH: + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + break; + default: + debug_printf("unhandled meta subtype %d\n", subtype); + break; + } +} + static gint gaim_recv(GIOChannel *source, void *buf, gint len) { gint total = 0; @@ -132,27 +159,27 @@ } switch (type) { - /* case CUI_TYPE_META: - meta_handler(ui, in); + meta_handler(ui, subtype, in); break; + /* case CUI_TYPE_PLUGIN: - plugin_handler(ui, in); + plugin_handler(ui, subtype, in); break; case CUI_TYPE_USER: - user_handler(ui, in); + user_handler(ui, subtype, in); break; case CUI_TYPE_CONN: - conn_handler(ui, in); + conn_handler(ui, subtype, in); break; case CUI_TYPE_BUDDY: - buddy_handler(ui, in); + buddy_handler(ui, subtype, in); break; case CUI_TYPE_MESSAGE: - message_handler(ui, in); + message_handler(ui, subtype, in); break; case CUI_TYPE_CHAT: - chat_handler(ui, in); + chat_handler(ui, subtype, in); break; */ default: |
From: Eric W. <war...@us...> - 2001-10-06 00:10:35
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv18681 Modified Files: core.c core.h gaim.h multi.c multi.h ui.h Log Message: more updates to core. Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- core.c 2001/10/05 22:06:27 1.4 +++ core.c 2001/10/06 00:10:29 1.5 @@ -67,7 +67,7 @@ } } -static gint gaim_recv(GIOChannel *source, guchar *buf, gint len) +static gint gaim_recv(GIOChannel *source, void *buf, gint len) { gint total = 0; gint cur; @@ -87,16 +87,24 @@ { struct UI *ui = data; - guchar buf[2] = {0, 0}; + guchar type; + guchar subtype; guint32 len; guchar *in; - gushort type; + /* no byte order worries! this'll change if we go to TCP */ + if (gaim_recv(source, &type, sizeof(type)) != sizeof(type)) { + debug_printf("UI has abandoned us!\n"); + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + return FALSE; + } - /* buf[0] is to specify gaim, buf[1] is for protocol version */ - if ((gaim_recv(source, buf, 2) != 2) || (buf[0] != 102) || (buf[1] != 1)) { - debug_printf("UI has abandoned us! (%d %d)\n", buf[0], buf[1]); + if (gaim_recv(source, &subtype, sizeof(subtype)) != sizeof(subtype)) { + debug_printf("UI has abandoned us!\n"); uis = g_slist_remove(uis, ui); g_io_channel_close(ui->channel); g_source_remove(ui->inpa); @@ -104,8 +112,7 @@ return FALSE; } - /* no byte order worries! this'll change if we go to TCP */ - if (gaim_recv(source, (guchar *)&len, sizeof(len)) != sizeof(len)) { + if (gaim_recv(source, &len, sizeof(len)) != sizeof(len)) { debug_printf("UI has abandoned us!\n"); uis = g_slist_remove(uis, ui); g_io_channel_close(ui->channel); @@ -114,10 +121,16 @@ return FALSE; } - in = g_new0(guchar, len + 1); - gaim_recv(source, in, len); + in = g_new0(guchar, len); + if (gaim_recv(source, in, len) != len) { + debug_printf("UI has abandoned us!\n"); + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + return FALSE; + } - memcpy(&type, in, sizeof(type)); switch (type) { /* case CUI_TYPE_META: Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- core.h 2001/10/05 22:06:27 1.2 +++ core.h 2001/10/06 00:10:29 1.3 @@ -94,7 +94,7 @@ #endif struct buddy { - int edittype; /* CUI: this is really a GUI function and we need to put this in ui.h */ + int edittype; /* XXX CUI: this is really a GUI function and we need to put this in ui.h */ char name[80]; char show[80]; int present; @@ -108,7 +108,7 @@ }; struct group { - int edittype; /* CUI: this is really a GUI function and we need to put this in ui.h */ + int edittype; /* XXX CUI: this is really a GUI function and we need to put this in ui.h */ char name[80]; GSList *members; struct gaim_connection *gc; /* the connection it belongs to */ Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.277 retrieving revision 1.278 diff -u -d -r1.277 -r1.278 --- gaim.h 2001/10/05 22:06:27 1.277 +++ gaim.h 2001/10/06 00:10:29 1.278 @@ -28,9 +28,58 @@ #include "core.h" #include "ui.h" -/* CUI: when this is done being split, the only things below should be things +/* XXX CUI: when this is done being split, the only things below should be things * both the core and the uis depend on e.g. the protocol definitions, etc, and * it won't include core.h or ui.h (i.e. it'll mostly be #define's) */ + +/* this is the basis of the CUI protocol. */ +#define CUI_TYPE_META 1 +#define CUI_TYPE_PLUGIN 2 +#define CUI_TYPE_USER 3 +#define CUI_TYPE_CONN 4 +#define CUI_TYPE_BUDDY 5 /* BUDDY_LIST, i.e., both groups and buddies */ +#define CUI_TYPE_MESSAGE 6 +#define CUI_TYPE_CHAT 7 + +#define CUI_META_LIST 1 /* 1 is always list; this is ignored by the core. + If we move to TCP this can be a keepalive */ +#define CUI_META_QUIT 2 +#define CUI_META_DETACH 3 /* you don't need to send this, you can just close + the socket. the core will understand. */ + +#define CUI_PLUGIN_LIST 1 +#define CUI_PLUGIN_LOAD 2 +#define CUI_PLUGIN_UNLOAD 3 +#define CUI_PLUGIN_RELOAD 4 /* this is redundant and may be removed */ + +#define CUI_USER_LIST 1 +#define CUI_USER_ADD 2 +#define CUI_USER_REMOVE 3 +#define CUI_USER_MODIFY 4 /* this handles moving them in the list too */ + +#define CUI_CONN_LIST 1 +#define CUI_CONN_PROGRESS 2 +#define CUI_CONN_ONLINE 3 +#define CUI_CONN_OFFLINE 4 /* this may send a "reason" for why it was killed */ + +#define CUI_BUDDY_LIST 1 +#define CUI_BUDDY_STATE 2 /* notifies the UI of state changes; UI can use it to + request the current status from the core */ +#define CUI_BUDDY_ADD 3 +#define CUI_BUDDY_REMOVE 4 +#define CUI_BUDDY_MODIFY 5 + +#define CUI_MESSAGE_LIST 1 /* no idea */ +#define CUI_MESSAGE_SEND 2 +#define CUI_MESSAGE_RECV 3 + +#define CUI_CHAT_LIST 1 +#define CUI_CHAT_HISTORY 2 /* is this necessary? should we have one for IMs? */ +#define CUI_CHAT_JOIN 3 /* handles other people joining/parting too */ +#define CUI_CHAT_PART 4 +#define CUI_CHAT_SEND 5 +#define CUI_CHAT_RECV 6 + #define IM_FLAG_AWAY 0x01 Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- multi.c 2001/10/05 19:53:38 1.87 +++ multi.c 2001/10/06 00:10:29 1.88 @@ -66,7 +66,6 @@ gc->prpl = find_prpl(user->protocol); g_snprintf(gc->username, sizeof(gc->username), "%s", user->username); g_snprintf(gc->password, sizeof(gc->password), "%s", user->password); - gc->options = user->options; gc->keepalive = 0; gc->inpa = 0; gc->buddy_chats = NULL; Index: multi.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- multi.h 2001/10/03 09:48:33 1.35 +++ multi.h 2001/10/06 00:10:29 1.36 @@ -26,7 +26,7 @@ /* ok. now the fun begins. first we create a connection structure */ struct gaim_connection { - int edittype; /* CUI: this is ui-specific and should be removed */ + int edittype; /* XXX CUI: this is ui-specific and should be removed */ /* we need to do either oscar or TOC */ /* we make this as an int in case if we want to add more protocols later */ @@ -54,10 +54,9 @@ char username[64]; char displayname[128]; char password[32]; - int options; /* same as aim_user options */ guint keepalive; /* stuff needed for per-connection idle times */ - guint idle_timer; /* CUI: we need to figure out what to do about idle reporting */ + guint idle_timer; time_t login_time; time_t lastsent; int is_idle; Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ui.h 2001/10/05 22:23:27 1.3 +++ ui.h 2001/10/06 00:10:29 1.4 @@ -66,7 +66,7 @@ GtkWidget *entry; }; -/* CUI: save_pos and window_size are used by gaimrc.c which is core. +/* XXX CUI: save_pos and window_size are used by gaimrc.c which is core. * Need to figure out options saving. Same goes for several global variables as well. */ struct save_pos { int x; @@ -89,7 +89,7 @@ struct log_conversation *next; }; -/* CUI: away messages aren't really anything more than char* but we need two char*'s +/* XXX CUI: away messages aren't really anything more than char* but we need two char*'s * for the UI so that people can name their away messages when they save them. So these * are really a UI function and struct away_message should be removed from the core. */ struct away_message { |
From: Eric W. <war...@us...> - 2001-10-05 22:23:31
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv6007 Modified Files: applet.h ui.h Log Message: this should be here Index: applet.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/applet.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- applet.h 2001/10/05 22:06:27 1.5 +++ applet.h 2001/10/05 22:23:27 1.6 @@ -67,6 +67,8 @@ #define GAIM_GNOME_CONNECT_ICON "gnome-battery.png" #define GAIM_GNOME_ONLINE_ICON "apple-green.png" +extern GtkWidget *applet; + extern gint init_applet_mgr(); extern void applet_do_signon(AppletWidget *, gpointer); extern void make_buddy(); Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ui.h 2001/10/05 22:06:27 1.2 +++ ui.h 2001/10/05 22:23:27 1.3 @@ -115,11 +115,6 @@ extern GList *log_conversations; /* this should be moved to conversations.c */ extern GSList *away_messages; /* this should be moved to away.c */ -/* Globals in applet.c */ -#ifdef USE_APPLET -extern GtkWidget *applet; -#endif /* USE_APPLET */ - /* Globals in away.c */ extern struct away_message *awaymessage; extern struct away_message *default_away; |
From: Eric W. <war...@us...> - 2001-10-05 22:08:16
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv31603 Modified Files: ChangeLog configure.ac Log Message: 0.46 Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.309 retrieving revision 1.310 diff -u -d -r1.309 -r1.310 --- ChangeLog 2001/10/05 06:37:34 1.309 +++ ChangeLog 2001/10/05 22:08:13 1.310 @@ -1,5 +1,7 @@ GAIM: The Pimpin' Penguin IM Clone thats good for the soul! +version 0.46: + version 0.45 (10/04/2001): * New plugin event: event_chat_send_invite * Major updates to the perl system (reread PERL-HOWTO and Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- configure.ac 2001/10/05 19:52:10 1.18 +++ configure.ac 2001/10/05 22:08:13 1.19 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/aim.c) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE([gaim], [0.45]) +AM_INIT_AUTOMAKE([gaim], [0.46]) AC_PATH_PROG(sedpath, sed) |
From: Eric W. <war...@us...> - 2001-10-05 22:08:16
|
Update of /cvsroot/gaim/gaim/doc In directory usw-pr-cvs1:/tmp/cvs-serv31603/doc Modified Files: gaim.1 Log Message: 0.46 Index: gaim.1 =================================================================== RCS file: /cvsroot/gaim/gaim/doc/gaim.1,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- gaim.1 2001/09/20 21:01:49 1.35 +++ gaim.1 2001/10/05 22:08:13 1.36 @@ -21,7 +21,7 @@ .\" USA. .TH GAIM 1 .SH NAME -gaim v0.45 \- Instant Messaging client +gaim v0.46 \- Instant Messaging client .SH SYNOPSIS .TP 5 \fBgaim \fI[options]\fR |
From: Eric W. <war...@us...> - 2001-10-05 22:06:30
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv30377 Modified Files: applet.h core.c core.h gaim.h server.c ui.h Log Message: more splits Index: applet.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/applet.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- applet.h 2001/10/03 09:48:33 1.4 +++ applet.h 2001/10/05 22:06:27 1.5 @@ -72,6 +72,7 @@ extern void make_buddy(); extern void cancel_logon(); extern gint applet_destroy_buddy(GtkWidget *, GdkEvent *, gpointer *); +extern void createOnlinePopup(); extern void set_user_state( enum gaim_user_states state ); Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- core.c 2001/10/05 19:52:11 1.3 +++ core.c 2001/10/05 22:06:27 1.4 @@ -44,6 +44,29 @@ }; GSList *uis = NULL; +gint UI_write(struct UI *ui, guchar *data, gint len) +{ + guchar *send = g_new0(guchar, len + 6); + gint sent; + send[0] = 'f'; + send[1] = 1; + memcpy(send + 2, &len, sizeof(len)); + memcpy(send + 6, data, len); + /* we'll let the write silently fail because the read will pick it up as dead */ + g_io_channel_write(ui->channel, send, len + 6, &sent); + return sent; +} + +void UI_broadcast(guchar *data, gint len) +{ + GSList *u = uis; + while (u) { + struct UI *ui = u->data; + UI_write(ui, data, len); + u = u->next; + } +} + static gint gaim_recv(GIOChannel *source, guchar *buf, gint len) { gint total = 0; Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- core.h 2001/10/03 09:48:33 1.1 +++ core.h 2001/10/05 22:06:27 1.2 @@ -35,6 +35,12 @@ #include "multi.h" +#define UC_AOL 1 +#define UC_ADMIN 2 +#define UC_UNCONFIRMED 4 +#define UC_NORMAL 8 +#define UC_UNAVAILABLE 16 + enum gaim_event { event_signon = 0, event_signoff, @@ -119,6 +125,40 @@ extern void do_export(struct gaim_connection *); extern void do_import(struct gaim_connection *, char *); extern int bud_list_cache_exists(struct gaim_connection *); +extern void toc_build_config(struct gaim_connection *, char *, int len, gboolean); +extern void parse_toc_buddy_list(struct gaim_connection *, char *, int); + +/* Functions in core.c */ +/* Don't ever use these; when gaim-core is done these will be + * merged into the core's main() and won't be called directly */ +extern int core_main(); +extern void core_quit(); + +/* Functions in gaimrc.c */ +extern void load_prefs(); +extern void save_prefs(); + +/* Functions in perl.c */ +#ifdef USE_PERL +extern void perl_autoload(); +extern void perl_end(); +extern int perl_event(char *, char *); +extern int perl_load_file(char *); +extern void unload_perl_scripts(); +extern void list_perl_scripts(); +#endif + +/* Functions in plugins.c */ +#ifdef GAIM_PLUGINS +extern struct gaim_plugin *load_plugin(char *); +extern void unload_plugin(struct gaim_plugin *); +extern struct gaim_plugin *reload_plugin(struct gaim_plugin *); +extern void gaim_signal_connect(GModule *, enum gaim_event, void *, void *); +extern void gaim_signal_disconnect(GModule *, enum gaim_event, void *); +extern void gaim_plugin_unload(GModule *); +#endif +extern int plugin_event(enum gaim_event, void *, void *, void *, void *); +extern void remove_all_plugins(); /* Functions in server.c */ extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.276 retrieving revision 1.277 diff -u -d -r1.276 -r1.277 --- gaim.h 2001/10/03 09:48:33 1.276 +++ gaim.h 2001/10/05 22:06:27 1.277 @@ -33,12 +33,6 @@ * it won't include core.h or ui.h (i.e. it'll mostly be #define's) */ -#define BROWSER_NETSCAPE 0 -#define BROWSER_KFM 1 -#define BROWSER_MANUAL 2 -/*#define BROWSER_INTERNAL 3*/ -#define BROWSER_GNOME 4 - #define IM_FLAG_AWAY 0x01 #define IM_FLAG_CHECKBOX 0x02 #define IM_FLAG_GAIMUSER 0x04 @@ -52,12 +46,6 @@ #define PERMIT_SOME 3 #define DENY_SOME 4 -#define UC_AOL 1 -#define UC_ADMIN 2 -#define UC_UNCONFIRMED 4 -#define UC_NORMAL 8 -#define UC_UNAVAILABLE 16 - #define WFLAG_SEND 0x01 #define WFLAG_RECV 0x02 #define WFLAG_AUTO 0x04 @@ -148,12 +136,6 @@ log_quit }; -struct log_conversation { - char name[80]; - char filename[512]; - struct log_conversation *next; -}; - #define OPT_POUNCE_POPUP 0x001 #define OPT_POUNCE_SEND_IM 0x002 #define OPT_POUNCE_COMMAND 0x004 @@ -177,24 +159,6 @@ int options; }; -struct queued_message { - char name[80]; - char *message; - time_t tm; - struct gaim_connection *gc; - int flags; -}; - -struct queued_away_response { - char name[80]; - time_t sent_away; -}; - -struct away_message { - char name[80]; - char message[2048]; -}; - /* struct buddy_chat went away and got merged with this. */ struct conversation { struct gaim_connection *gc; @@ -287,22 +251,13 @@ #define BUF_LONG BUF_LEN * 2 /* Globals in aim.c */ -extern GList *log_conversations; extern GList *buddy_pounces; -extern GSList *away_messages; extern GList *conversations; extern GtkWidget *mainwindow; extern int opt_away; extern char *opt_away_arg; extern char *opt_rcfile_arg; -/* Globals in away.c */ -extern struct away_message *awaymessage; -extern struct away_message *default_away; -extern int auto_away; -extern GtkWidget *awaymenu; -extern GtkWidget *clistqueue; - extern guint misc_options; #define OPT_MISC_DEBUG 0x00000001 #define OPT_MISC_BROWSER_POPUP 0x00000002 @@ -422,24 +377,34 @@ extern struct save_pos blist_pos; extern struct window_size conv_size, buddy_chat_size; +/* Functions in buddy.c */ +extern void do_quit(); +extern void signoff(struct gaim_connection *); +extern void do_pounce(struct gaim_connection *, char *, int); + /* Functions in buddy_chat.c */ -extern void join_chat(); -extern void chat_write(struct conversation *, char *, int, char *, time_t); +extern void show_new_buddy_chat(struct conversation *); +extern void chat_set_topic(struct conversation*, char*, char*); extern void add_chat_buddy(struct conversation *, char *); extern void rename_chat_buddy(struct conversation *, char *, char *); extern void remove_chat_buddy(struct conversation *, char *); -extern void show_new_buddy_chat(struct conversation *); -extern void delete_chat(struct conversation *); -extern void build_imchat_box(gboolean); -extern void do_quit(); -extern void update_chat_button_pix(); -extern void update_im_button_pix(); -extern void update_chat_tabs(); -extern void update_im_tabs(); -extern void update_idle_times(); -extern void do_join_chat(); -extern void chat_set_topic(struct conversation*, char*, char*); +/* Functions in conversation.c */ +extern void write_to_conv(struct conversation *, char *, int, char *, time_t); +extern struct conversation *find_conversation(char *); + +/* Functions in dialogs.c */ +extern void g_show_info_text(char *, ...); +extern GtkWidget *do_error_dialog(char *, char *); +extern void show_change_passwd(struct gaim_connection *); +extern void show_set_dir(struct gaim_connection *); +extern void show_find_email(struct gaim_connection *); +extern void show_find_info(struct gaim_connection *); +extern void show_set_info(struct gaim_connection *); + +/* Functions in gaimrc.c */ +extern gint sort_awaymsg_list(gconstpointer, gconstpointer); + /* Functions in html.c */ extern void grab_url(char *, void (*callback)(gpointer, char *), gpointer); extern gchar *strip_html(gchar *); @@ -447,33 +412,8 @@ /* Functions in idle.c */ extern gint check_idle(gpointer); -/* Functions in util.c */ -extern char *normalize(const char *); -extern char *tobase64(const char *); -extern void frombase64(const char *, char **, int *); -extern gint clean_pid(gpointer); -extern char *date(); -extern gint linkify_text(char *); -extern void aol_icon(GdkWindow *); -extern FILE *open_log_file (char *); -extern char *sec_to_text(guint); -extern struct aim_user *find_user(const char *, int); -extern char *full_date(); -extern void check_gaim_versions(); -extern char *away_subs(char *, char *); -extern GtkWidget *picture_button(GtkWidget *, char *, char **); -extern GtkWidget *picture_button2(GtkWidget *, char *, char **, short); -extern char *stylize(gchar *, int); -extern void show_usage (int, char *); -extern int do_auto_login (char *); -extern int file_is_dir (const char *, GtkWidget *); -extern char *gaim_user_dir(); -extern void strncpy_nohtml(gchar *, const gchar *, size_t); -extern void strncpy_withhtml(gchar *, const gchar *, size_t); -extern void away_on_login(char *); -extern void system_log(enum log_event, struct gaim_connection *, struct buddy *, int); -extern unsigned char *utf8_to_str(unsigned char *); -extern char *str_to_utf8(unsigned char *); +/* Functions in prefs.c */ +extern void debug_printf(char * fmt, ...); /* Functions in server.c */ /* input to serv */ @@ -504,215 +444,31 @@ extern void serv_chat_invite(struct gaim_connection *, int, char *, char *); extern void serv_chat_leave(struct gaim_connection *, int); extern void serv_chat_whisper(struct gaim_connection *, int, char *, char *); -extern int serv_chat_send(struct gaim_connection *, int, char *); - -/* Functions in conversation.c */ -extern void gaim_setup_imhtml(GtkWidget *); -extern void update_convo_add_button(struct conversation *); -extern void write_html_with_smileys(GtkWidget *, GtkWidget *, char *); -extern void write_to_conv(struct conversation *, char *, int, char *, time_t); -extern void raise_convo_tab(struct conversation *); -extern void set_convo_tab_label(struct conversation *, char *); -extern void show_conv(struct conversation *); -extern struct conversation *new_conversation(char *); -extern struct conversation *find_conversation(char *); -extern void delete_conversation(struct conversation *); -extern void surround(GtkWidget *, char *, char *); -extern int is_logging(char *); -extern void set_state_lock(int ); -extern void rm_log(struct log_conversation *a); -extern struct log_conversation *find_log_info(char *name); -extern void remove_tags(GtkWidget *entry, char *tag); -extern void update_log_convs(); -extern void update_transparency(); -extern void update_font_buttons(); -extern void toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); -extern void do_bold(GtkWidget *, GtkWidget *); -extern void do_italic(GtkWidget *, GtkWidget *); -extern void do_underline(GtkWidget *, GtkWidget *); -extern void do_strike(GtkWidget *, GtkWidget *); -extern void do_small(GtkWidget *, GtkWidget *); -extern void do_normal(GtkWidget *, GtkWidget *); -extern void do_big(GtkWidget *, GtkWidget *); -extern void set_font_face(char *, struct conversation *); -extern void redo_convo_menus(); -extern void convo_menu_remove(struct gaim_connection *); -extern void remove_icon_data(struct gaim_connection *); -extern void got_new_icon(struct gaim_connection *, char *); -extern void toggle_spellchk(); -extern void set_convo_gc(struct conversation *, struct gaim_connection *); -extern void update_buttons_by_protocol(struct conversation *); -extern void toggle_smileys(); -extern void toggle_timestamps(); -extern void update_pixmaps(); -extern void tabize(); -extern void chat_tabize(); -extern void update_convo_color(); -extern void update_convo_font(); -extern void set_hide_icons(); - -/* Functions in toc.c */ -extern void parse_toc_buddy_list(struct gaim_connection *, char *, int); - -/* Functions in buddy.c */ -extern void handle_group_rename(struct group *, char *); -extern void handle_buddy_rename(struct buddy *, char *); -extern void destroy_buddy(); -extern void update_button_pix(); -extern void toggle_show_empty_groups(); -extern void update_all_buddies(); -extern void update_num_groups(); -extern void show_buddy_list(); -extern void refresh_buddy_window(); -extern void toc_build_config(struct gaim_connection *, char *, int len, gboolean); -extern void signoff(struct gaim_connection *); -extern void signoff_all(gpointer, gpointer); -extern void do_im_back(); -extern void set_buddy(struct gaim_connection *, struct buddy *); -extern void build_edit_tree(); -extern void do_pounce(struct gaim_connection *, char *, int); -extern void do_bp_menu(); -extern void ui_add_buddy(struct gaim_connection *, struct group *, struct buddy *); -extern void ui_remove_buddy(struct gaim_connection *, struct group *, struct buddy *); -extern void ui_add_group(struct gaim_connection *, struct group *); -extern void ui_remove_group(struct gaim_connection *, struct group *); -extern void toggle_buddy_pixmaps(); -extern void gaim_separator(GtkWidget *); -extern void redo_buddy_list(); /* you really shouldn't call this function */ - -/* Functions in away.c */ -extern void rem_away_mess(GtkWidget *, struct away_message *); -extern void do_away_message(GtkWidget *, struct away_message *); -extern void do_away_menu(); -extern void away_list_unclicked(GtkWidget *, struct away_message *); -extern void away_list_clicked(GtkWidget *, struct away_message *); -extern void toggle_away_queue(); -extern void purge_away_queue(); - -/* Functions in aim.c */ -extern void show_login(); -extern void gaim_setup(struct gaim_connection *gc); -#ifdef USE_APPLET -extern void createOnlinePopup(); -extern void applet_show_login(AppletWidget *, gpointer); -GtkRequisition gnome_buddy_get_dimentions(); -#endif - - -/* Functions in sound.c */ -extern void play_sound(int); -extern void play_file(char *); - -/* Functions in perl.c */ -#ifdef USE_PERL -extern void perl_autoload(); -extern void perl_end(); -extern int perl_event(char *, char *); -extern int perl_load_file(char *); -extern void unload_perl_scripts(); -extern void list_perl_scripts(); -#endif - -/* Functions in plugins.c */ -#ifdef GAIM_PLUGINS -extern void show_plugins(GtkWidget *, gpointer); -extern struct gaim_plugin *load_plugin(char *); -extern void unload_plugin(struct gaim_plugin *); -extern struct gaim_plugin *reload_plugin(struct gaim_plugin *); -extern void gaim_signal_connect(GModule *, enum gaim_event, void *, void *); -extern void gaim_signal_disconnect(GModule *, enum gaim_event, void *); -extern void gaim_plugin_unload(GModule *); -#endif -extern int plugin_event(enum gaim_event, void *, void *, void *, void *); -extern void remove_all_plugins(); - -/* Functions in prefs.c */ -extern void debug_printf( char * fmt, ... ); -#define debug_print(x) debug_printf(x); -extern void set_option(GtkWidget *, int *); -extern void show_prefs(); -extern void show_debug(); -extern void update_color(GtkWidget *, GtkWidget *); -extern void set_default_away(GtkWidget *, gpointer); -extern void default_away_menu_init(GtkWidget *); -extern void update_connection_dependent_prefs(); -extern void build_allow_list(); -extern void build_block_list(); -extern GtkWidget *prefs_away_list; -extern GtkWidget *prefs_away_menu; -extern GtkWidget *pref_fg_picture; -extern GtkWidget *pref_bg_picture; - - -/* Functions in gaimrc.c */ -extern void load_prefs(); -extern void save_prefs(); -extern gint sort_awaymsg_list(gconstpointer, gconstpointer); - -gint sort_awaymsg_list(gconstpointer, gconstpointer); - -/* Functions in dialogs.c */ -extern void alias_dialog_bud(struct buddy *); -extern void show_warn_dialog(struct gaim_connection *, char *); -extern GtkWidget *do_error_dialog(char *, char *); -extern void show_im_dialog(); -extern void some_name(char *); -extern void show_info_dialog(); -extern void show_add_buddy(struct gaim_connection *, char *, char *); -extern void show_add_group(struct gaim_connection *); -extern void show_add_perm(struct gaim_connection *, char *, gboolean); -extern void destroy_all_dialogs(); -extern void show_import_dialog(); -extern void show_export_dialog(); -extern void show_new_bp(); -extern void show_log(char *); -extern void show_log_dialog(struct conversation *); -extern void show_find_email(struct gaim_connection *); -extern void show_find_info(struct gaim_connection *); -extern void g_show_info_text(char *, ...); -extern void show_set_info(struct gaim_connection *); -extern void show_set_dir(); -extern void show_fgcolor_dialog(struct conversation *c, GtkWidget *color); -extern void show_bgcolor_dialog(struct conversation *c, GtkWidget *color); -extern void cancel_fgcolor(GtkWidget *widget, struct conversation *c); -extern void cancel_bgcolor(GtkWidget *widget, struct conversation *c); -extern void put_out(struct gaim_connection *, char *, char *()); -extern void create_away_mess(GtkWidget *, void *); -extern void show_ee_dialog(int); -extern void show_add_link(GtkWidget *,struct conversation *); -extern void show_change_passwd(struct gaim_connection *); -extern void show_smiley_dialog(struct conversation *, GtkWidget *); -extern void close_smiley_dialog(GtkWidget *widget, struct conversation *c); -extern void set_smiley_array(GtkWidget *widget, int smiley_type); -extern void insert_smiley_text(GtkWidget *widget, struct conversation *c); -extern void cancel_log(GtkWidget *, struct conversation *); -extern void cancel_link(GtkWidget *, struct conversation *); -extern void show_font_dialog(struct conversation *c, GtkWidget *font); -extern void get_good(struct gaim_connection **); -extern void cancel_font(GtkWidget *widget, struct conversation *c); -extern void apply_font(GtkWidget *widget, GtkFontSelection *fontsel); -extern void set_color_selection(GtkWidget *selection, GdkColor color); -extern void show_rename_group(GtkWidget *, struct group *); -extern void show_rename_buddy(GtkWidget *, struct buddy *); -extern void load_perl_script(); - -/* Functions in browser.c */ -extern void open_url(GtkWidget *, char *); -extern void open_url_nw(GtkWidget *, char *); -extern void add_bookmark(GtkWidget *, char *); - -/* Functions in multi.c */ -extern void account_editor(GtkWidget *, GtkWidget *); - -/* Functions in core.c */ /* Don't ever use these */ -extern int core_main(); -extern void core_quit(); +extern int serv_chat_send(struct gaim_connection *, int, char *); -/* fucntions in ticker.c */ -void SetTickerPrefs(); -void BuddyTickerSignOff(); -void BuddyTickerAddUser(char *, GdkPixmap *, GdkBitmap *); -void BuddyTickerSetPixmap(char *, GdkPixmap *, GdkBitmap *); -void BuddyTickerSignoff(); +/* Functions in util.c */ +extern char *normalize(const char *); +extern char *tobase64(const char *); +extern void frombase64(const char *, char **, int *); +extern gint clean_pid(gpointer); +extern char *date(); +extern gint linkify_text(char *); +extern FILE *open_log_file (char *); +extern char *sec_to_text(guint); +extern struct aim_user *find_user(const char *, int); +extern char *full_date(); +extern void check_gaim_versions(); +extern char *away_subs(char *, char *); +extern char *stylize(gchar *, int); +extern void show_usage (int, char *); +extern int do_auto_login (char *); +extern int file_is_dir (const char *, GtkWidget *); +extern char *gaim_user_dir(); +extern void strncpy_nohtml(gchar *, const gchar *, size_t); +extern void strncpy_withhtml(gchar *, const gchar *, size_t); +extern void away_on_login(char *); +extern void system_log(enum log_event, struct gaim_connection *, struct buddy *, int); +extern unsigned char *utf8_to_str(unsigned char *); +extern char *str_to_utf8(unsigned char *); #endif /* _GAIM_H_ */ Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.195 retrieving revision 1.196 diff -u -d -r1.195 -r1.196 --- server.c 2001/09/28 07:46:36 1.195 +++ server.c 2001/10/05 22:06:27 1.196 @@ -383,6 +383,11 @@ return i; } +struct queued_away_response { + char name[80]; + time_t sent_away; +}; + struct queued_away_response *find_queued_away_response_by_name(char *name) { GSList *templist; Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ui.h 2001/10/03 09:48:33 1.1 +++ ui.h 2001/10/05 22:06:27 1.2 @@ -37,6 +37,12 @@ #include <gdk-pixbuf/gdk-pixbuf.h> #endif +#define BROWSER_NETSCAPE 0 +#define BROWSER_KFM 1 +#define BROWSER_MANUAL 2 +/*#define BROWSER_INTERNAL 3*/ +#define BROWSER_GNOME 4 + #define FACE_ANGEL 0 #define FACE_BIGSMILE 1 #define FACE_BURP 2 @@ -59,7 +65,6 @@ GtkWidget *window; GtkWidget *entry; }; -extern struct debug_window *dw; /* CUI: save_pos and window_size are used by gaimrc.c which is core. * Need to figure out options saving. Same goes for several global variables as well. */ @@ -78,15 +83,50 @@ int entry_height; }; +struct log_conversation { + char name[80]; + char filename[512]; + struct log_conversation *next; +}; + +/* CUI: away messages aren't really anything more than char* but we need two char*'s + * for the UI so that people can name their away messages when they save them. So these + * are really a UI function and struct away_message should be removed from the core. */ +struct away_message { + char name[80]; + char message[2048]; +}; + +/* this is used for queuing messages received while away. This is really a UI function + * which is why the struct is here. */ +struct queued_message { + char name[80]; + char *message; + time_t tm; + struct gaim_connection *gc; + int flags; +}; + #define EDIT_GC 0 #define EDIT_GROUP 1 #define EDIT_BUDDY 2 +/* Globals in aim.c */ +extern GList *log_conversations; /* this should be moved to conversations.c */ +extern GSList *away_messages; /* this should be moved to away.c */ + /* Globals in applet.c */ #ifdef USE_APPLET extern GtkWidget *applet; #endif /* USE_APPLET */ +/* Globals in away.c */ +extern struct away_message *awaymessage; +extern struct away_message *default_away; +extern int auto_away; +extern GtkWidget *awaymenu; +extern GtkWidget *clistqueue; + /* Globals in buddy.c */ extern GtkWidget *buddies; extern GtkWidget *bpmenu; @@ -109,11 +149,181 @@ extern GdkColor fgcolor; extern int smiley_array[FACE_TOTAL]; +/* Globals in prefs.c */ +extern struct debug_window *dw; + /* Globals in prpl.c */ extern GtkWidget *protomenu; /* Functions in about.c */ extern void show_about(GtkWidget *, void *); extern void gaim_help(GtkWidget *, void *); + +/* Functions in aim.c */ +extern void show_login(); +extern void gaim_setup(struct gaim_connection *gc); + +/* Functions in away.c */ +extern void rem_away_mess(GtkWidget *, struct away_message *); +extern void do_away_message(GtkWidget *, struct away_message *); +extern void do_away_menu(); +extern void away_list_unclicked(GtkWidget *, struct away_message *); +extern void away_list_clicked(GtkWidget *, struct away_message *); +extern void toggle_away_queue(); +extern void purge_away_queue(); + +/* Functions in browser.c */ +extern void open_url(GtkWidget *, char *); +extern void open_url_nw(GtkWidget *, char *); +extern void add_bookmark(GtkWidget *, char *); + +/* Functions in buddy.c */ +extern void handle_group_rename(struct group *, char *); +extern void handle_buddy_rename(struct buddy *, char *); +extern void destroy_buddy(); +extern void update_button_pix(); +extern void toggle_show_empty_groups(); +extern void update_all_buddies(); +extern void update_num_groups(); +extern void show_buddy_list(); +extern void refresh_buddy_window(); +extern void signoff_all(gpointer, gpointer); +extern void do_im_back(); +extern void set_buddy(struct gaim_connection *, struct buddy *); +extern void build_edit_tree(); +extern void do_bp_menu(); +extern void ui_add_buddy(struct gaim_connection *, struct group *, struct buddy *); +extern void ui_remove_buddy(struct gaim_connection *, struct group *, struct buddy *); +extern void ui_add_group(struct gaim_connection *, struct group *); +extern void ui_remove_group(struct gaim_connection *, struct group *); +extern void toggle_buddy_pixmaps(); +extern void gaim_separator(GtkWidget *); +extern void redo_buddy_list(); /* you really shouldn't call this function */ + +/* Functions in buddy_chat.c */ +extern void join_chat(); +extern void chat_write(struct conversation *, char *, int, char *, time_t); +extern void delete_chat(struct conversation *); +extern void build_imchat_box(gboolean); +extern void update_chat_button_pix(); +extern void update_im_button_pix(); +extern void update_chat_tabs(); +extern void update_im_tabs(); +extern void update_idle_times(); +extern void do_join_chat(); + +/* Functions in conversation.c */ +extern void gaim_setup_imhtml(GtkWidget *); +extern void update_convo_add_button(struct conversation *); +extern void raise_convo_tab(struct conversation *); +extern void set_convo_tab_label(struct conversation *, char *); +extern void show_conv(struct conversation *); +extern struct conversation *new_conversation(char *); +extern void delete_conversation(struct conversation *); +extern void surround(GtkWidget *, char *, char *); +extern int is_logging(char *); +extern void set_state_lock(int); +extern void rm_log(struct log_conversation *); +extern struct log_conversation *find_log_info(char *); +extern void remove_tags(GtkWidget *, char *); +extern void update_log_convs(); +extern void update_transparency(); +extern void update_font_buttons(); +extern void toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); +extern void do_bold(GtkWidget *, GtkWidget *); +extern void do_italic(GtkWidget *, GtkWidget *); +extern void do_underline(GtkWidget *, GtkWidget *); +extern void do_strike(GtkWidget *, GtkWidget *); +extern void do_small(GtkWidget *, GtkWidget *); +extern void do_normal(GtkWidget *, GtkWidget *); +extern void do_big(GtkWidget *, GtkWidget *); +extern void set_font_face(char *, struct conversation *); +extern void redo_convo_menus(); +extern void convo_menu_remove(struct gaim_connection *); +extern void remove_icon_data(struct gaim_connection *); +extern void got_new_icon(struct gaim_connection *, char *); +extern void toggle_spellchk(); +extern void set_convo_gc(struct conversation *, struct gaim_connection *); +extern void update_buttons_by_protocol(struct conversation *); +extern void toggle_smileys(); +extern void toggle_timestamps(); +extern void update_pixmaps(); +extern void tabize(); +extern void chat_tabize(); +extern void update_convo_color(); +extern void update_convo_font(); +extern void set_hide_icons(); + +/* Functions in dialogs.c */ +extern void alias_dialog_bud(struct buddy *); +extern void show_warn_dialog(struct gaim_connection *, char *); +extern void show_im_dialog(); +extern void show_info_dialog(); +extern void show_add_buddy(struct gaim_connection *, char *, char *); +extern void show_add_group(struct gaim_connection *); +extern void show_add_perm(struct gaim_connection *, char *, gboolean); +extern void destroy_all_dialogs(); +extern void show_import_dialog(); +extern void show_export_dialog(); +extern void show_new_bp(); +extern void show_log(char *); +extern void show_log_dialog(struct conversation *); +extern void show_fgcolor_dialog(struct conversation *c, GtkWidget *color); +extern void show_bgcolor_dialog(struct conversation *c, GtkWidget *color); +extern void cancel_fgcolor(GtkWidget *widget, struct conversation *c); +extern void cancel_bgcolor(GtkWidget *widget, struct conversation *c); +extern void create_away_mess(GtkWidget *, void *); +extern void show_ee_dialog(int); +extern void show_add_link(GtkWidget *,struct conversation *); +extern void show_smiley_dialog(struct conversation *, GtkWidget *); +extern void close_smiley_dialog(GtkWidget *widget, struct conversation *c); +extern void set_smiley_array(GtkWidget *widget, int smiley_type); +extern void insert_smiley_text(GtkWidget *widget, struct conversation *c); +extern void cancel_log(GtkWidget *, struct conversation *); +extern void cancel_link(GtkWidget *, struct conversation *); +extern void show_font_dialog(struct conversation *c, GtkWidget *font); +extern void cancel_font(GtkWidget *widget, struct conversation *c); +extern void apply_font(GtkWidget *widget, GtkFontSelection *fontsel); +extern void set_color_selection(GtkWidget *selection, GdkColor color); +extern void show_rename_group(GtkWidget *, struct group *); +extern void show_rename_buddy(GtkWidget *, struct buddy *); +extern void load_perl_script(); +extern void aol_icon(GdkWindow *); +extern GtkWidget *picture_button(GtkWidget *, char *, char **); +extern GtkWidget *picture_button2(GtkWidget *, char *, char **, short); + +/* Functions in multi.c */ +extern void account_editor(GtkWidget *, GtkWidget *); + +/* Functions in plugins.c */ +#ifdef GAIM_PLUGINS +extern void show_plugins(GtkWidget *, gpointer); +#endif + +/* Functions in prefs.c */ +extern void set_option(GtkWidget *, int *); +extern void show_prefs(); +extern void show_debug(); +extern void update_color(GtkWidget *, GtkWidget *); +extern void set_default_away(GtkWidget *, gpointer); +extern void default_away_menu_init(GtkWidget *); +extern void update_connection_dependent_prefs(); +extern void build_allow_list(); +extern void build_block_list(); +extern GtkWidget *prefs_away_list; +extern GtkWidget *prefs_away_menu; +extern GtkWidget *pref_fg_picture; +extern GtkWidget *pref_bg_picture; + +/* Functions in sound.c */ +extern void play_sound(int); +extern void play_file(char *); + +/* Fucntions in ticker.c */ +void SetTickerPrefs(); +void BuddyTickerSignOff(); +void BuddyTickerAddUser(char *, GdkPixmap *, GdkBitmap *); +void BuddyTickerSetPixmap(char *, GdkPixmap *, GdkBitmap *); +void BuddyTickerSignoff(); #endif /* _UI_H_ */ |
From: Eric W. <war...@us...> - 2001-10-05 21:05:07
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv7012 Modified Files: about.c Log Message: not polished. NOT POLISHED!!!! IT DOESN'T LOOK POLISHED!!!!!! Index: about.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/about.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- about.c 2001/09/28 02:16:34 1.48 +++ about.c 2001/10/05 21:05:04 1.49 @@ -90,14 +90,11 @@ if (!about) { about = gtk_window_new(GTK_WINDOW_DIALOG); - - gtk_widget_set_usize(GTK_WIDGET(about), 450, 450); - + gtk_widget_set_usize(GTK_WIDGET(about), 450, -1); g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION); gtk_window_set_title(GTK_WINDOW(about), abouttitle); gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim"); gtk_window_set_policy(GTK_WINDOW(about), FALSE, TRUE, TRUE); - gtk_widget_realize(about); aol_icon(about->window); |
From: Eric W. <war...@us...> - 2001-10-05 20:31:17
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv23906 Modified Files: buddy.c Log Message: fix compile errors on non-gcc compilers. Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.248 retrieving revision 1.249 diff -u -d -r1.248 -r1.249 --- buddy.c 2001/09/29 23:06:30 1.248 +++ buddy.c 2001/10/05 20:31:14 1.249 @@ -164,7 +164,7 @@ g_free(bs); } if ((bs = find_buddy_show(new_gs, b->name)) == NULL) { - if (*g->gc->prpl->list_icon) { + if (g->gc->prpl->list_icon) { bs = new_buddy_show(new_gs, b, (*g->gc->prpl->list_icon)(b->uc)); } else { @@ -217,7 +217,7 @@ g_free(bs->name); g_free(bs); } - if (*g->gc->prpl->list_icon) { + if (g->gc->prpl->list_icon) { bs = new_buddy_show(new_gs, b, (*g->gc->prpl->list_icon)(b->uc)); } else { |
From: Eric W. <war...@us...> - 2001-10-05 20:01:24
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv10295/protocols/oscar Modified Files: oscar.c Log Message: You missed 2 messages from they were because EWarmenhoven too large. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- oscar.c 2001/10/04 19:36:49 1.44 +++ oscar.c 2001/10/05 20:01:22 1.45 @@ -1447,8 +1447,8 @@ _("You missed %d message%s from %s because %s invalid."), nummissed, nummissed == 1 ? "" : "s", - nummissed == 1 ? "it was" : "they were", - userinfo->sn); + userinfo->sn, + nummissed == 1 ? "it was" : "they were"); break; case 1: /* Message too large */ @@ -1457,8 +1457,8 @@ _("You missed %d message%s from %s because %s too large."), nummissed, nummissed == 1 ? "" : "s", - nummissed == 1 ? "it was" : "they were", - userinfo->sn); + userinfo->sn, + nummissed == 1 ? "it was" : "they were"); break; case 2: /* Rate exceeded */ |
From: Eric W. <war...@us...> - 2001-10-05 19:53:40
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv7847/src Modified Files: multi.c Log Message: hi Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- multi.c 2001/10/02 05:52:56 1.86 +++ multi.c 2001/10/05 19:53:38 1.87 @@ -481,7 +481,7 @@ { if (u) { u->tmp_iconfile[0] = 0; - gtk_entry_set_text(GTK_ENTRY(u->iconentry), u->iconfile); + gtk_entry_set_text(GTK_ENTRY(u->iconentry), ""); } else { tmpusr.tmp_iconfile[0] = 0; gtk_entry_set_text(GTK_ENTRY(tmpusr.iconentry), ""); @@ -495,6 +495,11 @@ GtkWidget *name; GtkWidget *browse; GtkWidget *reset; + + if (u) + g_snprintf(u->tmp_iconfile, sizeof(u->tmp_iconfile), "%s", u->iconfile); + else + g_snprintf(tmpusr.tmp_iconfile, sizeof(tmpusr.tmp_iconfile), "%s", tmpusr.iconfile); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
From: Eric W. <war...@us...> - 2001-10-05 19:52:14
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv7128 Modified Files: acconfig.h configure.ac Log Message: core. Index: acconfig.h =================================================================== RCS file: /cvsroot/gaim/gaim/acconfig.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- acconfig.h 2001/10/03 07:49:38 1.13 +++ acconfig.h 2001/10/05 19:52:10 1.14 @@ -19,10 +19,6 @@ #undef NEED_GNOMESUPPORT_H #undef ZEPHYR_INT32 #undef ZEPHYR_USES_KERBEROS -#undef DEVEL #ifndef STATIC_PROTO_INIT #undef STATIC_PROTO_INIT #endif - - - Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- configure.ac 2001/10/03 07:49:38 1.17 +++ configure.ac 2001/10/05 19:52:10 1.18 @@ -41,11 +41,6 @@ CFLAGS="$CFLAGS -I/usr/local/include -I/opt/include -I\$(top_srcdir)" AC_ARG_ENABLE(distrib,,,enable_distrib=no) -AC_ARG_ENABLE(devel,,,enable_devel=no) -if test "$enable_devel" = "yes" ; then - CFLAGS="$CFLAGS -Wall" - AC_DEFINE(DEVEL) -fi AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") AC_ARG_ENABLE(multi, [ --disable-multi disable multiple connections],,enable_multi=yes) AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) @@ -100,7 +95,7 @@ AC_ARG_ENABLE(plugins, [ --disable-plugins compile without plugin support],,enable_plugins=yes) AC_ARG_ENABLE(perl, [ --disable-perl compile without perl scripting],,enable_perl=yes) -AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=$enable_devel) +AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no) AC_ARG_ENABLE(screensaver, [ --disable-screensaver compile without X screensaver extension],,enable_xss=yes) AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Compile Zephyr plugin with Kerberos 4 support],kerberos="$withval",kerberos="no") |
From: Eric W. <war...@us...> - 2001-10-05 19:52:14
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv7128/src Modified Files: core.c Log Message: core. Index: core.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- core.c 2001/10/03 18:13:50 1.2 +++ core.c 2001/10/05 19:52:11 1.3 @@ -37,8 +37,6 @@ #include "gaim.h" -#if DEVEL - static gint UI_fd = -1; struct UI { GIOChannel *channel; @@ -173,15 +171,12 @@ return fd; } -#endif /* DEVEL */ - int core_main() { /* GMainLoop *loop; */ -#if DEVEL GIOChannel *channel; UI_fd = open_socket(); @@ -191,7 +186,6 @@ channel = g_io_channel_unix_new(UI_fd); g_io_add_watch(channel, G_IO_IN, socket_readable, NULL); g_io_channel_unref(channel); -#endif /* loop = g_main_new(TRUE); @@ -203,10 +197,8 @@ void core_quit() { -#ifdef DEVEL char buf[1024]; close(UI_fd); sprintf(buf, "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), getpid()); unlink(buf); -#endif } |