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-12-05 10:38:42
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv27884/protocols/oscar Modified Files: Makefile.am Removed Files: md5.c Log Message: md5.c really should be in gaim-core. it's used by oscar (aim and icq), msn, and yahoo. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 2001/11/10 01:48:17 1.6 +++ Makefile.am 2001/12/05 10:38:39 1.7 @@ -25,7 +25,6 @@ im.c \ info.c \ invite.c \ - md5.c \ meta.c \ misc.c \ msgcookie.c \ @@ -63,7 +62,6 @@ im.c \ info.c \ invite.c \ - md5.c \ meta.c \ misc.c \ msgcookie.c \ --- md5.c DELETED --- |
From: Eric W. <war...@us...> - 2001-12-05 10:38:42
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv27884 Modified Files: Makefile.am Added Files: md5.c md5.h Log Message: md5.c really should be in gaim-core. it's used by oscar (aim and icq), msn, and yahoo. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/Makefile.am,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Makefile.am 2001/10/04 07:47:56 1.43 +++ Makefile.am 2001/12/05 10:38:39 1.44 @@ -19,6 +19,7 @@ html.c \ idle.c \ list.c \ + md5.c \ module.c \ multi.c \ perl.c \ @@ -52,6 +53,7 @@ html.c \ idle.c \ list.c \ + md5.c \ module.c \ multi.c \ perl.c \ @@ -83,6 +85,7 @@ gtkimhtml.h \ gtkspell.h \ gtkticker.h \ + md5.h \ multi.h \ prpl.h \ proxy.h \ |
From: Eric W. <war...@us...> - 2001-12-05 10:21:15
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv23811 Modified Files: ChangeLog Log Message: cvs commit -m Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.371 retrieving revision 1.372 diff -u -d -r1.371 -r1.372 --- ChangeLog 2001/12/04 07:53:54 1.371 +++ ChangeLog 2001/12/05 10:21:11 1.372 @@ -4,7 +4,7 @@ * Updated polish translation (Thanks Przemyslaw Sulek) * Able to import GnomeICU contact lists * Galeon as browser option (Thanks Rob McQueen) - * IRC /list + * IRC /list, /invite (Thanks Sean Egan) * Added swedish translation (Thanks Christian Rose) * Option to have IMs and Chats tabbed in same window |
From: Eric W. <war...@us...> - 2001-12-05 10:15:22
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv19739 Modified Files: irc.c Log Message: apathy by seanegan. i mean. apache by seanegan. i'm so lame. a patch by seanegan. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- irc.c 2001/12/02 07:49:27 1.64 +++ irc.c 2001/12/05 10:15:18 1.65 @@ -866,7 +866,9 @@ nick[ex - pdibuf] = 0; /* cut the buffer at the '!' */ } - if (!strcmp(cmd, "INVITE")) { /* */ + if (!strcmp(cmd, "INVITE")) { + char *chan = g_strdup(word[4]); + serv_got_chat_invite(gc, chan + 1, nick, NULL, g_list_append(NULL, chan)); } else if (!strcmp(cmd, "JOIN")) { char *chan = *word[3] == ':' ? word[3] + 1 : word[3]; if (!g_strcasecmp(gc->displayname, nick)) { @@ -1282,6 +1284,10 @@ g_snprintf(buf, sizeof(buf), "PRIVMSG %s :\001ACTION %s\001\r\n", who, word_eol[2]); irc_write(id->fd, buf, strlen(buf)); return 1; + } else if (!g_strcasecmp(pdibuf, "INVITE")) { + char buf[IRC_BUF_LEN]; + g_snprintf(buf, sizeof(buf), "INVITE %s\r\n", word_eol[2]); + irc_write(id->fd, buf, strlen(buf)); } else if (!g_strcasecmp(pdibuf, "TOPIC")) { if (!*word_eol[2]) return -EINVAL; @@ -1367,9 +1373,10 @@ if (!c) return -EINVAL; write_to_conv(c, "<B>Currently supported commands:<BR>" - "JOIN PART LIST TOPIC WHOIS<BR>" - "OP DEOP VOICE DEVOICE KICK<BR>" - "NICK ME MSG QUOTE SAY</B>", + "WHOIS INVITE NICK LIST<BR>" + "JOIN PART TOPIC KICK<BR>" + "OP DEOP VOICE DEVOICE<BR>" + "ME MSG QUOTE SAY</B>", WFLAG_NOLOG, NULL, time(NULL)); } else { struct conversation *c = NULL; @@ -1408,6 +1415,14 @@ return handle_command(gc, who, what); } +static void irc_chat_invite(struct gaim_connection *gc, int idn, char *message, char *name) { + char buf[IRC_BUF_LEN]; + struct irc_data *id = gc->proto_data; + struct conversation *c = irc_find_chat_by_id(gc, idn); + g_snprintf(buf, sizeof(buf), "INVITE %s %s\r\n", name, c->name); + irc_write(id->fd, buf, strlen(buf)); +} + static int irc_send_im(struct gaim_connection *gc, char *who, char *what, int flags) { if (*who == '@' || *who == '+') @@ -1550,6 +1565,7 @@ ret->set_away = irc_set_away; ret->get_info = irc_get_info; ret->buddy_menu = irc_buddy_menu; + ret->chat_invite = irc_chat_invite; my_protocol = ret; } |
From: Eric W. <war...@us...> - 2001-12-05 09:48:59
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv14191 Modified Files: .cvsignore Makefile.am gg.c libgg.c libgg.h Added Files: common.c Log Message: so here it comes - some bugs fixed, new ones introduced: - password changing (was in part 1) - update to latest libgg (fixes password change on alpha) - auto away on idle (remembers GG_STATE_FRIENDS_MASK) - handle_errcode() can now use hide_login_progress() - remove encode_postdata() and use gg_urlencode() from libgg + encode only fields (not whole url) - fixed status related ugly bug in GG_EVENT_NOTIFY (!!!) - remove linefeed from messages Thanks, Arkadiusz Miskiewicz --- NEW FILE: common.c --- /* $Id: common.c,v 1.1 2001/12/05 09:48:56 warmenhoven Exp $ */ /* * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...>, * Robert J. Wo¼ny <sp...@zi...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/ioctl.h> #include <sys/wait.h> #include <sys/time.h> #include <netdb.h> #include <errno.h> #ifndef _AIX # include <string.h> #endif #include <stdarg.h> #include <pwd.h> #include <time.h> #ifdef sun #include <sys/filio.h> #endif #include "libgg.h" #include "config.h" /* * gg_debug() * * wyrzuca komunikat o danym poziomie, o ile u¿ytkownik sobie tego ¿yczy. * * - level - poziom wiadomo¶ci, * - format... - tre¶æ wiadomo¶ci (printf-alike.) * * niczego nie zwraca. */ void gg_debug(int level, char *format, ...) { va_list ap; if ((gg_debug_level & level)) { va_start(ap, format); vprintf(format, ap); va_end(ap); } } /* * gg_alloc_sprintf() * * robi dok³adnie to samo, co sprintf(), tyle ¿e alokuje sobie wcze¶niej * miejsce na dane. powinno dzia³aæ na tych maszynach, które maj± funkcjê * vsnprintf() zgodn± z C99, jak i na wcze¶niejszych. * * - format, ... - parametry takie same jak w innych funkcjach *printf() * * zwraca zaalokowany buforek, który wypada³oby pó¼niej zwolniæ, lub NULL * je¶li nie uda³o siê wykonaæ zadania. */ char *gg_alloc_sprintf(char *format, ...) { va_list ap; char *buf = NULL, *tmp; int size = 0, res; va_start(ap, format); if ((size = vsnprintf(buf, 0, format, ap)) < 1) { size = 128; do { size *= 2; if (!(tmp = realloc(buf, size))) { free(buf); return NULL; } buf = tmp; res = vsnprintf(buf, size, format, ap); } while (res == size - 1); } else { if (!(buf = malloc(size + 1))) return NULL; } vsnprintf(buf, size + 1, format, ap); va_end(ap); return buf; } /* * gg_get_line() * * podaje kolejn± liniê z bufora tekstowego. psuje co bezpowrotnie, dziel±c * na kolejne stringi. zdarza siê, nie ma potrzeby pisania funkcji dubluj±cej * bufor ¿eby tylko mieæ nieruszone dane wej¶ciowe, skoro i tak nie bêd± nam * po¼niej potrzebne. obcina `\r\n'. * * - ptr - wska¼nik do zmiennej, która przechowuje aktualn± pozycjê * w przemiatanym buforze. * * wska¼nik do kolejnej linii tekstu lub NULL, je¶li to ju¿ koniec bufora. */ char *gg_get_line(char **ptr) { char *foo, *res; if (!ptr || !*ptr || !strcmp(*ptr, "")) return NULL; res = *ptr; if (!(foo = strchr(*ptr, '\n'))) *ptr += strlen(*ptr); else { *ptr = foo + 1; *foo = 0; if (res[strlen(res) - 1] == '\r') res[strlen(res) - 1] = 0; } return res; } /* * gg_connect() * * ³±czy siê z serwerem. pierwszy argument jest typu (void *), ¿eby nie * musieæ niczego inkludowaæ w libgg.h i nie psuæ jaki¶ g³upich zale¿no¶ci * na dziwnych systemach. * * - addr - adres serwera (struct in_addr *), * - port - port serwera, * - async - ma byæ asynchroniczne po³±czenie? * * zwraca po³±czonego socketa lub -1 w przypadku b³êdu. zobacz errno. */ int gg_connect(void *addr, int port, int async) { int sock, one = 1; struct sockaddr_in sin; struct in_addr *a = addr; gg_debug(GG_DEBUG_FUNCTION, "** gg_connect(%s, %d, %d);\n", inet_ntoa(*a), port, async); if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { gg_debug(GG_DEBUG_MISC, "-- socket() failed. errno = %d (%s)\n", errno, strerror(errno)); return -1; } if (async) { if (ioctl(sock, FIONBIO, &one) == -1) { gg_debug(GG_DEBUG_MISC, "-- ioctl() failed. errno = %d (%s)\n", errno, strerror(errno)); return -1; } } sin.sin_port = htons(port); sin.sin_family = AF_INET; sin.sin_addr.s_addr = a->s_addr; if (connect(sock, (struct sockaddr*) &sin, sizeof(sin)) == -1) { if (errno && (!async || errno != EINPROGRESS)) { gg_debug(GG_DEBUG_MISC, "-- connect() failed. errno = %d (%s)\n", errno, strerror(errno)); return -1; } gg_debug(GG_DEBUG_MISC, "-- connect() in progress\n"); } return sock; } /* * gg_read_line() * * czyta jedn± liniê tekstu z socketa. * * - sock - socket, * - buf - wska¼nik bufora, * - length - d³ugo¶æ bufora. * * olewa b³êdy. je¶li na jaki¶ trafi, potraktuje go jako koniec linii. */ void gg_read_line(int sock, char *buf, int length) { int ret; gg_debug(GG_DEBUG_FUNCTION, "** gg_read_line(...);\n"); for (; length > 1; buf++, length--) { do { if ((ret = read(sock, buf, 1)) == -1 && errno != EINTR) { *buf = 0; return; } } while (ret == -1 && errno == EINTR); if (*buf == '\n') { buf++; break; } } *buf = 0; return; } /* * gg_chomp() * * ucina "\r\n" lub "\n" z koñca linii. * * - line - ofiara operacji plastycznej. * * niczego nie zwraca. */ void gg_chomp(char *line) { if (!line || strlen(line) < 1) return; if (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = 0; if (line[strlen(line) - 1] == '\r') line[strlen(line) - 1] = 0; } /* * gg_urlencode() // funkcja wewnêtrzna * * zamienia podany tekst na ci±g znaków do formularza http. przydaje siê * przy szukaniu userów z dziwnymi znaczkami. * * - str - ci±g znaków do poprawki. * * zwraca zaalokowany bufor, który wypada³oby kiedy¶ zwolniæ albo NULL * w przypadku b³êdu. */ char *gg_urlencode(char *str) { char *p, *q, *buf, hex[] = "0123456789abcdef"; int size = 0; if (!str) str = strdup(""); for (p = str; *p; p++, size++) { if (!((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9'))) size += 2; } if (!(buf = malloc(size + 1))) return NULL; for (p = str, q = buf; *p; p++, q++) { if ((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z') || (*p >= '0' && *p <= '9')) *q = *p; else { *q++ = '%'; *q++ = hex[*p >> 4 & 15]; *q = hex[*p & 15]; } } *q = 0; return buf; } /* * gg_http_hash() * * funkcja, która liczy hash dla adresu e-mail i has³a. * * - email - adres email, * - password - has³o. * * zwraca hash wykorzystywany przy rejestracji i wszelkich * manipulacjach w³asnego wpisu w katalogu publicznym. */ int gg_http_hash(unsigned char *email, unsigned char *password) { unsigned int a, c; int b, i; b = (-1); i = 0; while ((c = (int) email[i++]) != 0) { a = (c ^ b) + (c << 8); b = (a >> 24) | (a << 8); } i = 0; while ((c = (int) password[i++]) != 0) { a = (c ^ b) + (c << 8); b = (a >> 24) | (a << 8); } return (b < 0 ? -b : b); } /* * Local variables: * c-indentation-style: k&r * c-basic-offset: 8 * indent-tabs-mode: notnil * End: * * vim: shiftwidth=8: */ Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 2001/10/18 20:56:59 1.2 +++ .cvsignore 2001/12/05 09:48:55 1.3 @@ -6,3 +6,4 @@ libgg.la libgg.lo iconv_string.lo +common.lo Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 2001/10/18 20:56:59 1.2 +++ Makefile.am 2001/12/05 09:48:56 1.3 @@ -13,6 +13,7 @@ libgg_a_SOURCES = libgg.c \ libgg.h \ + common.c \ iconv_string.c \ iconv_string.h \ gg.c @@ -25,6 +26,7 @@ libgg_la_SOURCES = libgg.c \ libgg.h \ + common.c \ iconv_string.c \ iconv_string.h \ gg.c Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- gg.c 2001/12/02 20:42:30 1.14 +++ gg.c 2001/12/05 09:48:56 1.15 @@ -65,6 +65,7 @@ #define AGG_PUBDIR_USERLIST_EXPORT_FORM "/appsvc/fmcontactsput.asp" #define AGG_PUBDIR_USERLIST_IMPORT_FORM "/appsvc/fmcontactsget.asp" #define AGG_PUBDIR_SEARCH_FORM "/appsvc/fmpubquery2.asp" +#define AGG_REGISTER_DATA_FORM "/appsvc/fmregister.asp" #define AGG_PUBDIR_MAX_ENTRIES 200 #define AGG_STATUS_AVAIL _("Available") @@ -80,11 +81,13 @@ #define AGG_HTTP_USERLIST_IMPORT 2 #define AGG_HTTP_USERLIST_EXPORT 3 #define AGG_HTTP_USERLIST_DELETE 4 +#define AGG_HTTP_PASSWORD_CHANGE 5 #define UC_NORMAL 2 struct agg_data { struct gg_session *sess; + int own_status; }; struct agg_http { @@ -170,7 +173,7 @@ return gg_localenc; } -static char *handle_errcode(int errcode, gboolean show) +static char *handle_errcode(struct gaim_connection *gc, int errcode) { static char msg[AGG_BUF_LEN]; @@ -198,73 +201,51 @@ break; } - if (show) - do_error_dialog(msg, _("Gadu-Gadu Error")); + hide_login_progress(gc, msg); return msg; } -static gchar *encode_postdata(const gchar *data) -{ - gchar *p = NULL; - int i, j = 0; - for (i = 0; i < strlen(data); i++) { - /* locale insensitive, doesn't reflect RFC (1738 section 2.2, 1866 section 8.2.1) */ - if ((data[i] >= 'a' && data[i] <= 'z') - || (data[i] >= 'A' && data[i] <= 'Z') - || (data[i] >= '0' && data[i] <= '9') - || data[i] == '=' || data[i] == '&') { - p = g_realloc(p, j + 1); - p[j] = data[i]; - j++; - } else { - p = g_realloc(p, j + 4); /* remember, sprintf appends a '\0' */ - sprintf(p + j, "%%%02x", (unsigned char)data[i]); - j += 3; - } - } - p = g_realloc(p, j + 1); - p[j] = '\0'; - - if (p && strlen(p)) - return p; - else - return g_strdup(data); -} - static void agg_set_away(struct gaim_connection *gc, char *state, char *msg) { struct agg_data *gd = (struct agg_data *)gc->proto_data; + int status = gd->own_status; if (gc->away) gc->away = NULL; if (!g_strcasecmp(state, AGG_STATUS_AVAIL)) - gg_change_status(gd->sess, GG_STATUS_AVAIL); + status = GG_STATUS_AVAIL; else if (!g_strcasecmp(state, AGG_STATUS_AVAIL_FRIENDS)) - gg_change_status(gd->sess, GG_STATUS_AVAIL | GG_STATUS_FRIENDS_MASK); + status = GG_STATUS_AVAIL | GG_STATUS_FRIENDS_MASK; else if (!g_strcasecmp(state, AGG_STATUS_BUSY)) { - gg_change_status(gd->sess, GG_STATUS_BUSY); + status = GG_STATUS_BUSY; gc->away = ""; } else if (!g_strcasecmp(state, AGG_STATUS_BUSY_FRIENDS)) { - gg_change_status(gd->sess, GG_STATUS_BUSY | GG_STATUS_FRIENDS_MASK); + status = GG_STATUS_BUSY | GG_STATUS_FRIENDS_MASK; gc->away = ""; } else if (!g_strcasecmp(state, AGG_STATUS_INVISIBLE)) { - gg_change_status(gd->sess, GG_STATUS_INVISIBLE); + status = GG_STATUS_INVISIBLE; gc->away = ""; } else if (!g_strcasecmp(state, AGG_STATUS_INVISIBLE_FRIENDS)) { - gg_change_status(gd->sess, GG_STATUS_INVISIBLE | GG_STATUS_FRIENDS_MASK); + status = GG_STATUS_INVISIBLE | GG_STATUS_FRIENDS_MASK; gc->away = ""; } else if (!g_strcasecmp(state, AGG_STATUS_NOT_AVAIL)) { - gg_change_status(gd->sess, GG_STATUS_NOT_AVAIL); + status = GG_STATUS_NOT_AVAIL; gc->away = ""; } else if (!g_strcasecmp(state, GAIM_AWAY_CUSTOM)) { if (msg) { - gg_change_status(gd->sess, GG_STATUS_BUSY); + status = GG_STATUS_BUSY; gc->away = ""; } else - gg_change_status(gd->sess, GG_STATUS_AVAIL); + status = GG_STATUS_AVAIL; + + if (gd->own_status & GG_STATUS_FRIENDS_MASK) + status |= GG_STATUS_FRIENDS_MASK; } + + gd->own_status = status; + gg_change_status(gd->sess, status); } static gchar *get_away_text(int uc) @@ -359,6 +340,7 @@ if (!(e = gg_watch_fd(gd->sess))) { debug_printf("main_callback: gg_watch_fd failed - CRITICAL!\n"); + hide_login_progress(gc, _("Unable to read socket")); signoff(gc); return; } @@ -373,7 +355,7 @@ case GG_EVENT_CONN_FAILED: if (gc->inpa) gaim_input_remove(gc->inpa); - handle_errcode(e->event.failure, TRUE); + handle_errcode(gc, e->event.failure); signoff(gc); break; case GG_EVENT_MSG: @@ -385,6 +367,7 @@ if (!allowed_uin(gc, user)) break; imsg = charset_convert(e->event.msg.message, "CP1250", find_local_charset()); + strip_linefeed(imsg); /* e->event.msg.time - we don't know what this time is for */ serv_got_im(gc, user, imsg, 0, time((time_t) NULL)); g_free(imsg); @@ -404,8 +387,7 @@ case GG_STATUS_AVAIL: case GG_STATUS_BUSY: case GG_STATUS_INVISIBLE: - case GG_STATUS_FRIENDS_MASK: - status = UC_NORMAL | (e->event.status.status << 5); + status = UC_NORMAL | (n->status << 5); break; default: status = UC_NORMAL; @@ -431,7 +413,6 @@ case GG_STATUS_AVAIL: case GG_STATUS_BUSY: case GG_STATUS_INVISIBLE: - case GG_STATUS_FRIENDS_MASK: status = UC_NORMAL | (e->event.status.status << 5); break; default: @@ -440,8 +421,8 @@ } g_snprintf(user, sizeof(user), "%lu", e->event.status.uin); - serv_got_update(gc, user, (status == UC_UNAVAILABLE) ? 0 : 1, 0, 0, 0, status, - 0); + serv_got_update(gc, user, (status == UC_UNAVAILABLE) ? 0 : 1, 0, 0, 0, + status, 0); } break; case GG_EVENT_ACK: @@ -479,18 +460,17 @@ gc->inpa = gaim_input_add(gd->sess->fd, GAIM_INPUT_READ, login_callback, gc); switch (gd->sess->state) { - case GG_STATE_CONNECTING_HTTP: - case GG_STATE_WRITING_HTTP: - set_login_progress(gc, 2, _("Handshake")); + case GG_STATE_READING_DATA: + set_login_progress(gc, 2, _("Reading data")); break; case GG_STATE_CONNECTING_GG: - set_login_progress(gc, 3, _("Connecting to GG server")); + set_login_progress(gc, 3, _("Balancer handshake")); break; - case GG_STATE_WAITING_FOR_KEY: - set_login_progress(gc, 4, _("Waiting for server key")); + case GG_STATE_READING_KEY: + set_login_progress(gc, 4, _("Reading server key")); break; - case GG_STATE_SENDING_KEY: - set_login_progress(gc, 5, _("Sending key")); + case GG_STATE_READING_REPLY: + set_login_progress(gc, 5, _("Exchanging key hash")); break; default: break; @@ -498,6 +478,7 @@ if (!(e = gg_watch_fd(gd->sess))) { debug_printf("login_callback: gg_watch_fd failed - CRITICAL!\n"); + hide_login_progress(gc, _("Critical error in GG library\n")); signoff(gc); return; } @@ -522,7 +503,7 @@ case GG_EVENT_CONN_FAILED: gaim_input_remove(gc->inpa); gc->inpa = 0; - handle_errcode(e->event.failure, TRUE); + handle_errcode(gc, e->event.failure); signoff(gc); break; default: @@ -536,6 +517,7 @@ { struct agg_data *gd = (struct agg_data *)gc->proto_data; if (gg_ping(gd->sess) < 0) { + hide_login_progress(gc, _("Unable to ping server")); signoff(gc); return; } @@ -578,7 +560,7 @@ gd->sess->uin = (uin_t) strtol(user->username, (char **)NULL, 10); gd->sess->password = g_strdup(user->password); - gd->sess->state = GG_STATE_CONNECTING_HTTP; + gd->sess->state = GG_STATE_CONNECTING; gd->sess->check = GG_CHECK_WRITE; gd->sess->async = 1; gd->sess->fd = proxy_connect(GG_APPMSG_HOST, GG_APPMSG_PORT, login_callback, gc); @@ -599,6 +581,7 @@ gg_logoff(gd->sess); gg_free_session(gd->sess); g_free(gc->proto_data); + gd->own_status = GG_STATUS_NOT_AVAIL; } static int agg_send_im(struct gaim_connection *gc, char *who, char *msg, int flags) @@ -614,7 +597,8 @@ if (strlen(msg) > 0) { imsg = charset_convert(msg, find_local_charset(), "CP1250"); - if (gg_send_message(gd->sess, (flags & IM_FLAG_CHECKBOX) ? GG_CLASS_MSG : GG_CLASS_CHAT, + if (gg_send_message(gd->sess, (flags & IM_FLAG_CHECKBOX) + ? GG_CLASS_MSG : GG_CLASS_CHAT, strtol(who, (char **)NULL, 10), imsg) < 0) return -1; g_free(imsg); @@ -848,6 +832,18 @@ do_error_dialog(_("Couldn't delete Buddies List from Server"), _("Gadu-Gadu Error")); } +static void password_change_server_results(struct gaim_connection *gc, gchar *webdata) +{ + if (strstr(webdata, "reg_success:")) { + do_error_dialog(_("Password changed sucessfully"), + _("Gadu-Gadu Information")); + return; + } + + debug_printf("delete_buddies_server_results: webdata [%s]\n", webdata); + do_error_dialog(_("Password couldn't be changed"), _("Gadu-Gadu Error")); +} + static void http_results(gpointer data, gint source, GaimInputCondition cond) { struct agg_http *hdata = data; @@ -904,6 +900,9 @@ case AGG_HTTP_USERLIST_DELETE: delete_buddies_server_results(gc, webdata); break; + case AGG_HTTP_PASSWORD_CHANGE: + password_change_server_results(gc, webdata); + break; case AGG_HTTP_NONE: default: debug_printf("http_results: unsupported type %d\n", hdata->type); @@ -920,7 +919,6 @@ struct gaim_connection *gc = hdata->gc; gchar *request = hdata->request; gchar *buf; - char *ptr; debug_printf("http_req_callback: begin\n"); @@ -938,10 +936,7 @@ return; } - ptr = encode_postdata(request); - g_free(request); - - debug_printf("http_req_callback: http request [%s]\n", ptr); + debug_printf("http_req_callback: http request [%s]\n", request); buf = g_strdup_printf("POST %s HTTP/1.0\r\n" "Host: %s\r\n" @@ -949,9 +944,9 @@ "User-Agent: " GG_HTTP_USERAGENT "\r\n" "Content-Length: %d\r\n" "Pragma: no-cache\r\n" "\r\n" "%s\r\n", - hdata->form, hdata->host, strlen(ptr), ptr); + hdata->form, hdata->host, strlen(request), request); - g_free(ptr); + g_free(request); if (write(source, buf, strlen(buf)) < strlen(buf)) { g_free(buf); @@ -970,12 +965,17 @@ { struct agg_http *hi = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; + gchar *u = gg_urlencode(gc->username); + gchar *p = gg_urlencode(gc->password); hi->gc = gc; hi->type = AGG_HTTP_USERLIST_IMPORT; hi->form = AGG_PUBDIR_USERLIST_IMPORT_FORM; hi->host = GG_PUBDIR_HOST; - hi->request = g_strdup_printf("FmNum=%s&Pass=%s", gc->username, gc->password); + hi->request = g_strdup_printf("FmNum=%s&Pass=%s", u, p); + + g_free(u); + g_free(p); if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, http_req_callback, hi) < 0) { g_snprintf(msg, sizeof(msg), _("Buddies List import from Server failed (%s)"), @@ -992,13 +992,19 @@ struct agg_http *he = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; gchar *ptr; + gchar *u = gg_urlencode(gc->username); + gchar *p = gg_urlencode(gc->password); + GSList *gr = gc->groups; he->gc = gc; he->type = AGG_HTTP_USERLIST_EXPORT; he->form = AGG_PUBDIR_USERLIST_EXPORT_FORM; he->host = GG_PUBDIR_HOST; - he->request = g_strdup_printf("FmNum=%s&Pass=%s&Contacts=", gc->username, gc->password); + he->request = g_strdup_printf("FmNum=%s&Pass=%s&Contacts=", u, p); + + g_free(u); + g_free(p); while (gr) { struct group *g = gr->data; @@ -1007,17 +1013,24 @@ struct buddy *b = m->data; gchar *newdata; /* GG Number */ - gchar *name = b->name; + gchar *name = gg_urlencode(b->name); /* GG Pseudo */ - gchar *show = strlen(b->show) ? b->show : b->name; + gchar *show = gg_urlencode(strlen(b->show) ? b->show : b->name); + /* Group Name */ + gchar *gname = gg_urlencode(g->name); ptr = he->request; newdata = g_strdup_printf("%s;%s;%s;%s;%s;%s;%s\r\n", - show, show, show, show, "", g->name, name); + show, show, show, show, "", gname, name); he->request = g_strconcat(ptr, newdata, NULL); + g_free(newdata); g_free(ptr); + g_free(gname); + g_free(show); + g_free(name); + m = g_slist_next(m); } gr = g_slist_next(gr); @@ -1037,12 +1050,14 @@ { struct agg_http *he = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; + gchar *u = gg_urlencode(gc->username); + gchar *p = gg_urlencode(gc->password); he->gc = gc; he->type = AGG_HTTP_USERLIST_DELETE; he->form = AGG_PUBDIR_USERLIST_EXPORT_FORM; he->host = GG_PUBDIR_HOST; - he->request = g_strdup_printf("FmNum=%s&Pass=%s&Delete=1", gc->username, gc->password); + he->request = g_strdup_printf("FmNum=%s&Pass=%s&Delete=1", u, p); if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, http_req_callback, he) < 0) { g_snprintf(msg, sizeof(msg), _("Deletion of Buddies List from Server failed (%s)"), @@ -1055,7 +1070,8 @@ } static void agg_dir_search(struct gaim_connection *gc, char *first, char *middle, - char *last, char *maiden, char *city, char *state, char *country, char *email) + char *last, char *maiden, char *city, char *state, + char *country, char *email) { struct agg_http *srch = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; @@ -1066,25 +1082,36 @@ srch->host = GG_PUBDIR_HOST; if (email && strlen(email)) { - srch->request = g_strdup_printf("Mode=1&Email=%s", email); + gchar *eemail = gg_urlencode(email); + srch->request = g_strdup_printf("Mode=1&Email=%s", eemail); + g_free(eemail); } else { gchar *new_first = charset_convert(first, find_local_charset(), "CP1250"); gchar *new_last = charset_convert(last, find_local_charset(), "CP1250"); gchar *new_city = charset_convert(city, find_local_charset(), "CP1250"); - /* For active only add &ActiveOnly= */ - srch->request = g_strdup_printf("Mode=0&FirstName=%s&LastName=%s&Gender=%d" - "&NickName=%s&City=%s&MinBirth=%d&MaxBirth=%d", - new_first, new_last, AGG_GENDER_NONE, - "", new_city, 0, 0); + gchar *enew_first = gg_urlencode(new_first); + gchar *enew_last = gg_urlencode(new_last); + gchar *enew_city = gg_urlencode(new_city); g_free(new_first); g_free(new_last); g_free(new_city); + + /* For active only add &ActiveOnly= */ + srch->request = g_strdup_printf("Mode=0&FirstName=%s&LastName=%s&Gender=%d" + "&NickName=%s&City=%s&MinBirth=%d&MaxBirth=%d", + enew_first, enew_last, AGG_GENDER_NONE, + "", enew_city, 0, 0); + + g_free(enew_first); + g_free(enew_last); + g_free(enew_city); } if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, http_req_callback, srch) < 0) { - g_snprintf(msg, sizeof(msg), _("Connect to search service failed (%s)"), GG_PUBDIR_HOST); + g_snprintf(msg, sizeof(msg), _("Connect to search service failed (%s)"), + GG_PUBDIR_HOST); do_error_dialog(msg, _("Gadu-Gadu Error")); g_free(srch->request); g_free(srch); @@ -1092,10 +1119,45 @@ } } +static void agg_change_passwd(struct gaim_connection *gc, char *old, char *new) +{ + struct agg_http *hpass = g_new0(struct agg_http, 1); + static char msg[AGG_BUF_LEN]; + gchar *u = gg_urlencode(gc->username); + gchar *p = gg_urlencode(gc->password); + gchar *enew = gg_urlencode(new); + gchar *eold = gg_urlencode(old); + + hpass->gc = gc; + hpass->type = AGG_HTTP_PASSWORD_CHANGE; + hpass->form = AGG_REGISTER_DATA_FORM; + hpass->host = GG_REGISTER_HOST; + + /* We are using old password as place for email - it's ugly */ + hpass->request = g_strdup_printf("fmnumber=%s&fmpwd=%s&pwd=%s&email=%s&code=%u", + u, p, enew, eold, gg_http_hash(old, new)); + + g_free(u); + g_free(p); + g_free(enew); + g_free(eold); + + if (proxy_connect(GG_REGISTER_HOST, GG_REGISTER_PORT, http_req_callback, hpass) < 0) { + g_snprintf(msg, sizeof(msg), _("Changing Password failed (%s)"), + GG_REGISTER_HOST); + do_error_dialog(msg, _("Gadu-Gadu Error")); + g_free(hpass->request); + g_free(hpass); + return; + } +} + static void agg_do_action(struct gaim_connection *gc, char *action) { if (!strcmp(action, _("Directory Search"))) { show_find_info(gc); + } else if (!strcmp(action, _("Change Password"))) { + show_change_passwd(gc); } else if (!strcmp(action, _("Import Buddies List from Server"))) { import_buddies_server(gc); } else if (!strcmp(action, _("Export Buddies List to Server"))) { @@ -1110,6 +1172,9 @@ GList *m = NULL; m = g_list_append(m, _("Directory Search")); + m = g_list_append(m, NULL); + m = g_list_append(m, _("Change Password")); + m = g_list_append(m, NULL); m = g_list_append(m, _("Import Buddies List from Server")); m = g_list_append(m, _("Export Buddies List to Server")); m = g_list_append(m, _("Delete Buddies List from Server")); @@ -1130,17 +1195,21 @@ /* If it's invalid uin then maybe it's nickname? */ if (invalid_uin(who)) { gchar *new_who = charset_convert(who, find_local_charset(), "CP1250"); + gchar *enew_who = gg_urlencode(new_who); + + g_free(new_who); srch->request = g_strdup_printf("Mode=0&FirstName=%s&LastName=%s&Gender=%d" "&NickName=%s&City=%s&MinBirth=%d&MaxBirth=%d", - "", "", AGG_GENDER_NONE, new_who, "", 0, 0); + "", "", AGG_GENDER_NONE, enew_who, "", 0, 0); - g_free(new_who); + g_free(enew_who); } else srch->request = g_strdup_printf("Mode=3&UserId=%s", who); if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, http_req_callback, srch) < 0) { - g_snprintf(msg, sizeof(msg), _("Connect to search service failed (%s)"), GG_PUBDIR_HOST); + g_snprintf(msg, sizeof(msg), _("Connect to search service failed (%s)"), + GG_PUBDIR_HOST); do_error_dialog(msg, _("Gadu-Gadu Error")); g_free(srch->request); g_free(srch); @@ -1199,7 +1268,7 @@ ret->get_dir = agg_get_info; ret->dir_search = agg_dir_search; ret->set_idle = NULL; - ret->change_passwd = NULL; + ret->change_passwd = agg_change_passwd; ret->add_buddy = agg_add_buddy; ret->add_buddies = agg_add_buddies; ret->remove_buddy = agg_rem_buddy; @@ -1245,3 +1314,13 @@ } #endif + +/* + * Local variables: + * c-indentation-style: k&r + * c-basic-offset: 8 + * indent-tabs-mode: notnil + * End: + * + * vim: shiftwidth=8: + */ Index: libgg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- libgg.c 2001/11/26 21:22:56 1.5 +++ libgg.c 2001/12/05 09:48:56 1.6 @@ -2,7 +2,7 @@ /* * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...>, - * Robert J. Wo¼ny <sp...@at...> + * Robert J. Wo¼ny <sp...@zi...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as @@ -37,7 +37,7 @@ #include <pwd.h> #include <time.h> [...1030 lines suppressed...] - if (errno == EAGAIN) { + if (errno == EAGAIN) { e->type = GG_EVENT_NONE; res = 0; } else @@ -1390,3 +1193,13 @@ return e; } + +/* + * Local variables: + * c-indentation-style: k&r + * c-basic-offset: 8 + * indent-tabs-mode: notnil + * End: + * + * vim: shiftwidth=8: + */ Index: libgg.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- libgg.h 2001/11/26 21:22:56 1.5 +++ libgg.h 2001/12/05 09:48:56 1.6 @@ -2,7 +2,7 @@ /* * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...>, - * Robert J. Wo¼ny <sp...@at...> + * Robert J. Wo¼ny <sp...@zi...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as @@ -18,15 +18,15 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __LIBGG_H -#define __LIBGG_H +#ifndef __GG_LIBGG_H +#define __GG_LIBGG_H #ifdef __cplusplus extern "C" { #endif #if defined(sun) && !defined(INADDR_NONE) -#define INADDR_NONE 0xffffffff + #define INADDR_NONE 0xffffffff #endif #include <sys/types.h> @@ -34,184 +34,305 @@ /* * typ zmiennej okre¶laj±cej numerek danej osoby. */ - typedef unsigned long uin_t; +typedef unsigned long uin_t; /* - * co¶tam. + * struktura opisuj±ca dan± sesjê. tworzona przez gg_login(). */ - struct gg_session { - int state, check; - int fd, pid; - int port; - int seq, async; - int last_pong; +struct gg_session { + int fd; /* podgl±dany deskryptor */ + int check; /* sprawdzamy zapis czy odczyt */ + int state; /* aktualny stan maszynki */ + int error; /* kod b³êdu dla GG_STATE_ERROR */ + int type; /* rodzaj sesji. == GG_SESSION_GG */ + + int async; /* czy po³±czenie jest asynchroniczne */ + int pid; /* pid procesu resolvera */ + int port; /* port, z którym siê ³±czymy */ + int seq; /* numer sekwencyjny ostatniej wiadomo¶ci */ + int last_pong; /* czas otrzymania ostatniego ping/pong */ - /* powinno byæ ,,in_addr'', ale nie chcê inkludowaæ sieci tutaj */ - unsigned long server_ip; + unsigned int server_ip; /* adres serwera */ + unsigned int client_ip; /* adres klienta */ + int client_port; /* port, na którym klient s³ucha */ - uin_t uin; - char *password; - int initial_status; + uin_t uin; /* numerek klienta */ + char *password; /* i jego has³o. zwalniane automagicznie */ + + int initial_status; /* pocz±tkowy stan klienta */ - char *recv_buf; - int recv_done, recv_left; - }; + char *recv_buf; /* bufor na otrzymywane pakiety */ + int recv_done; /* ile ju¿ wczytano do bufora */ + int recv_left; /* i ile jeszcze trzeba wczytaæ */ +}; + +/* + * ogólna struktura opisuj±ca stan wszystkich operacji http. + */ +struct gg_http { + int fd; /* podgl±dany deskryptor */ + int check; /* sprawdzamy zapis czy odczyt */ + int state; /* aktualny stan maszynki */ + int error; /* kod b³êdu dla GG_STATE_ERROR */ + int type; /* rodzaj sesji. == GG_SESSION_HTTP */ + + int async; /* czy po³±czenie asynchroniczne */ + int pid; /* pid procesu resolvera */ + int port; /* port, z którym siê ³±czymy */ + + char *query; /* bufor zapytania http */ + char *header; /* bufor nag³ówka */ + int header_size; /* rozmiar wczytanego nag³ówka */ + char *body; /* bufor otrzymanych informacji */ + int body_size; /* ilo¶æ informacji */ + void *data; /* dane danej operacji http */ +}; + +/* + * ogólna struktura opisuj±ca ró¿ne sesje. przydatna w klientach. + */ +struct gg_common { + int fd; /* podgl±dany deskryptor */ + int check; /* sprawdzamy zapis czy odczyt */ + int state; /* aktualny stan maszynki */ + int error; /* kod b³êdu dla GG_STATE_ERROR */ + int type; /* rodzaj sesji */ +}; + /* + * rodzaje sesji. + */ +enum { + GG_SESSION_GG = 1, /* po³±czenie z serwerem gg */ + GG_SESSION_HTTP, /* ogólna sesja http */ + GG_SESSION_SEARCH, /* szukanie */ + GG_SESSION_REGISTER, /* rejestrowanie */ +}; + +/* * ró¿ne stany asynchronicznej maszynki. */ - enum { - GG_STATE_IDLE = 0, /* wspólne */ - GG_STATE_RESOLVING, - GG_STATE_CONNECTING_HTTP, +enum { + /* wspólne */ + GG_STATE_IDLE = 0, /* nie powinno wyst±piæ. */ + GG_STATE_RESOLVING, /* wywo³a³ gethostbyname() */ + GG_STATE_CONNECTING, /* wywo³a³ connect() */ + GG_STATE_READING_DATA, /* czeka na dane http */ + GG_STATE_ERROR, /* wyst±pi³ b³±d. kod w x->error */ - GG_STATE_WRITING_HTTP, /* gg_login */ - GG_STATE_CONNECTING_GG, - GG_STATE_WAITING_FOR_KEY, - GG_STATE_SENDING_KEY, - GG_STATE_CONNECTED, + /* gg_session */ + GG_STATE_CONNECTING_GG, /* wywo³a³ connect() */ + GG_STATE_READING_KEY, /* czeka na klucz */ + GG_STATE_READING_REPLY, /* czeka na odpowied¼ */ + GG_STATE_CONNECTED, /* po³±czy³ siê */ - GG_STATE_READING_HEADER, /* gg_search */ - GG_STATE_READING_DATA, - GG_STATE_PARSING, - GG_STATE_FINISHED, - }; + /* gg_http */ + GG_STATE_READING_HEADER, /* czeka na nag³ówek http */ + GG_STATE_PARSING, /* przetwarza dane */ + GG_STATE_DONE, /* skoñczy³ */ +}; /* + * dla zachowania kompatybilno¶ci wstecz. w wersji 1.0 bêdzie usuniête. oby. + */ +#define GG_STATE_WRITING_HTTP GG_STATE_READING_DATA +#define GG_STATE_WAITING_FOR_KEY GG_STATE_READING_KEY +#define GG_STATE_SENDING_KEY GG_STATE_READING_REPLY +#define GG_STATE_FINISHED GG_STATE_DONE + +/* * co proces klienta powinien sprawdzaæ w deskryptorach? */ - enum { - GG_CHECK_NONE = 0, - GG_CHECK_WRITE = 1, - GG_CHECK_READ = 2, - }; +enum { + GG_CHECK_NONE = 0, /* nic. nie powinno wyst±piæ */ + GG_CHECK_WRITE = 1, /* sprawdzamy mo¿liwo¶æ zapisu */ + GG_CHECK_READ = 2, /* sprawdzamy mo¿liwo¶æ odczytu */ +}; - struct gg_session *gg_login(uin_t uin, char *password, int async); - void gg_free_session(struct gg_session *sess); - void gg_logoff(struct gg_session *sess); - int gg_change_status(struct gg_session *sess, int status); - int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, - unsigned char *message); - int gg_ping(struct gg_session *sess); +struct gg_session *gg_login(uin_t uin, char *password, int async); +void gg_free_session(struct gg_session *sess); +void gg_logoff(struct gg_session *sess); +int gg_change_status(struct gg_session *sess, int status); +int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, unsigned char *message); +int gg_ping(struct gg_session *sess); - struct gg_notify_reply { - uin_t uin; /* numerek */ - unsigned long status; /* status danej osoby */ - unsigned long remote_ip; /* adres ip delikwenta */ - unsigned short remote_port; /* port, na którym s³ucha klient */ - unsigned long dunno1; /* == 0x0b */ - unsigned short dunno2; /* znowu port? */ - } __attribute__ ((packed)); +struct gg_notify_reply { + uin_t uin; /* numerek */ + unsigned long status; /* status danej osoby */ + unsigned long remote_ip; /* adres ip delikwenta */ + unsigned short remote_port; /* port, na którym s³ucha klient */ + unsigned long version; /* == 0x0b */ + unsigned short dunno2; /* znowu port? */ +} __attribute__ ((packed)); - struct gg_status { - uin_t uin; /* numerek */ - unsigned long status; /* nowy stan */ - } __attribute__ ((packed)); +struct gg_status { + uin_t uin; /* numerek */ + unsigned long status; /* nowy stan */ +} __attribute__ ((packed)); - enum { - GG_EVENT_NONE = 0, - GG_EVENT_MSG, - GG_EVENT_NOTIFY, - GG_EVENT_STATUS, - GG_EVENT_ACK, - GG_EVENT_CONN_FAILED, - GG_EVENT_CONN_SUCCESS, - }; +enum { + GG_EVENT_NONE = 0, + GG_EVENT_MSG, + GG_EVENT_NOTIFY, + GG_EVENT_STATUS, + GG_EVENT_ACK, + GG_EVENT_CONN_FAILED, + GG_EVENT_CONN_SUCCESS, +}; - enum { - GG_FAILURE_RESOLVING = 1, - GG_FAILURE_CONNECTING, - GG_FAILURE_INVALID, - GG_FAILURE_READING, - GG_FAILURE_WRITING, - GG_FAILURE_PASSWORD, - }; +/* + * nied³ugo siê tego pozbêdê na rzecz sensownej obs³ugi b³êdów. --w + */ +enum { + GG_FAILURE_RESOLVING = 1, + GG_FAILURE_CONNECTING, + GG_FAILURE_INVALID, + GG_FAILURE_READING, + GG_FAILURE_WRITING, + GG_FAILURE_PASSWORD, + GG_FAILURE_404, +}; - struct gg_event { - int type; - union { - struct { - uin_t sender; - int msgclass; - time_t time; - unsigned char *message; - } msg; - struct gg_notify_reply *notify; - struct gg_status status; - struct { - uin_t recipient; - int status; - int seq; - } ack; - int failure; - } event; - }; +/* + * rodzaje b³êdów, na razie u¿ywane przez http. bez rozczulania siê nad + * powodami. klient powie, ¿e albo nie znalaz³ hosta, albo nie móg³ siê + * po³±czyæ, albo nie móg³ wys³aæ, albo nie móg³ odebrac. i tyle. jak + * kto¶ bêdzie chcia³, to bêdzie móg³ sprawdziæ errno. ale po co? + */ +enum { + GG_ERROR_RESOLVING = 1, + GG_ERROR_CONNECTING, + GG_ERROR_READING, + GG_ERROR_WRITING, +}; - struct gg_event *gg_watch_fd(struct gg_session *sess); - void gg_free_event(struct gg_event *e); +/* + * struktura opisuj±ca rodzaj zdarzenia. wychodzi z gg_watch_fd() + */ +struct gg_event { + int type; + union { + struct { + uin_t sender; + int msgclass; + time_t time; + unsigned char *message; + } msg; + struct gg_notify_reply *notify; + struct gg_status status; + struct { + uin_t recipient; + int status; + int seq; + } ack; + int failure; + } event; +}; - int gg_notify(struct gg_session *sess, uin_t * userlist, int count); - int gg_add_notify(struct gg_session *sess, uin_t uin); - int gg_remove_notify(struct gg_session *sess, uin_t uin); +struct gg_event *gg_watch_fd(struct gg_session *sess); +void gg_free_event(struct gg_event *e); +int gg_notify(struct gg_session *sess, uin_t *userlist, int count); +int gg_add_notify(struct gg_session *sess, uin_t uin); +int gg_remove_notify(struct gg_session *sess, uin_t uin); + + /* - * jakie¶tam bzdurki dotycz±ce szukania userów. + * OBS£UGA HTTP */ - struct gg_search_result { - uin_t uin; - char *first_name; - char *last_name; - char *nickname; - int born; - int gender; - char *city; - int active; - }; +struct gg_http *gg_http_connect(char *hostname, int port, int async, char *method, char *path, char *header); +int gg_http_watch_fd(struct gg_http *h); +void gg_http_stop(struct gg_http *h); +void gg_free_http(struct gg_http *h); - struct gg_search_request { - /* czy ma szukaæ tylko aktywnych? */ - int active; - /* mode 0 */ - char *nickname, *first_name, *last_name, *city; - int gender, min_birth, max_birth; - /* mode 1 */ - char *email; - /* mode 2 */ - char *phone; - /* mode 3 */ - uin_t uin; - }; +/* + * SZUKANIE U¯YTKOWNIKÓW + */ - struct gg_search { - struct gg_search_request request; +/* + * struktura opisuj±ca kryteria wyszukiwania. argument gg_search(). + */ +struct gg_search_request { + int active; /* czy ma szukaæ tylko aktywnych? */ - /* bzdurki */ - int mode, fd, async, state, check, error, pid; - char *header_buf, *data_buf; - int header_size, data_size; + /* mode 0 */ + char *nickname; /* pseudonim */ + char *first_name; /* imiê */ + char *last_name; /* nazwisko */ + char *city; /* miasto */ + int gender; /* p³eæ */ + int min_birth; /* urodzony od roku... */ + int max_birth; /* urodzony do roku... */ + + /* mode 1 */ + char *email; /* adres e-mail */ - /* wyniki */ - int count; - struct gg_search_result *results; - }; + /* mode 2 */ + char *phone; /* numer telefonu */ + + /* mode 3 */ + uin_t uin; /* numerek */ +}; -#define GG_GENDER_NONE 0 -#define GG_GENDER_FEMALE 1 -#define GG_GENDER_MALE 2 +/* + * struktura opisuj±ca rezultat wyszukiwania. pole gg_http. + */ +struct gg_search { + int count; /* ilo¶æ znalezionych */ + struct gg_search_result *results; /* tabelka z nimi */ +}; - struct gg_search *gg_search(struct gg_search_request *r, int async); - int gg_search_watch_fd(struct gg_search *f); - void gg_free_search(struct gg_search *f); - void gg_search_cancel(struct gg_search *f); +/* + * pojedynczy rezultat wyszukiwania. + */ +struct gg_search_result { + uin_t uin; /* numerek */ + char *first_name; /* imiê */ + char *last_name; /* nazwisko */ + char *nickname; /* pseudonim */ + int born; /* rok urodzenia */ + int gender; /* p³eæ */ + char *city; /* miasto */ + int active; /* czy jest aktywny */ +}; + +#define GG_GENDER_NONE 0 /* nie podano lub bez znaczenia */ +#define GG_GENDER_FEMALE 1 /* kobieta */ +#define GG_GENDER_MALE 2 /* mê¿czyzna */ + +struct gg_http *gg_search(struct gg_search_request *r, int async); +int gg_search_watch_fd(struct gg_http *f); +void gg_free_search(struct gg_http *f); + +struct gg_search_request *gg_search_request_mode_0(char *nickname, char *first_name, char *last_name, char *city, int gender, int min_birth, int max_birth, int active); +struct gg_search_request *gg_search_request_mode_1(char *email, int active); +struct gg_search_request *gg_search_request_mode_2(char *phone, int active); +struct gg_search_request *gg_search_request_mode_3(uin_t uin, int active); + +/* + * OPERACJE NA KATALOGU PUBLICZNYM + */ + +struct gg_pubdir { + int success; /* czy siê uda³o */ + uin_t uin; /* otrzymany numerek. 0 je¶li b³±d */ +}; +struct gg_http *gg_register(char *email, char *password, int async); +void gg_free_register(struct gg_http *f); + +int gg_pubdir_watch_fd(struct gg_http *f); +#define gg_register_watch_fd gg_pubdir_watch_fd + /* * je¶li chcemy sobie podebugowaæ, wystarczy ustawiæ `gg_debug_level'. * niestety w miarê przybywania wpisów `gg_debug(...)' nie chcia³o mi * siê ustawiaæ odpowiednich leveli, wiêc wiêkszo¶æ sz³a do _MISC. */ - extern int gg_debug_level; +extern int gg_debug_level; #define GG_DEBUG_NET 1 #define GG_DEBUG_TRAFFIC 2 @@ -219,7 +340,16 @@ #define GG_DEBUG_FUNCTION 8 #define GG_DEBUG_MISC 16 - void gg_debug(int level, char *format, ...); +void gg_debug(int level, char *format, ...); + +/* + * Pare ma³ych zmiennych do obs³ugi "http proxy" + * + */ + +extern int gg_http_use_proxy; +extern char *gg_http_proxy_host; +extern int gg_http_proxy_port; /* * ------------------------------------------------------------------------- @@ -230,41 +360,47 @@ * ------------------------------------------------------------------------- */ - int gg_resolve(int *fd, int *pid, char *hostname); - int gg_connect(void *addr, int port, int async); - char *gg_alloc_sprintf(char *format, ...); - char *gg_get_line(char **ptr); - char *gg_urlencode(char *str); +int gg_resolve(int *fd, int *pid, char *hostname); +void gg_debug(int level, char *format, ...); +char *gg_alloc_sprintf(char *format, ...); +char *gg_get_line(char **ptr); +int gg_connect(void *addr, int port, int async); +void gg_read_line(int sock, char *buf, int length); +void gg_chomp(char *line); +char *gg_urlencode(char *str); +int gg_http_hash(unsigned char *email, unsigned char *password); #define GG_APPMSG_HOST "appmsg.gadu-gadu.pl" #define GG_APPMSG_PORT 80 #define GG_PUBDIR_HOST "pubdir.gadu-gadu.pl" #define GG_PUBDIR_PORT 80 +#define GG_REGISTER_HOST "register.gadu-gadu.pl" +#define GG_REGISTER_PORT 80 #define GG_DEFAULT_PORT 8074 #define GG_HTTPS_PORT 443 #define GG_HTTP_USERAGENT "Mozilla/4.7 [en] (Win98; I)" - struct gg_header { - unsigned long type; /* typ pakietu */ - unsigned long length; /* d³ugo¶æ reszty pakietu */ - } __attribute__ ((packed)); +struct gg_header { + unsigned long type; /* typ pakietu */ + unsigned long length; /* d³ugo¶æ reszty pakietu */ +} __attribute__ ((packed)); #define GG_WELCOME 0x0001 - struct gg_welcome { - unsigned long key; /* klucz szyfrowania has³a */ - } __attribute__ ((packed)); - +struct gg_welcome { + unsigned long key; /* klucz szyfrowania has³a */ +} __attribute__ ((packed)); + #define GG_LOGIN 0x000c - struct gg_login { - uin_t uin; /* twój numerek */ - unsigned long hash; /* hash has³a */ - unsigned long status; /* status na dzieñ dobry */ - unsigned long dunno; /* == 0x0b */ - unsigned long local_ip; /* mój adres ip */ - unsigned short local_port; /* port, na którym s³ucham */ - } __attribute__ ((packed)); +struct gg_login { + uin_t uin; /* twój numerek */ + unsigned long hash; /* hash has³a */ + unsigned long status; /* status na dzieñ dobry */ + unsigned long dunno; /* == 0x0b */ + unsigned long local_ip; /* mój adres ip */ + unsigned short local_port; /* port, na którym s³ucham */ +} __attribute__ ((packed)); #define GG_LOGIN_OK 0x0003 @@ -273,39 +409,39 @@ #define GG_NEW_STATUS 0x0002 #define GG_STATUS_NOT_AVAIL 0x0001 /* roz³±czony */ -#define GG_STATUS_AVAIL 0x0002 /* dostêpny */ -#define GG_STATUS_BUSY 0x0003 /* zajêty */ +#define GG_STATUS_AVAIL 0x0002 /* dostêpny */ +#define GG_STATUS_BUSY 0x0003 /* zajêty */ #define GG_STATUS_INVISIBLE 0x0014 /* niewidoczny (GG 4.6) */ #define GG_STATUS_FRIENDS_MASK 0x8000 /* tylko dla znajomych (GG 4.6) */ - struct gg_new_status { - unsigned long status; /* na jaki zmieniæ? */ - } __attribute__ ((packed)); +struct gg_new_status { + unsigned long status; /* na jaki zmieniæ? */ +} __attribute__ ((packed)); #define GG_NOTIFY 0x0010 - - struct gg_notify { - uin_t uin; /* numerek danej osoby */ - char dunno1; /* == 3 */ - } __attribute__ ((packed)); - + +struct gg_notify { + uin_t uin; /* numerek danej osoby */ + char dunno1; /* == 3 */ +} __attribute__ ((packed)); + #define GG_NOTIFY_REPLY 0x000c /* tak, to samo co GG_LOGIN */ - + /* struct gg_notify_reply zadeklarowane wy¿ej */ #define GG_ADD_NOTIFY 0x000d #define GG_REMOVE_NOTIFY 0x000e - - struct gg_add_remove { - uin_t uin; /* numerek */ - char dunno1; /* == 3 */ - } __attribute__ ((packed)); + +struct gg_add_remove { + uin_t uin; /* numerek */ + char dunno1; /* == 3 */ +} __attribute__ ((packed)); #define GG_STATUS 0x0002 /* struct gg_status zadeklarowane wcze¶niej */ - + #define GG_SEND_MSG 0x000b #define GG_CLASS_QUEUED 0x0001 @@ -313,37 +449,48 @@ #define GG_CLASS_MSG 0x0004 #define GG_CLASS_CHAT 0x0008 - struct gg_send_msg { - unsigned long recipient; - unsigned long seq; - unsigned long msgclass; - } __attribute__ ((packed)); +struct gg_send_msg { + unsigned long recipient; + unsigned long seq; + unsigned long msgclass; +} __attribute__ ((packed)); #define GG_SEND_MSG_ACK 0x0005 #define GG_ACK_DELIVERED 0x0002 #define GG_ACK_QUEUED 0x0003 - - struct gg_send_msg_ack { - unsigned long status; - unsigned long recipient; - unsigned long seq; - } __attribute__ ((packed)); + +struct gg_send_msg_ack { + unsigned long status; + unsigned long recipient; + unsigned long seq; +} __attribute__ ((packed)); #define GG_RECV_MSG 0x000a - - struct gg_recv_msg { - unsigned long sender; - unsigned long seq; - unsigned long time; - unsigned long msgclass; - } __attribute__ ((packed)); + +struct gg_recv_msg { + unsigned long sender; + unsigned long seq; + unsigned long time; + unsigned long msgclass; +} __attribute__ ((packed)); #define GG_PING 0x0008 - + #define GG_PONG 0x0007 #ifdef __cplusplus } -#endif #endif + +#endif /* __GG_LIBGG_H */ + +/* + * Local variables: + * c-indentation-style: k&r + * c-basic-offset: 8 + * indent-tabs-mode: notnil + * End: + * + * vim: shiftwidth=8: + */ |
From: Eric W. <war...@us...> - 2001-12-04 19:51:30
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv11990 Modified Files: buddy_chat.c Log Message: it's december. Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.134 retrieving revision 1.135 diff -u -d -r1.134 -r1.135 --- buddy_chat.c 2001/12/04 07:53:54 1.134 +++ buddy_chat.c 2001/12/04 19:51:27 1.135 @@ -811,7 +811,10 @@ static gint right_click_chat(GtkObject *obj, GdkEventButton *event, struct conversation *b) { - if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { + if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { + if (!find_conversation(gtk_object_get_user_data(obj))) + new_conversation(gtk_object_get_user_data(obj)); + } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { GtkWidget *menu; GtkWidget *button; |
From: Eric W. <war...@us...> - 2001-12-04 08:04:24
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv17677/src/protocols/oscar Modified Files: ft.c Log Message: libfaim sync. not that it matters at all. Index: ft.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/ft.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ft.c 2001/11/19 12:23:40 1.9 +++ ft.c 2001/12/04 08:04:21 1.10 @@ -99,7 +99,7 @@ ret = userfunc(sess, NULL, newconn, cur); #endif } else { - faimdprintf(sess, 1, "Got a Connection on a listener that's not Rendezvous.\n"); + faimdprintf(sess, 1,"Got a Connection on a listener that's not Rendezvous Closing conn.\n"); aim_conn_close(newconn); ret = -1; } |
From: Eric W. <war...@us...> - 2001-12-04 07:53:58
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv15622/po Modified Files: .cvsignore Log Message: i think we've found our mole Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim/gaim/po/.cvsignore,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- .cvsignore 2001/10/31 20:39:12 1.11 +++ .cvsignore 2001/12/04 07:53:54 1.12 @@ -14,3 +14,4 @@ ru.gmo pl.gmo nl.gmo +sv.gmo |
From: Eric W. <war...@us...> - 2001-12-04 07:53:58
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv15622 Modified Files: ChangeLog Log Message: i think we've found our mole Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.370 retrieving revision 1.371 diff -u -d -r1.370 -r1.371 --- ChangeLog 2001/12/03 06:25:51 1.370 +++ ChangeLog 2001/12/04 07:53:54 1.371 @@ -6,6 +6,7 @@ * Galeon as browser option (Thanks Rob McQueen) * IRC /list * Added swedish translation (Thanks Christian Rose) + * Option to have IMs and Chats tabbed in same window version 0.49 (11/29/2001): * Can compile against GTK+ 2.0 (version 1.3.10/1.3.11) |
From: Eric W. <war...@us...> - 2001-12-04 07:53:58
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv15622/src Modified Files: applet.c buddy_chat.c conversation.c convo.h gaim.h prefs.c prpl.c ui.h Log Message: i think we've found our mole Index: applet.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/applet.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- applet.c 2001/11/17 02:50:05 1.26 +++ applet.c 2001/12/04 07:53:54 1.27 @@ -143,7 +143,7 @@ GdkPixmap *cache; GdkGC *gc; char *path; - GdkPixbuf *pb, *scale; + GdkPixbuf *pb, *scale = NULL; guchar *dst; double affine[6]; @@ -156,7 +156,8 @@ gdk_gc_copy(gc, applet->style->bg_gc[GTK_WIDGET_STATE(applet)]); path = gnome_pixmap_file(name); - scale = gdk_pixbuf_new_from_file(path); + if (path) + scale = gdk_pixbuf_new_from_file(path); g_free(path); if (!scale) return NULL; Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 --- buddy_chat.c 2001/11/30 21:16:27 1.133 +++ buddy_chat.c 2001/12/04 07:53:54 1.134 @@ -1074,35 +1074,6 @@ GTK_SIGNAL_FUNC(right_click_chat), b); } -static gint delete_all_chats(GtkWidget *w, GdkEventAny *e, gpointer d) -{ - while (chats) { - struct conversation *c = chats->data; - close_callback(c->close, c); - } - return FALSE; -} - -static void chat_switch(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer data) -{ - GtkWidget *label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(chat_notebook), - gtk_notebook_get_nth_page(GTK_NOTEBOOK - (chat_notebook), - page_num)); - GtkStyle *style; - struct conversation *b = g_list_nth_data(chats, page_num); - if (b && b->window && b->entry) - gtk_window_set_focus(GTK_WINDOW(b->window), b->entry); - if (!GTK_WIDGET_REALIZED(label)) - return; - style = gtk_style_new(); - gdk_font_unref(gtk_style_get_font(style)); - gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); - gtk_widget_set_style(label, style); - gtk_style_unref(style); - b->unseen = 0; -} - void show_new_buddy_chat(struct conversation *b) { GtkWidget *win; @@ -1131,6 +1102,8 @@ if (chat_options & OPT_CHAT_ONE_WINDOW) { if (!all_chats) { win = all_chats = b->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + if ((convo_options & OPT_CONVO_COMBINE) && (im_options & OPT_IM_ONE_WINDOW)) + all_convos = all_chats; gtk_window_set_wmclass(GTK_WINDOW(win), "buddy_chat", "Gaim"); gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE); gtk_container_border_width(GTK_CONTAINER(win), 0); @@ -1138,9 +1111,11 @@ aol_icon(win->window); gtk_window_set_title(GTK_WINDOW(win), _("Gaim - Group Chats")); gtk_signal_connect(GTK_OBJECT(win), "delete_event", - GTK_SIGNAL_FUNC(delete_all_chats), NULL); + GTK_SIGNAL_FUNC(delete_all_convo), NULL); chat_notebook = gtk_notebook_new(); + if ((convo_options & OPT_CONVO_COMBINE) && (im_options & OPT_IM_ONE_WINDOW)) + convo_notebook = chat_notebook; if (chat_options & OPT_CHAT_SIDE_TAB) { if (chat_options & OPT_CHAT_BR_TAB) { gtk_notebook_set_tab_pos(GTK_NOTEBOOK(chat_notebook), @@ -1162,7 +1137,7 @@ gtk_notebook_popup_enable(GTK_NOTEBOOK(chat_notebook)); gtk_container_add(GTK_CONTAINER(win), chat_notebook); gtk_signal_connect(GTK_OBJECT(chat_notebook), "switch-page", - GTK_SIGNAL_FUNC(chat_switch), NULL); + GTK_SIGNAL_FUNC(convo_switch), NULL); gtk_widget_show(chat_notebook); } else win = b->window = all_chats; @@ -1461,9 +1436,14 @@ void chat_tabize() { int pos = 0; + char tmp[BUF_LONG]; /* evil, evil i tell you! evil! */ if (chat_options & OPT_CHAT_ONE_WINDOW) { GList *x = chats; + if ((convo_options & OPT_CONVO_COMBINE) && (im_options & OPT_IM_ONE_WINDOW)) { + all_chats = all_convos; + chat_notebook = convo_notebook; + } while (x) { struct conversation *c = x->data; GtkWidget *imhtml, *win; @@ -1482,6 +1462,10 @@ if (c->topic) gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); + g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(c->in_room), + g_list_length(c->in_room) == 1 ? "person" : "people"); + gtk_label_set_text(GTK_LABEL(c->count), tmp); + while (r) { char *name = r->data; GtkWidget *list_item; @@ -1524,6 +1508,10 @@ if (c->topic) gtk_entry_set_text(GTK_ENTRY(c->topic_text), c->topic); + g_snprintf(tmp, sizeof(tmp), _("%d %s in room"), g_list_length(c->in_room), + g_list_length(c->in_room) == 1 ? "person" : "people"); + gtk_label_set_text(GTK_LABEL(c->count), tmp); + while (r) { char *name = r->data; GtkWidget *list_item; @@ -1548,10 +1536,17 @@ x = x->next; } - if (all_chats) + chats = m; + if ((convo_options & OPT_CONVO_COMBINE) && + (im_options & OPT_IM_ONE_WINDOW) && conversations) { + while (m) { + gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), + g_list_length(conversations)); + m = m->next; + } + } else if (all_chats) gtk_widget_destroy(all_chats); all_chats = NULL; chat_notebook = NULL; - chats = m; } } Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.311 retrieving revision 1.312 diff -u -d -r1.311 -r1.312 --- conversation.c 2001/12/02 11:30:19 1.311 +++ conversation.c 2001/12/04 07:53:55 1.312 @@ -68,7 +68,7 @@ GdkBitmap *dark_icon_bm = NULL; GtkWidget *all_convos = NULL; -static GtkWidget *convo_notebook = NULL; +GtkWidget *convo_notebook = NULL; char fontface[128] = { 0 }; char fontxfld[256] = { 0 }; @@ -428,7 +428,9 @@ remove_icon(c); remove_checkbox(c); if (im_options & OPT_IM_ONE_WINDOW) { - if (g_list_length(conversations) > 1) { + if ((g_list_length(conversations) > 1) || + ((convo_options & OPT_CONVO_COMBINE) && + (chat_options & OPT_CHAT_ONE_WINDOW) && chats)) { gtk_notebook_remove_page(GTK_NOTEBOOK(convo_notebook), g_list_index(conversations, c)); } else { @@ -437,6 +439,10 @@ c->window = NULL; all_convos = NULL; convo_notebook = NULL; + if (convo_options & OPT_CONVO_COMBINE) { + all_chats = NULL; + chat_notebook = NULL; + } } } else { if (c->window) @@ -445,15 +451,22 @@ } } else { if (chat_options & OPT_CHAT_ONE_WINDOW) { - if (g_list_length(chats) > 1) { + if ((g_list_length(chats) > 1) || + ((convo_options & OPT_CONVO_COMBINE) && + (im_options & OPT_IM_ONE_WINDOW) && conversations)) { gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), - g_list_index(chats, c)); + g_list_index(chats, c) + + g_list_length(conversations)); } else { if (c->window) gtk_widget_destroy(c->window); c->window = NULL; all_chats = NULL; chat_notebook = NULL; + if (convo_options & OPT_CONVO_COMBINE) { + all_convos = NULL; + convo_notebook = NULL; + } } } else { if (c->window) @@ -517,11 +530,19 @@ g_free(pre_fontface); } -static gint delete_all_convo(GtkWidget *w, GdkEventAny *e, gpointer d) +gint delete_all_convo(GtkWidget *w, GdkEventAny *e, gpointer d) { - while (conversations) { - struct conversation *c = conversations->data; - close_callback(c->close, c); + if (w == all_convos) { + while (conversations) { + struct conversation *c = conversations->data; + close_callback(c->close, c); + } + } + if (w == all_chats) { + while (chats) { + struct conversation *c = chats->data; + close_callback(c->close, c); + } } return FALSE; } @@ -577,6 +598,119 @@ } } +static void move_next_tab(GtkNotebook *notebook, gboolean chat) +{ + int currpage = gtk_notebook_get_current_page(notebook); + int convlen; + GList *cnv; + struct conversation *d = NULL; + + if ((convo_options & OPT_CONVO_COMBINE) && + (im_options & OPT_IM_ONE_WINDOW) && + (chat_options & OPT_CHAT_ONE_WINDOW)) + convlen = g_list_length(conversations); + else + convlen = 0; + + if (chat) { + /* if chat, find next unread chat */ + cnv = g_list_nth(chats, currpage - convlen); + while (cnv) { + d = cnv->data; + if (d->unseen) + break; + cnv = cnv->next; + d = NULL; + } + if (d) { + gtk_notebook_set_page(notebook, convlen + g_list_index(chats, d)); + return; + } + } else { + /* else find next unread convo */ + cnv = g_list_nth(conversations, currpage); + while (cnv) { + d = cnv->data; + if (d->unseen) + break; + cnv = cnv->next; + d = NULL; + } + if (d) { + gtk_notebook_set_page(notebook, g_list_index(conversations, d)); + return; + } + } + + if (convo_options & OPT_CONVO_COMBINE) { + if (chat && (im_options & OPT_IM_ONE_WINDOW)) { + /* if chat find next unread convo */ + cnv = conversations; + while (cnv) { + d = cnv->data; + if (d->unseen) + break; + cnv = cnv->next; + d = NULL; + } + if (d) { + gtk_notebook_set_page(notebook, g_list_index(conversations, d)); + return; + } + } else if (!chat && (chat_options & OPT_CHAT_ONE_WINDOW)) { + /* else find next unread chat */ + cnv = chats; + while (cnv) { + d = cnv->data; + if (d->unseen) + break; + cnv = cnv->next; + d = NULL; + } + if (d) { + gtk_notebook_set_page(notebook, convlen + g_list_index(chats, d)); + return; + } + } + } + + if (chat) { + /* if chat find first unread chat */ + cnv = chats; + while (cnv) { + d = cnv->data; + if (d->unseen) + break; + cnv = cnv->next; + d = NULL; + } + if (d) { + gtk_notebook_set_page(notebook, convlen + g_list_index(chats, d)); + return; + } + } else { + /* else find first unread convo */ + cnv = conversations; + while (cnv) { + d = cnv->data; + if (d->unseen) + break; + cnv = cnv->next; + d = NULL; + } + if (d) { + gtk_notebook_set_page(notebook, g_list_index(conversations, d)); + return; + } + } + + /* go to next page */ + if (currpage + 1 == g_list_length(notebook->children)) + gtk_notebook_set_page(notebook, 0); + else + gtk_notebook_next_page(notebook); +} + gboolean keypress_callback(GtkWidget *entry, GdkEventKey * event, struct conversation *c) { int pos; @@ -733,41 +867,7 @@ gtk_notebook_next_page(GTK_NOTEBOOK(notebook)); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); } else if (event->keyval == GDK_Tab) { - GList *ws = (c->is_chat ? chats : conversations); - GList *cnv = g_list_nth(ws, - gtk_notebook_get_current_page(GTK_NOTEBOOK - (notebook))); - struct conversation *d = NULL; - while (cnv) { - d = cnv->data; - if (d->unseen) - break; - cnv = cnv->next; - d = NULL; - } - if (d) { - gtk_notebook_set_page(GTK_NOTEBOOK(notebook), - g_list_index(ws, d)); - } else { - cnv = ws; - while (cnv) { - d = cnv->data; - if (d->unseen) - break; - cnv = cnv->next; - d = NULL; - } - if (d) { - gtk_notebook_set_page(GTK_NOTEBOOK(notebook), - g_list_index(ws, d)); - } else { - cnv = g_list_last(ws); - if (c == cnv->data) - gtk_notebook_set_page(GTK_NOTEBOOK(notebook), 0); - else - gtk_notebook_next_page(GTK_NOTEBOOK(notebook)); - } - } + move_next_tab(GTK_NOTEBOOK(notebook), c->is_chat); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); return TRUE; } @@ -1588,23 +1688,41 @@ (!c->is_chat && (im_options & OPT_IM_POPUP))) gdk_window_show(c->window->window); - if (((flags & WFLAG_RECV) || (flags & WFLAG_SYSTEM)) && - ((!c->is_chat && (im_options & OPT_IM_ONE_WINDOW) && - (gtk_notebook_get_current_page(GTK_NOTEBOOK(convo_notebook)) - != g_list_index(conversations, c))) || - (c->is_chat && (chat_options & OPT_CHAT_ONE_WINDOW) && - (gtk_notebook_get_current_page(GTK_NOTEBOOK(chat_notebook)) - != g_list_index(chats, c))))) { - GtkWidget *notebook = (c->is_chat ? chat_notebook : convo_notebook); + /* tab highlighting */ + if (c->is_chat && !(chat_options & OPT_CHAT_ONE_WINDOW)) /* if chat but not tabbed chat */ + return; + if (!c->is_chat && !(im_options & OPT_IM_ONE_WINDOW)) /* if convo but not tabbed convo */ + return; + if (!(flags & WFLAG_RECV) && !(flags & WFLAG_SYSTEM)) + return; + if ((c->unseen == 2) || ((c->unseen == 1) && !(flags & WFLAG_NICK))) + return; + + if (c->is_chat) { + int offs; + if ((convo_options & OPT_CONVO_COMBINE) && (im_options & OPT_IM_ONE_WINDOW)) + offs = g_list_length(conversations); + else + offs = 0; + if (gtk_notebook_get_current_page(GTK_NOTEBOOK(chat_notebook)) == + g_list_index(chats, c) + offs) + return; + } else { + if (gtk_notebook_get_current_page(GTK_NOTEBOOK(convo_notebook)) == + g_list_index(conversations, c)) + return; + } + + { + GtkNotebook *notebook = GTK_NOTEBOOK(c->is_chat ? chat_notebook : convo_notebook); + int offs = ((convo_options & OPT_CONVO_COMBINE) && + (im_options & OPT_IM_ONE_WINDOW) && c->is_chat) ? + g_list_length(conversations) : 0; GList *ws = (c->is_chat ? chats : conversations); - GtkWidget *label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(notebook), - gtk_notebook_get_nth_page(GTK_NOTEBOOK - (notebook), - g_list_index(ws, - c))); + GtkWidget *label = gtk_notebook_get_tab_label(notebook, + gtk_notebook_get_nth_page(notebook, + offs + g_list_index(ws, c))); GtkStyle *style; - if ((c->unseen == 2) || ((c->unseen == 1) && !(flags & WFLAG_NICK))) - return; style = gtk_style_new(); if (!GTK_WIDGET_REALIZED(label)) gtk_widget_realize(label); @@ -2104,14 +2222,24 @@ } } -static void convo_switch(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer data) +void convo_switch(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer data) { - GtkWidget *label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(convo_notebook), - gtk_notebook_get_nth_page(GTK_NOTEBOOK - (convo_notebook), - page_num)); + GtkWidget *label = gtk_notebook_get_tab_label(notebook, + gtk_notebook_get_nth_page(notebook, page_num)); GtkStyle *style; - struct conversation *c = g_list_nth_data(conversations, page_num); + struct conversation *c; + if ((convo_options & OPT_CONVO_COMBINE) && + (im_options & OPT_IM_ONE_WINDOW) && + (chat_options & OPT_CHAT_ONE_WINDOW)) { + int len = g_list_length(conversations); + if (page_num < len) + c = g_list_nth_data(conversations, page_num); + else + c = g_list_nth_data(chats, page_num - len); + } else if (GTK_WIDGET(notebook) == convo_notebook) + c = g_list_nth_data(conversations, page_num); + else + c = g_list_nth_data(chats, page_num); if (c && c->window && c->entry) gtk_window_set_focus(GTK_WINDOW(c->window), c->entry); if (!GTK_WIDGET_REALIZED(label)) @@ -2121,7 +2249,8 @@ gtk_style_set_font(style, gdk_font_ref(gtk_style_get_font(label->style))); gtk_widget_set_style(label, style); gtk_style_unref(style); - c->unseen = 0; + if (c) + c->unseen = 0; } @@ -2164,6 +2293,8 @@ if (im_options & OPT_IM_ONE_WINDOW) { if (!all_convos) { win = all_convos = c->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + if ((convo_options & OPT_CONVO_COMBINE) && (chat_options & OPT_CHAT_ONE_WINDOW)) + all_chats = all_convos; gtk_window_set_wmclass(GTK_WINDOW(win), "conversation", "Gaim"); gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, FALSE); gtk_container_border_width(GTK_CONTAINER(win), 0); @@ -2174,6 +2305,8 @@ GTK_SIGNAL_FUNC(delete_all_convo), NULL); convo_notebook = gtk_notebook_new(); + if ((convo_options & OPT_CONVO_COMBINE) && (chat_options & OPT_CHAT_ONE_WINDOW)) + chat_notebook = convo_notebook; if (im_options & OPT_IM_SIDE_TAB) { if (im_options & OPT_IM_BR_TAB) { gtk_notebook_set_tab_pos(GTK_NOTEBOOK(convo_notebook), @@ -2202,8 +2335,9 @@ cont = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(cont), 5); - /* this doesn't actually matter since we're resetting it once we're out of the if/else */ - gtk_notebook_append_page(GTK_NOTEBOOK(convo_notebook), cont, gtk_label_new(c->name)); + /* this doesn't matter since we're resetting the name once we're out of the if */ + gtk_notebook_insert_page(GTK_NOTEBOOK(convo_notebook), cont, gtk_label_new(c->name), + g_list_index(conversations, c)); gtk_widget_show(cont); } else { cont = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); @@ -2451,11 +2585,15 @@ } } -void tabize() +void im_tabize() { /* evil, evil i tell you! evil! */ if (im_options & OPT_IM_ONE_WINDOW) { GList *x = conversations; + if ((convo_options & OPT_CONVO_COMBINE) && (chat_options & OPT_CHAT_ONE_WINDOW)) { + all_convos = all_chats; + convo_notebook = chat_notebook; + } while (x) { struct conversation *c = x->data; GtkWidget *imhtml, *win; @@ -2471,6 +2609,7 @@ gtk_widget_destroy(win); update_icon(c); update_checkbox(c); + set_convo_title(c); x = x->next; } @@ -2486,22 +2625,111 @@ remove_icon(c); remove_checkbox(c); show_conv(c); - gtk_widget_destroy(c->text); + gtk_container_remove(GTK_CONTAINER(c->sw), c->text); gtk_widget_reparent(imhtml, c->sw); c->text = imhtml; update_icon(c); update_checkbox(c); + set_convo_title(c); x = x->next; } - if (all_convos) + conversations = m; + if ((convo_options & OPT_CONVO_COMBINE) && (chat_options & OPT_CHAT_ONE_WINDOW)) { + if (chats) { + struct conversation *c; + while (m) { + gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), 0); + m = m->next; + } + c = chats->data; + gtk_window_set_focus(GTK_WINDOW(c->window), c->entry); + } else { + if (all_convos) + gtk_widget_destroy(all_convos); + all_chats = NULL; + chat_notebook = NULL; + } + } else if (all_convos) gtk_widget_destroy(all_convos); all_convos = NULL; convo_notebook = NULL; - conversations = m; } } +void convo_tabize() +{ + GList *x, *m; + GtkWidget *tmp; + + if (!chats && !conversations) + return; + + if (convo_options & OPT_CONVO_COMBINE) { + if (!chats) { + all_chats = all_convos; + chat_notebook = convo_notebook; + return; + } else if (!conversations) { + all_convos = all_chats; + convo_notebook = chat_notebook; + return; + } + } else { + if (!chats) { + all_chats = NULL; + chat_notebook = NULL; + return; + } else if (!conversations) { + all_convos = NULL; + convo_notebook = NULL; + return; + } + } + + tmp = all_convos; + if (convo_options & OPT_CONVO_COMBINE) { + all_convos = all_chats; + convo_notebook = chat_notebook; + } else { + all_convos = NULL; + convo_notebook = NULL; + } + x = m = conversations; + while (x) { + struct conversation *c = x->data; + GtkWidget *imhtml; + + imhtml = c->text; + remove_icon(c); + remove_checkbox(c); + show_conv(c); + gtk_container_remove(GTK_CONTAINER(c->sw), c->text); + gtk_widget_reparent(imhtml, c->sw); + c->text = imhtml; + update_icon(c); + update_checkbox(c); + + x = x->next; + } + + conversations = m; + if (convo_options & OPT_CONVO_COMBINE) { + if (tmp) + gtk_widget_destroy(tmp); + } else { + while (m) { + gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), 0); + m = m->next; + } + } + m = conversations; + while (m) { + set_convo_title(m->data); + m = m->next; + } +} + void set_convo_title(struct conversation *c) { struct buddy *b; @@ -2514,17 +2742,17 @@ else text = c->name; - if (!convo_notebook) { + if (im_options & OPT_IM_ONE_WINDOW) { + nb = GTK_NOTEBOOK(convo_notebook); + index = g_list_index(conversations, c); + gtk_notebook_set_tab_label_text(nb, gtk_notebook_get_nth_page(nb, index), text); + } else { char buf[256]; if ((find_log_info(c->name)) || (logging_options & OPT_LOG_ALL)) g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, text); else g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, text); gtk_window_set_title(GTK_WINDOW(c->window), buf); - } else { - nb = GTK_NOTEBOOK(convo_notebook); - index = g_list_index(conversations, c); - gtk_notebook_set_tab_label_text(nb, gtk_notebook_get_nth_page(nb, index), text); } } Index: convo.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/convo.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- convo.h 2001/10/03 09:48:33 1.12 +++ convo.h 2001/12/04 07:53:55 1.13 @@ -33,6 +33,9 @@ #include "pixmaps/tb_search.xpm" #include "pixmaps/block.xpm" +extern GtkWidget *convo_notebook; +extern GtkWidget *chat_notebook; + /* we declare all of the global functions for chat and IM windows here, so * that it's easy to keep them merged. */ @@ -66,6 +69,9 @@ extern gboolean keypress_callback(GtkWidget *, GdkEventKey *, struct conversation *); extern void check_spelling( GtkEditable *, gchar *, gint, gint *, gpointer); extern int entry_key_pressed(GtkWidget *, GtkWidget *); + +extern void convo_switch(GtkNotebook *, GtkWidget *, gint, gpointer); +extern gint delete_all_convo(GtkWidget *, GdkEventAny *, gpointer); extern GtkWidget *build_conv_toolbar(struct conversation *); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.301 retrieving revision 1.302 diff -u -d -r1.301 -r1.302 --- gaim.h 2001/12/01 01:48:26 1.301 +++ gaim.h 2001/12/04 07:53:55 1.302 @@ -233,6 +233,7 @@ #define OPT_CONVO_SHOW_SMILEY 0x00000400 #define OPT_CONVO_IGNORE_FONTS 0x00000800 #define OPT_CONVO_IGNORE_SIZES 0x00001000 +#define OPT_CONVO_COMBINE 0x00002000 extern guint im_options; #define OPT_IM_POPUP 0x00000001 Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.209 retrieving revision 1.210 diff -u -d -r1.209 -r1.210 --- prefs.c 2001/12/03 12:22:46 1.209 +++ prefs.c 2001/12/04 07:53:55 1.210 @@ -766,16 +766,30 @@ static void set_tab_opt(GtkWidget *w, int data) { int mask; - if (data & 0x1) { /* set the first bit if we're affecting chat buttons */ + if (convo_options & OPT_CONVO_COMBINE) { + /* through an amazing coincidence (this wasn't planned), we're able to do this, + * since the two sets of options end up having the same value. isn't that great. */ mask = (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB); chat_options &= ~(mask); chat_options |= (data & mask); - update_chat_tabs(); - } else { + mask = (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB); im_options &= ~(mask); im_options |= (data & mask); + update_im_tabs(); + } else { + if (data & 0x1) { /* set the first bit if we're affecting chat buttons */ + mask = (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB); + chat_options &= ~(mask); + chat_options |= (data & mask); + update_chat_tabs(); + } else { + mask = (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB); + im_options &= ~(mask); + im_options |= (data & mask); + update_im_tabs(); + } } save_prefs(); @@ -840,6 +854,13 @@ gtk_widget_show(spin); } +static gboolean current_is_im = FALSE; + +static void not_im() +{ + current_is_im = FALSE; +} + static void im_page() { GtkWidget *parent; @@ -858,8 +879,11 @@ parent = prefdialog->parent; gtk_widget_destroy(prefdialog); + current_is_im = TRUE; + prefdialog = gtk_frame_new(_("IM Options")); gtk_container_add(GTK_CONTAINER(parent), prefdialog); + gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(not_im), NULL); box = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(box), 5); @@ -905,6 +929,13 @@ button = gaim_button(_("Show all conversations in one tabbed window"), &im_options, OPT_IM_ONE_WINDOW, vbox2); + opt = gaim_button(_("Show chats in the same tabbed window"), &convo_options, OPT_CONVO_COMBINE, vbox2); + if (chat_options & OPT_CHAT_ONE_WINDOW) { + if (!(im_options & OPT_IM_ONE_WINDOW)) + gtk_widget_set_sensitive(opt, FALSE); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); + } else + gtk_widget_set_sensitive(opt, FALSE); gaim_button(_("Raise windows on events"), &im_options, OPT_IM_POPUP, vbox2); gaim_button(_("Show logins in window"), &im_options, OPT_IM_LOGON, vbox2); gaim_button(_("Show aliases in tabs/titles"), &im_options, OPT_IM_ALIAS_TAB, vbox2); @@ -1044,6 +1075,13 @@ button = gaim_button(_("Show all chats in one tabbed window"), &chat_options, OPT_CHAT_ONE_WINDOW, vbox2); + opt = gaim_button(_("Show conversations in the same tabbed window"), &convo_options, OPT_CONVO_COMBINE, vbox2); + if (im_options & OPT_IM_ONE_WINDOW) { + if (!(chat_options & OPT_CHAT_ONE_WINDOW)) + gtk_widget_set_sensitive(opt, FALSE); + gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); + } else + gtk_widget_set_sensitive(opt, FALSE); gaim_button(_("Raise windows on events"), &chat_options, OPT_CHAT_POPUP, vbox2); gaim_button(_("Show people joining/leaving in window"), &chat_options, OPT_CHAT_LOGON, vbox2); @@ -1776,8 +1814,6 @@ gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), g_slist_index(away_messages, default_away)); } - - static void away_page() { GtkWidget *parent; @@ -2622,6 +2658,20 @@ if (option == OPT_CONVO_CHECK_SPELLING) toggle_spellchk(); + if (option == OPT_CONVO_COMBINE) { + /* (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB) == (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB) */ + if (current_is_im) { + int set = im_options & (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB); + chat_options &= ~(OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB); + chat_options |= set; + } else { + int set = chat_options & (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB); + im_options &= ~(OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB); + im_options |= set; + } + convo_tabize(); + } + save_prefs(); } @@ -2630,7 +2680,7 @@ im_options ^= option; if (option == OPT_IM_ONE_WINDOW) - tabize(); + im_tabize(); if (option == OPT_IM_HIDE_ICONS) set_hide_icons(); Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- prpl.c 2001/12/02 00:35:34 1.49 +++ prpl.c 2001/12/04 07:53:55 1.50 @@ -612,7 +612,7 @@ } if (!P) { - GtkWidget *no = gtk_label_new(_("You do not currently have any plugins loaded" + GtkWidget *no = gtk_label_new(_("You do not currently have any protocols available" " that are able to register new accounts.")); gtk_box_pack_start(GTK_BOX(reg_area), no, FALSE, FALSE, 5); gtk_widget_show(no); @@ -620,6 +620,18 @@ gtk_widget_set_sensitive(reg_reg, FALSE); return; + } + + gtk_widget_set_sensitive(reg_reg, TRUE); + + while (P) { /* we can safely ignore all the previous ones */ + struct prpl *p = P->data; + P = P->next; + + if (!p->register_user) + continue; + + /* do stuff */ } } Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ui.h 2001/12/02 00:35:34 1.23 +++ ui.h 2001/12/04 07:53:55 1.24 @@ -255,15 +255,13 @@ extern GtkWidget *blist; /* Globals in buddy_chat.c */ -/* it is very important that you don't use this for anything. - * its sole purpose is to allow all group chats to be in one - * window. use struct gaim_connection's buddy_chats instead. */ -extern GList *chats; -/* these are ok to use */ +extern GList *chats; /* list of all chats (only use for tabbing!) */ extern GtkWidget *all_chats; -extern GtkWidget *chat_notebook; extern GtkWidget *joinchat; +/* Globals in conversation.c */ +extern GtkWidget *all_convos; + /* Globals in dialog.c */ extern char fontface[128]; extern char fontxfld[256]; @@ -370,8 +368,9 @@ extern void toggle_smileys(); extern void toggle_timestamps(); extern void update_pixmaps(); -extern void tabize(); +extern void im_tabize(); extern void chat_tabize(); +extern void convo_tabize(); extern void update_convo_color(); extern void update_convo_font(); extern void set_hide_icons(); |
From: Eric W. <war...@us...> - 2001-12-04 05:38:56
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv23555/msn Modified Files: msn.c Log Message: Already in the mood... I mean mode Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- msn.c 2001/11/30 21:16:27 1.42 +++ msn.c 2001/12/04 05:38:53 1.43 @@ -188,6 +188,9 @@ case 216: g_snprintf(msg, sizeof(msg), "Not on list"); break; + case 217: + g_snprintf(msg, sizeof(msg), "User is offline"); + break; case 218: g_snprintf(msg, sizeof(msg), "Already in the mode"); break; |
From: Eric W. <war...@us...> - 2001-12-04 05:19:43
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv20026 Modified Files: napster.xpm status-away.xpm status-here.xpm status-idle.xpm Log Message: 3 Dec 03 Ho-seok Lee ( 244) Resized yahoo and napster icons for gaim. Index: napster.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/napster.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- napster.xpm 2000/12/20 05:23:56 1.1 +++ napster.xpm 2001/12/04 05:19:40 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * napster_xpm[] = { -"13 13 111 2", +"12 13 111 2", " c None", ". c #121279", "+ c #18187F", @@ -112,16 +112,16 @@ "!. c #3C3983", "~. c #252481", "{. c #16167C", -" . + @ # $ ", -" % & * = ", -" - ; > , ' ) # ! ~ { ] ", -" ^ / * ( _ : < [ } | 1 ", -"2 3 4 5 6 7 8 9 0 a b c d ", -"e 3 f g h i j 9 9 9 k l e ", -"m 3 n o p q r 9 9 9 s l t ", -"u v w x y z 9 A B C k D E ", -" F G H I J K L M N O P ", -" Q R S T U V W X Y Z ` ", -" . ...+.@.#.0 $.%. ", -" &.*.=.-.;.>.,. ", -" '.).!.~.{. "}; +" . + # $ ", +" % & * = ", +" - ; > , ' # ! ~ { ] ", +" ^ / * ( _ < [ } | 1 ", +"2 3 4 5 6 7 9 0 a b c d ", +"e 3 f g h i 9 9 9 k l e ", +"m 3 n o p q 9 9 9 s l t ", +"u v w x y z A B C k D E ", +" F G H I N N M N O P ", +" Q R S T U W X Y Z ` ", +" . ...+.#.0 $.%. ", +" &.*.=.;.>.,. ", +" '.).~.{. "}; Index: status-away.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/status-away.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- status-away.xpm 2000/12/11 11:44:22 1.1 +++ status-away.xpm 2001/12/04 05:19:40 1.2 @@ -1,30 +1,27 @@ /* XPM */ static char * status_away_xpm[] = { -"17 17 10 1", +"12 13 11 1", " c None", -". c #FFFFFF", -"+ c #FFFF00", -"@ c #FF0000", -"# c #C6C3C6", -"$ c #848284", -"% c #848200", -"& c #840000", -"* c #000084", -"= c #000000", -" ", -" ###### ", -" ###==%%### ", -" ##==++++%%## ", -" #=++....+.%# ", -" ##=+...++++%## ", -" #=+..*.+*.++%# ", -" #=+.#$##$#++%# ", -" $=&&=+++++++%# ", -" #=@@@@=+++%++%# ", -" &@@@@@@=#%++%## ", -" &......=++++%# ", -" &......=.+%%## ", -" &@@@@@@==%### ", -" #&@@@@=#### ", -" #&&&= ", -" "}; +". c #C6C3C6", +"+ c #000000", +"@ c #848200", +"# c #FFFF00", +"$ c #FFFFFF", +"% c #000084", +"& c #848284", +"* c #840000", +"= c #272727", +"- c #FF0000", +" ..++@@.. ", +" .++####@@. ", +".+##$$$$#$@.", +".+#$$$####@.", +"+#$$%$#%$##@", +"+#$.&..&.##@", +"+#**+######@", +"=*---+##@##@", +"*-----+@##@.", +"*$$$$$+###@.", +"*-----+#@@. ", +".*---++@.. ", +" .**+... "}; Index: status-here.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/status-here.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- status-here.xpm 2000/12/11 11:44:22 1.1 +++ status-here.xpm 2001/12/04 05:19:40 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * status_here_xpm[] = { -"16 16 10 1", +"12 12 10 1", " c None", ". c #C0C0C0", "+ c #000000", @@ -11,20 +11,15 @@ "& c #808080", "* c #800000", "= c #FF0000", -" ", -" ...... ", -" ...++@@... ", -" ..++####@@.. ", -" .+##$$$$#$@. ", -" ..+#$$$####@.. ", -" .+#$$%$#%$##@. ", -" .+#$.&..&.##@. ", -" .+##########@. ", -" .+##*####=##@. ", -" ..+##*==*##@.. ", -" .+########@. ", -" ..++#$$#@@.. ", -" ...+++@... ", -" ...... ", -" "}; - +" ..++@@.. ", +" .++####@@. ", +".+##$$$$#$@.", +".+#$$$####@.", +"+#$$%$#%$##@", +"+#$.&..&.##@", +"+##########@", +"+##*####=##@", +".+##*==*##@.", +".+########@.", +" .++#$$#@@. ", +" ..+++@.. "}; Index: status-idle.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/status-idle.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- status-idle.xpm 2000/12/11 11:44:22 1.1 +++ status-idle.xpm 2001/12/04 05:19:40 1.2 @@ -1,31 +1,29 @@ /* XPM */ static char * status_idle_xpm[] = { -"17 17 11 1", +"12 13 13 1", " c None", -". c #FFFFFF", -"+ c #FFFF00", -"@ c #C6C3C6", -"# c #848284", -"$ c #848200", -"% c #840084", -"& c #00FFFF", -"* c #0000FF", -"= c #000084", -"- c #000000", -" ", -" @@@@@@ ", -" @@@--$$@@@ ", -" @@--++++$$@@ ", -" @-++....+.$@ ", -" @@-+...++++$@@ ", -" @-+..=.+=.++$@ ", -" @-+.@#@@#@++$@ ", -" @-**=+++++++$@ ", -" @=&&#&=+++$++$@ ", -" =&@.-.&=$$++$@@ ", -" =&..=.&=++++$@ ", -" =&-$=.@=.+$$@@ ", -" =&.@.@&%-$@@@ ", -" @=&&&&%@@@@ ", -" @%%%%@ ", -" "}; +". c #C6C3C6", +"+ c #000000", +"@ c #848200", +"# c #FFFF00", +"$ c #FFFFFF", +"% c #000084", +"& c #848284", +"* c #A1A100", +"= c #2B2BFF", +"- c #0000FF", +"; c #00FFFF", +"> c #840084", +" ..++@@.. ", +" .++####@@. ", +".+##$$$$#$@.", +".+#$$$####@.", +"+#$$%$#%$##@", +"+#$.&..&.##@", +"+*=-%######@", +"+%;+;%##@##@", +"%;$%$;%@##@.", +"%+@%$.%###@.", +"%;.$.;>#@@. ", +".%;;;>+@.. ", +" .>>>... "}; |
From: Eric W. <war...@us...> - 2001-12-04 04:51:58
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv15460 Modified Files: proxy.c Log Message: it's quite possible Index: proxy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/proxy.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- proxy.c 2001/11/26 20:15:59 1.33 +++ proxy.c 2001/12/04 04:51:55 1.34 @@ -77,8 +77,10 @@ if (condition & GAIM_WRITE_COND) gaim_cond |= GAIM_INPUT_WRITE; + /* debug_printf("CLOSURE: callback for %d, fd is %d\n", closure->result, g_io_channel_unix_get_fd(source)); + */ closure->function(closure->data, g_io_channel_unix_get_fd(source), gaim_cond); @@ -103,7 +105,7 @@ closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond, gaim_io_invoke, closure, gaim_io_destroy); - debug_printf("CLOSURE: adding input watcher %d for fd %d\n", closure->result, source); + /* debug_printf("CLOSURE: adding input watcher %d for fd %d\n", closure->result, source); */ g_io_channel_unref(channel); return closure->result; @@ -111,7 +113,7 @@ void gaim_input_remove(gint tag) { - debug_printf("CLOSURE: removing input watcher %d\n", tag); + /* debug_printf("CLOSURE: removing input watcher %d\n", tag); */ if (tag > 0) g_source_remove(tag); } |
From: Eric W. <war...@us...> - 2001-12-03 12:22:48
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv23653 Modified Files: prefs.c Log Message: i'm on a mexican, woh-oh, radio Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.208 retrieving revision 1.209 diff -u -d -r1.208 -r1.209 --- prefs.c 2001/12/02 22:36:32 1.208 +++ prefs.c 2001/12/03 12:22:46 1.209 @@ -340,9 +340,9 @@ static void proxy_print_optionrad(GtkRadioButton * entry, int entrynum) { if (entrynum == PROXY_NONE) - gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), FALSE); + gtk_widget_set_sensitive(prefs_proxy_frame, FALSE); else - gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), TRUE); + gtk_widget_set_sensitive(prefs_proxy_frame, TRUE); proxytype = entrynum; save_prefs(); @@ -391,6 +391,9 @@ gtk_widget_show(table); gtk_container_add(GTK_CONTAINER(frame), table); + frame = gtk_frame_new(_("Proxy Server")); + prefs_proxy_frame = frame; + first = gtk_radio_button_new_with_label(NULL, _("No Proxy")); gtk_table_attach(GTK_TABLE(table), first, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); @@ -431,12 +434,9 @@ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); - frame = gtk_frame_new(_("Proxy Server")); gtk_container_set_border_width(GTK_CONTAINER(frame), 5); gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 5); - - prefs_proxy_frame = frame; if (proxytype == PROXY_NONE) gtk_widget_set_sensitive(GTK_WIDGET(frame), FALSE); |
From: Rob F. <rob...@us...> - 2001-12-03 06:25:54
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv11768 Modified Files: ChangeLog Log Message: Oops Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.369 retrieving revision 1.370 diff -u -d -r1.369 -r1.370 --- ChangeLog 2001/12/02 04:24:54 1.369 +++ ChangeLog 2001/12/03 06:25:51 1.370 @@ -5,6 +5,7 @@ * Able to import GnomeICU contact lists * Galeon as browser option (Thanks Rob McQueen) * IRC /list + * Added swedish translation (Thanks Christian Rose) version 0.49 (11/29/2001): * Can compile against GTK+ 2.0 (version 1.3.10/1.3.11) |
From: Rob F. <rob...@us...> - 2001-12-03 06:25:32
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv11668/po Added Files: sv.po Log Message: Swedish translation: Thanks Christian Rose --- NEW FILE: sv.po --- # Swedish messages for gaim. # Copyright (C) 2001 Free Software Foundation, Inc. # Christian Rose <me...@me...>, 2001. # # $Id: sv.po,v 1.1 2001/12/03 06:25:29 robflynn Exp $ # msgid "" msgstr "" "Project-Id-Version: gaim\n" "POT-Creation-Date: 2001-11-15 02:19-0800\n" "PO-Revision-Date: 2001-12-02 19:44+0100\n" "Last-Translator: Christian Rose <me...@me...>\n" "Language-Team: Swedish <sv...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: src/protocols/gg/gg.c:68 msgid "Available" [...2640 lines suppressed...] msgid "(1 message)" msgstr "(1 meddelande)" #: src/server.c:756 msgid "Warned" msgstr "Varnad" #: src/server.c:827 msgid "Yes" msgstr "Ja" #: src/server.c:828 msgid "No" msgstr "Nej" #~ msgid "Error while writing to socket." #~ msgstr "Fel vid skrivande till uttag (socket)." #~ msgid "Password Change Successful" #~ msgstr "Lösenordsändring lyckades" |
From: Rob F. <rob...@us...> - 2001-12-03 06:25:32
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv11668 Modified Files: configure.ac Log Message: Swedish translation: Thanks Christian Rose Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- configure.ac 2001/11/30 07:59:36 1.35 +++ configure.ac 2001/12/03 06:25:29 1.36 @@ -13,7 +13,7 @@ AC_PROG_INSTALL -ALL_LINGUAS="de es fr ko ru zh_CN pl nl" +ALL_LINGUAS="de es fr ko ru zh_CN pl nl sv" AM_GNU_GETTEXT AC_CYGWIN |
From: Eric W. <war...@us...> - 2001-12-02 22:36:35
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv30448 Modified Files: prefs.c Log Message: relives warlike academia Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.207 retrieving revision 1.208 diff -u -d -r1.207 -r1.208 --- prefs.c 2001/12/02 11:30:20 1.207 +++ prefs.c 2001/12/02 22:36:32 1.208 @@ -2366,7 +2366,7 @@ { GtkWidget *vbox; GtkWidget *hpaned; - GtkWidget *scroll; + /* GtkWidget *scroll; */ GtkWidget *container; GtkWidget *hbox; GtkWidget *close; @@ -2393,18 +2393,22 @@ gtk_box_pack_start(GTK_BOX(vbox), hpaned, TRUE, TRUE, 0); gtk_widget_show(hpaned); + /* scroll = gtk_scrolled_window_new(NULL, NULL); gtk_paned_pack1(GTK_PANED(hpaned), scroll, FALSE, FALSE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), GTK_POLICY_NEVER, GTK_POLICY_NEVER); gtk_widget_set_usize(scroll, 125, -1); gtk_widget_show(scroll); + */ preftree = gtk_ctree_new(1, 0); gtk_ctree_set_line_style(GTK_CTREE(preftree), GTK_CTREE_LINES_SOLID); gtk_ctree_set_expander_style(GTK_CTREE(preftree), GTK_CTREE_EXPANDER_TRIANGLE); gtk_clist_set_reorderable(GTK_CLIST(preftree), FALSE); - gtk_container_add(GTK_CONTAINER(scroll), preftree); + /* gtk_container_add(GTK_CONTAINER(scroll), preftree); */ + gtk_paned_pack1(GTK_PANED(hpaned), preftree, FALSE, FALSE); gtk_signal_connect(GTK_OBJECT(preftree), "tree_select_row", GTK_SIGNAL_FUNC(try_me), NULL); + gtk_widget_set_usize(preftree, 125, -1); gtk_widget_show(preftree); container = gtk_frame_new(NULL); |
From: Eric W. <war...@us...> - 2001-12-02 20:42:34
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv4526/gg Modified Files: gg.c Log Message: Arkadiusz Miskiewicz writes: > this time: - and one bugfix Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- gg.c 2001/11/27 22:54:32 1.13 +++ gg.c 2001/12/02 20:42:30 1.14 @@ -482,11 +482,13 @@ case GG_STATE_CONNECTING_HTTP: case GG_STATE_WRITING_HTTP: set_login_progress(gc, 2, _("Handshake")); + break; case GG_STATE_CONNECTING_GG: set_login_progress(gc, 3, _("Connecting to GG server")); break; case GG_STATE_WAITING_FOR_KEY: set_login_progress(gc, 4, _("Waiting for server key")); + break; case GG_STATE_SENDING_KEY: set_login_progress(gc, 5, _("Sending key")); break; |
From: Eric W. <war...@us...> - 2001-12-02 11:30:23
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv24050 Modified Files: conversation.c prefs.c Log Message: eh Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.310 retrieving revision 1.311 diff -u -d -r1.310 -r1.311 --- conversation.c 2001/12/02 08:33:13 1.310 +++ conversation.c 2001/12/02 11:30:19 1.311 @@ -2509,24 +2509,23 @@ int index; GtkNotebook *nb; + if ((im_options & OPT_IM_ALIAS_TAB) && c->gc && ((b = find_buddy(c->gc, c->name)) != NULL)) + text = b->show; + else + text = c->name; + if (!convo_notebook) { char buf[256]; if ((find_log_info(c->name)) || (logging_options & OPT_LOG_ALL)) - g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, c->name); + g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, text); else - g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, c->name); + g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, text); gtk_window_set_title(GTK_WINDOW(c->window), buf); - return; + } else { + nb = GTK_NOTEBOOK(convo_notebook); + index = g_list_index(conversations, c); + gtk_notebook_set_tab_label_text(nb, gtk_notebook_get_nth_page(nb, index), text); } - - if ((im_options & OPT_IM_ALIAS_TAB) && c->gc && ((b = find_buddy(c->gc, c->name)) != NULL)) - text = b->show; - else - text = c->name; - - nb = GTK_NOTEBOOK(convo_notebook); - index = g_list_index(conversations, c); - gtk_notebook_set_tab_label_text(nb, gtk_notebook_get_nth_page(nb, index), text); } void set_convo_titles() Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.206 retrieving revision 1.207 diff -u -d -r1.206 -r1.207 --- prefs.c 2001/12/02 00:35:34 1.206 +++ prefs.c 2001/12/02 11:30:20 1.207 @@ -907,7 +907,7 @@ vbox2); gaim_button(_("Raise windows on events"), &im_options, OPT_IM_POPUP, vbox2); gaim_button(_("Show logins in window"), &im_options, OPT_IM_LOGON, vbox2); - gaim_button(_("Show aliases in tabs"), &im_options, OPT_IM_ALIAS_TAB, vbox2); + gaim_button(_("Show aliases in tabs/titles"), &im_options, OPT_IM_ALIAS_TAB, vbox2); gaim_button(_("Hide window on send"), &im_options, OPT_IM_POPDOWN, vbox2); frame = gtk_frame_new(_("Window Sizes")); |
From: Eric W. <war...@us...> - 2001-12-02 10:08:12
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv13020/protocols/oscar Modified Files: oscar.c Log Message: icy cube Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- oscar.c 2001/12/01 01:13:12 1.79 +++ oscar.c 2001/12/02 10:08:09 1.80 @@ -457,7 +457,7 @@ odata->icq = TRUE; /* this is odd but it's necessary for a proper do_import and do_export */ gc->protocol = PROTO_ICQ; - gc->checkbox = _("Send offline message"); + gc->password[9] = 0; } else { gc->protocol = PROTO_TOC; gc->flags |= OPT_CONN_HTML; @@ -2238,8 +2238,6 @@ } else { if (imflags & IM_FLAG_AWAY) { ret = aim_send_im(odata->sess, name, AIM_IMFLAGS_AWAY, message); - } else if (imflags & IM_FLAG_CHECKBOX) { - ret = aim_send_im(odata->sess, name, AIM_IMFLAGS_OFFLINE, message); } else { struct aim_sendimext_args args; GSList *h = odata->hasicons; @@ -2248,6 +2246,8 @@ struct stat st; args.flags = AIM_IMFLAGS_ACK | AIM_IMFLAGS_CUSTOMFEATURES; + if (odata->icq) + args.flags |= AIM_IMFLAGS_OFFLINE; args.features = gaim_features; args.featureslen = sizeof(gaim_features); @@ -2738,6 +2738,7 @@ GList *m = NULL; struct proto_buddy_menu *pbm; char *n = g_strdup(normalize(gc->username)); + struct oscar_data *odata = gc->proto_data; pbm = g_new0(struct proto_buddy_menu, 1); pbm->label = _("Get Info"); @@ -2745,18 +2746,20 @@ pbm->gc = gc; m = g_list_append(m, pbm); - pbm = g_new0(struct proto_buddy_menu, 1); - pbm->label = _("Get Away Msg"); - pbm->callback = oscar_get_away_msg; - pbm->gc = gc; - m = g_list_append(m, pbm); - - if (strcmp(n, normalize(who))) { + if (!odata->icq) { pbm = g_new0(struct proto_buddy_menu, 1); - pbm->label = _("Direct IM"); - pbm->callback = oscar_ask_direct_im; + pbm->label = _("Get Away Msg"); + pbm->callback = oscar_get_away_msg; pbm->gc = gc; m = g_list_append(m, pbm); + + if (strcmp(n, normalize(who))) { + pbm = g_new0(struct proto_buddy_menu, 1); + pbm->label = _("Direct IM"); + pbm->callback = oscar_ask_direct_im; + pbm->gc = gc; + m = g_list_append(m, pbm); + } } g_free(n); |
From: Eric W. <war...@us...> - 2001-12-02 08:33:16
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv1242 Modified Files: conversation.c Log Message: my 60th birthday. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.309 retrieving revision 1.310 diff -u -d -r1.309 -r1.310 --- conversation.c 2001/12/02 07:49:27 1.309 +++ conversation.c 2001/12/02 08:33:13 1.310 @@ -925,10 +925,10 @@ do_error_dialog(_("Unable to send message: too large"), _("Message Error")); else do_error_dialog(_("Unable to send message: Unknown reason"), _("Message Error")); - } else if (err > 0) { + } else { gtk_editable_delete_text(GTK_EDITABLE(c->entry), 0, -1); - if (away_options & OPT_AWAY_BACK_ON_IM) { + if ((err > 0) && (away_options & OPT_AWAY_BACK_ON_IM)) { if (awaymessage != NULL) { do_im_back(); } else if (c->gc->away) { |
From: Eric W. <war...@us...> - 2001-12-02 07:49:30
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv27677 Modified Files: conversation.c Log Message: i love this. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.308 retrieving revision 1.309 diff -u -d -r1.308 -r1.309 --- conversation.c 2001/12/02 00:35:33 1.308 +++ conversation.c 2001/12/02 07:49:27 1.309 @@ -925,7 +925,7 @@ do_error_dialog(_("Unable to send message: too large"), _("Message Error")); else do_error_dialog(_("Unable to send message: Unknown reason"), _("Message Error")); - } else { + } else if (err > 0) { gtk_editable_delete_text(GTK_EDITABLE(c->entry), 0, -1); if (away_options & OPT_AWAY_BACK_ON_IM) { |
From: Eric W. <war...@us...> - 2001-12-02 07:49:30
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv27677/protocols/irc Modified Files: irc.c Log Message: i love this. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- irc.c 2001/12/02 07:40:07 1.63 +++ irc.c 2001/12/02 07:49:27 1.64 @@ -1350,7 +1350,6 @@ c->gc = NULL; g_snprintf(buf, sizeof(buf), _("You have left %s"), chan); do_error_dialog(buf, _("IRC Part")); - return -1; } } else if (!g_strcasecmp(pdibuf, "WHOIS")) { g_snprintf(buf, sizeof(buf), "WHOIS %s\r\n", word_eol[2]); |
From: Eric W. <war...@us...> - 2001-12-02 07:40:10
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv26712/protocols/irc Modified Files: irc.c Log Message: "guh" is not a word. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- irc.c 2001/12/02 04:24:54 1.62 +++ irc.c 2001/12/02 07:40:07 1.63 @@ -1350,6 +1350,7 @@ c->gc = NULL; g_snprintf(buf, sizeof(buf), _("You have left %s"), chan); do_error_dialog(buf, _("IRC Part")); + return -1; } } else if (!g_strcasecmp(pdibuf, "WHOIS")) { g_snprintf(buf, sizeof(buf), "WHOIS %s\r\n", word_eol[2]); |