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-11-26 22:33:24
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv27607/src Modified Files: conversation.c gaim.h prefs.c Log Message: it's really annoying talking to smarterchild with this turned on Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.305 retrieving revision 1.306 diff -u -d -r1.305 -r1.306 --- conversation.c 2001/11/21 12:22:31 1.305 +++ conversation.c 2001/11/26 22:33:21 1.306 @@ -906,6 +906,9 @@ if (c->makesound && (sound_options & OPT_SOUND_SEND)) play_sound(SEND); + + if (im_options & OPT_IM_POPDOWN) + gtk_widget_hide(c->window); } } else { err = serv_chat_send(c->gc, c->id, buf); @@ -1354,6 +1357,8 @@ if (!c->is_chat && !g_list_find(conversations, c)) return; + + gtk_widget_show(c->window); if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) { if (!who) { Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.298 retrieving revision 1.299 diff -u -d -r1.298 -r1.299 --- gaim.h 2001/11/26 20:39:53 1.298 +++ gaim.h 2001/11/26 22:33:21 1.299 @@ -243,6 +243,7 @@ #define OPT_IM_BR_TAB 0x00000040 #define OPT_IM_HIDE_ICONS 0x00000080 #define OPT_IM_ALIAS_TAB 0x00002000 +#define OPT_IM_POPDOWN 0x00004000 extern guint chat_options; #define OPT_CHAT_ONE_WINDOW 0x00000001 Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.203 retrieving revision 1.204 diff -u -d -r1.203 -r1.204 --- prefs.c 2001/11/21 12:15:37 1.203 +++ prefs.c 2001/11/26 22:33:21 1.204 @@ -907,6 +907,7 @@ 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(_("Hide window on send"), &im_options, OPT_IM_POPDOWN, vbox2); frame = gtk_frame_new(_("Window Sizes")); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); |
From: Eric W. <war...@us...> - 2001-11-26 21:55:56
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv14725/po Modified Files: nl.po Log Message: Floris Eshuis's updated translation Index: nl.po =================================================================== RCS file: /cvsroot/gaim/gaim/po/nl.po,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- nl.po 2001/10/30 20:09:13 1.2 +++ nl.po 2001/11/26 21:55:53 1.3 @@ -1,285 +1,1031 @@ -# Dutch translation for "Gaim" -# Copyright (C) 2001 Free Software Foundation, Inc. -# First AUTHOR <f.e...@hc...> 2001 +# Dutch translation for "Gaim". +# Copyright (C) YEAR Free Software Foundation, Inc. +# Floris Eshuis <f.e...@hc...>, 2001. # +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: Gaim 0.9.19\n" [...3760 lines suppressed...] -msgstr "Kan niet verbinden voor transfer!" - -#: src/toc.c:1705 -msgid "Could not write file header!" -msgstr "Kan bestandskop niet schrijven!" - -#: src/toc.c:1794 -msgid "Gaim - Save As..." -msgstr "Gaim - Opslaan als..." - -#: src/toc.c:1833 -#, c-format -msgid "%s requests %s to accept %d file%s: %s (%.2f %s)%s%s" -msgstr "%s vraagt %s, om bestand %d te accepteren: %s (%.2f %s)%s%s " - -#: src/toc.c:1838 -#, c-format -msgid "%s requests you to send them a file" -msgstr "%s vraagt u om een bestand te verzenden" - |
From: Eric W. <war...@us...> - 2001-11-26 21:55:56
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv14725 Modified Files: ChangeLog Log Message: Floris Eshuis's updated translation Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.359 retrieving revision 1.360 diff -u -d -r1.359 -r1.360 --- ChangeLog 2001/11/21 12:16:15 1.359 +++ ChangeLog 2001/11/26 21:55:53 1.360 @@ -6,6 +6,7 @@ * Updated Russian translation (thanks Grigory Bakunov) * Updated Korean translation (thanks Ho-seok Lee, also for resized ICQ icons) + * Updated Dutch translation (thanks Floris Eshuis) * Option to show aliases in conversation tabs version 0.48 (11/18/2001): |
From: Eric W. <war...@us...> - 2001-11-26 21:22:59
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv2908 Modified Files: gg.c libgg.c libgg.h Log Message: Arkadiusz Miskiewicz's updates to Gadu-Gadu Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gg.c 2001/11/26 20:39:53 1.11 +++ gg.c 2001/11/26 21:22:56 1.12 @@ -2,7 +2,7 @@ * gaim - Gadu-Gadu Protocol Plugin * $Id$ * - * Copyright (C) 2001, Arkadiusz Mi¶kiewicz <mi...@pl...> + * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <mi...@pl...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,7 +62,9 @@ #define AGG_GENDER_NONE -1 -#define AGG_PUBDIR_FORM "/appsvc/fmpubquery2.asp" +#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_PUBDIR_MAX_ENTRIES 200 #define AGG_STATUS_AVAIL _("Available") @@ -73,16 +75,24 @@ #define AGG_STATUS_INVISIBLE_FRIENDS _("Invisible for friends only") #define AGG_STATUS_NOT_AVAIL _("Unavailable") +#define AGG_HTTP_NONE 0 +#define AGG_HTTP_SEARCH 1 +#define AGG_HTTP_USERLIST_IMPORT 2 +#define AGG_HTTP_USERLIST_EXPORT 3 + #define UC_NORMAL 2 struct agg_data { struct gg_session *sess; }; -struct agg_search { +struct agg_http { struct gaim_connection *gc; - gchar *search_data; + gchar *request; + gchar *form; + gchar *host; int inpa; + int type; }; static char *agg_name() @@ -94,7 +104,7 @@ { #ifdef HAVE_ICONV gchar *result = NULL; - if (iconv_string(encdst, encsrc, locstr, locstr+strlen(locstr)+1, &result, NULL) >= 0) + if (iconv_string(encdst, encsrc, locstr, locstr + strlen(locstr) + 1, &result, NULL) >= 0) return result; #endif return g_strdup(locstr); @@ -202,8 +212,7 @@ if ((data[i] >= 'a' && data[i] <= 'z') || (data[i] >= 'A' && data[i] <= 'Z') || (data[i] >= '0' && data[i] <= '9') - || data[i] == '=' || data[i] == '&' - || data[i] == '\n' || data[i] == '\r' || data[i] == '\t' || data[i] == '\014') { + || data[i] == '=' || data[i] == '&') { p = g_realloc(p, j + 1); p[j] = data[i]; j++; @@ -371,10 +380,11 @@ gchar *imsg; gchar user[20]; - g_snprintf(user, sizeof(user), "%u", e->event.msg.sender); + g_snprintf(user, sizeof(user), "%lu", e->event.msg.sender); if (!allowed_uin(gc, user)) break; imsg = charset_convert(e->event.msg.message, "CP1250", find_local_charset()); + /* 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); } @@ -401,7 +411,7 @@ break; } - g_snprintf(user, sizeof(user), "%u", n->uin); + g_snprintf(user, sizeof(user), "%lu", n->uin); serv_got_update(gc, user, (status == UC_UNAVAILABLE) ? 0 : 1, 0, 0, 0, status, 0); n++; @@ -428,7 +438,7 @@ break; } - g_snprintf(user, sizeof(user), "%u", e->event.status.uin); + 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); } @@ -648,50 +658,13 @@ } } -static void search_results(gpointer data, gint source, GaimInputCondition cond) +static void search_results(struct gaim_connection *gc, gchar *webdata) { - struct agg_search *srch = data; - struct gaim_connection *gc = srch->gc; + gchar **webdata_tbl; gchar *buf; char *ptr; - char *webdata; - int len; - char read_data; - gchar **webdata_tbl; int i, j; - if (!g_slist_find(connections, gc)) { - debug_printf("search_callback: g_slist_find error\n"); - gaim_input_remove(srch->inpa); - g_free(srch); - close(source); - return; - } - - webdata = NULL; - len = 0; - - while (read(source, &read_data, 1) > 0 || errno == EWOULDBLOCK) { - if (errno == EWOULDBLOCK) { - errno = 0; - continue; - } - - if (!read_data) - continue; - - len++; - webdata = g_realloc(webdata, len); - webdata[len - 1] = read_data; - } - - webdata = g_realloc(webdata, len + 1); - webdata[len] = 0; - - gaim_input_remove(srch->inpa); - g_free(srch); - close(source); - if ((ptr = strstr(webdata, "query_results:")) == NULL || (ptr = strchr(ptr, '\n')) == NULL) { debug_printf("search_callback: pubdir result [%s]\n", webdata); g_free(webdata); @@ -795,87 +768,294 @@ g_free(buf); } -static void search_callback(gpointer data, gint source, GaimInputCondition cond) +static void agg_import_buddies_results(struct gaim_connection *gc, gchar *webdata) { - struct agg_search *srch = data; - struct gaim_connection *gc = srch->gc; - gchar *search_data = srch->search_data; + gchar *ptr; + gchar **users_tbl; + int i; + if (strstr(webdata, "no_data:")) { + g_free(webdata); + do_error_dialog(_("There is no Buddy List stored on server. Sorry!"), + _("Gadu-Gadu Error")); + return; + } + + if ((ptr = strstr(webdata, "get_results:")) == NULL || (ptr = strchr(ptr, ':')) == NULL) { + debug_printf("agg_import_buddies_list: import buddies result [%s]\n", webdata); + g_free(webdata); + do_error_dialog(_("Couldn't Import Buddies List from Server"), _("Gadu-Gadu Error")); + return; + } + ptr++; + + users_tbl = g_strsplit(ptr, "\n", AGG_PUBDIR_MAX_ENTRIES); + g_free(webdata); + + /* Parse array of Buddies List */ + for (i = 0; users_tbl[i] != NULL; i++) { + gchar **data_tbl; + gchar *name, *show; + + g_strdelimit(users_tbl[i], "\r\t\n\015", ' '); + data_tbl = g_strsplit(users_tbl[i], ";", 8); + + show = data_tbl[3]; + name = data_tbl[6]; + + if (invalid_uin(name)) { + continue; + } + + debug_printf("uin: %s\n", name); + if (!find_buddy(gc, name)) { + /* Default group if none specified on server */ + gchar *group = g_strdup("Gadu-Gadu"); + if (strlen(data_tbl[5])) { + gchar **group_tbl = g_strsplit(data_tbl[5], ",", 2); + if (strlen(group_tbl[0])) { + g_free(group); + group = g_strdup(group_tbl[0]); + } + g_strfreev(group_tbl); + } + /* Add Buddy to our userlist */ + add_buddy(gc, group, name, strlen(show) ? show : name); + do_export(gc); + g_free(group); + } + g_strfreev(data_tbl); + } + g_strfreev(users_tbl); +} + +static void agg_export_buddies_results(struct gaim_connection *gc, gchar *webdata) +{ + if (strstr(webdata, "put_success:")) { + g_free(webdata); + do_error_dialog(_("Buddies List sucessfully transfered into Server"), + _("Gadu-Gadu Information")); + return; + } + + debug_printf("agg_export_buddies_results: webdata [%s]\n", webdata); + g_free(webdata); + do_error_dialog(_("Couldn't transfer Buddies List into Server"), _("Gadu-Gadu Error")); +} + +static void http_results(gpointer data, gint source, GaimInputCondition cond) +{ + struct agg_http *hdata = data; + struct gaim_connection *gc = hdata->gc; + char *webdata; + int len; + char read_data; + + debug_printf("http_results: begin\n"); + + if (!g_slist_find(connections, gc)) { + debug_printf("search_callback: g_slist_find error\n"); + gaim_input_remove(hdata->inpa); + g_free(hdata); + close(source); + return; + } + + webdata = NULL; + len = 0; + + while (read(source, &read_data, 1) > 0 || errno == EWOULDBLOCK) { + if (errno == EWOULDBLOCK) { + errno = 0; + continue; + } + + if (!read_data) + continue; + + len++; + webdata = g_realloc(webdata, len); + webdata[len - 1] = read_data; + } + + webdata = g_realloc(webdata, len + 1); + webdata[len] = 0; + + gaim_input_remove(hdata->inpa); + close(source); + + debug_printf("http_results: type %d, webdata [%s]\n", hdata->type, webdata); + + switch (hdata->type) { + case AGG_HTTP_SEARCH: + search_results(gc, webdata); + break; + case AGG_HTTP_USERLIST_IMPORT: + agg_import_buddies_results(gc, webdata); + break; + case AGG_HTTP_USERLIST_EXPORT: + agg_export_buddies_results(gc, webdata); + break; + case AGG_HTTP_NONE: + default: + debug_printf("http_results: unsupported type %d\n", hdata->type); + break; + } + + g_free(hdata); +} + +static void http_req_callback(gpointer data, gint source, GaimInputCondition cond) +{ + struct agg_http *hdata = data; + struct gaim_connection *gc = hdata->gc; + gchar *request = hdata->request; gchar *buf; char *ptr; - debug_printf("search_callback enter: begin\n"); + debug_printf("http_req_callback: begin\n"); if (!g_slist_find(connections, gc)) { - debug_printf("search_callback: g_slist_find error\n"); - g_free(search_data); - g_free(srch); + debug_printf("http_req_callback: g_slist_find error\n"); + g_free(request); + g_free(hdata); close(source); return; } if (source == -1) { - g_free(search_data); - g_free(srch); + g_free(request); + g_free(hdata); return; } - ptr = encode_postdata(search_data); - g_free(search_data); + ptr = encode_postdata(request); + g_free(request); - debug_printf("search_callback: pubdir request [%s]\n", ptr); + debug_printf("http_req_callback: http request [%s]\n", ptr); - buf = g_strdup_printf("POST " AGG_PUBDIR_FORM " HTTP/1.0\r\n" - "Host: " GG_PUBDIR_HOST "\r\n" + buf = g_strdup_printf("POST %s HTTP/1.0\r\n" + "Host: %s\r\n" "Content-Type: application/x-www-form-urlencoded\r\n" - "User-Agent: Mozilla/4.7 [en] (Win98; I)\r\n" + "User-Agent: " GG_HTTP_USERAGENT "\r\n" "Content-Length: %d\r\n" - "Pragma: no-cache\r\n" "\r\n" "%s\r\n", strlen(ptr), ptr); + "Pragma: no-cache\r\n" "\r\n" "%s\r\n", + hdata->form, hdata->host, strlen(ptr), ptr); g_free(ptr); if (write(source, buf, strlen(buf)) < strlen(buf)) { g_free(buf); - g_free(srch); + g_free(hdata); close(source); - do_error_dialog(_("Couldn't send search request"), _("Gadu-Gadu Error")); + do_error_dialog(_("Couldn't send http request"), _("Gadu-Gadu Error")); return; } g_free(buf); - srch->inpa = gaim_input_add(source, GAIM_INPUT_READ, search_results, srch); + hdata->inpa = gaim_input_add(source, GAIM_INPUT_READ, http_results, hdata); +} + +static void agg_import_buddies(struct gaim_connection *gc) +{ + struct agg_http *hi = g_new0(struct agg_http, 1); + static char msg[AGG_BUF_LEN]; + + 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); + + 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)"), + GG_PUBDIR_HOST); + do_error_dialog(msg, _("Gadu-Gadu Error")); + g_free(hi->request); + g_free(hi); + return; + } } +static void agg_export_buddies(struct gaim_connection *gc) +{ + struct agg_http *he = g_new0(struct agg_http, 1); + static char msg[AGG_BUF_LEN]; + gchar *ptr; + 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); + + while (gr) { + struct group *g = gr->data; + GSList *m = g->members; + while (m) { + struct buddy *b = m->data; + gchar *newdata; + /* GG Number */ + gchar *name = b->name; + /* GG Pseudo */ + gchar *show = strlen(b->show) ? b->show : b->name; + + ptr = he->request; + newdata = g_strdup_printf("%s;%s;%s;%s;%s;%s;%s\r\n", + show, show, show, show, "", g->name, name); + he->request = g_strconcat(ptr, newdata, NULL); + g_free(newdata); + g_free(ptr); + + m = g_slist_next(m); + } + gr = g_slist_next(gr); + } + + if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, http_req_callback, he) < 0) { + g_snprintf(msg, sizeof(msg), _("Buddies List export to Server failed (%s)"), + GG_PUBDIR_HOST); + do_error_dialog(msg, _("Gadu-Gadu Error")); + g_free(he->request); + g_free(he); + return; + } +} + 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) { - struct agg_search *srch = g_new0(struct agg_search, 1); + struct agg_http *srch = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; srch->gc = gc; + srch->type = AGG_HTTP_SEARCH; + srch->form = AGG_PUBDIR_SEARCH_FORM; + srch->host = GG_PUBDIR_HOST; if (email && strlen(email)) { - srch->search_data = g_strdup_printf("Mode=1&Email=%s", email); + srch->request = g_strdup_printf("Mode=1&Email=%s", email); } 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->search_data = 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); + 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); g_free(new_first); g_free(new_last); g_free(new_city); } - if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, search_callback, srch) < 0) { + 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); do_error_dialog(msg, _("Gadu-Gadu Error")); - g_free(srch->search_data); + g_free(srch->request); g_free(srch); return; } @@ -885,6 +1065,10 @@ { if (!strcmp(action, _("Directory Search"))) { show_find_info(gc); + } else if (!strcmp(action, _("Import Buddies List from Server"))) { + agg_import_buddies(gc); + } else if (!strcmp(action, _("Export Buddies List to Server"))) { + agg_export_buddies(gc); } } @@ -893,33 +1077,38 @@ GList *m = NULL; m = g_list_append(m, _("Directory Search")); + m = g_list_append(m, _("Import Buddies List from Server")); + m = g_list_append(m, _("Export Buddies List to Server")); return m; } static void agg_get_info(struct gaim_connection *gc, char *who) { - struct agg_search *srch = g_new0(struct agg_search, 1); + struct agg_http *srch = g_new0(struct agg_http, 1); static char msg[AGG_BUF_LEN]; srch->gc = gc; + srch->type = AGG_HTTP_SEARCH; + srch->form = AGG_PUBDIR_SEARCH_FORM; + srch->host = GG_PUBDIR_HOST; /* If it's invalid uin then maybe it's nickname? */ if (invalid_uin(who)) { gchar *new_who = charset_convert(who, find_local_charset(), "CP1250"); - srch->search_data = 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); + 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); g_free(new_who); } else - srch->search_data = g_strdup_printf("Mode=3&UserId=%s", who); + srch->request = g_strdup_printf("Mode=3&UserId=%s", who); - if (proxy_connect(GG_PUBDIR_HOST, GG_PUBDIR_PORT, search_callback, srch) < 0) { + 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); do_error_dialog(msg, _("Gadu-Gadu Error")); - g_free(srch->search_data); + g_free(srch->request); g_free(srch); return; } Index: libgg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- libgg.c 2001/10/24 08:35:55 1.4 +++ libgg.c 2001/11/26 21:22:56 1.5 @@ -1,7 +1,8 @@ /* $Id$ */ /* - * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...> + * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...>, + * Robert J. Wo¼ny <sp...@at...> * * 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 @@ -26,22 +27,39 @@ #include <arpa/inet.h> #include <sys/ioctl.h> #include <sys/wait.h> -#include <sys/types.h> -#include <fcntl.h> +#include <sys/time.h> #include <netdb.h> #include <errno.h> -#include <string.h> +#ifndef _AIX +# include <string.h> +#endif #include <stdarg.h> #include <pwd.h> +#include <time.h> +#ifdef sun +#include <sys/filio.h> +#endif #include <glib.h> +#if G_BYTE_ORDER == G_BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +#endif #include "libgg.h" +#include "config.h" int gg_debug_level = 0; -#ifdef GG_DEBUG +#ifndef lint + +static char rcsid[] +#ifdef __GNUC__ + __attribute__ ((unused)) +#endif + = "$Id$"; + +#endif /* - * gg_debug_real() + * gg_debug() * * wyrzuca komunikat o danym poziomie, o ile u¿ytkownik sobie tego ¿yczy. * @@ -50,10 +68,10 @@ * * niczego nie zwraca. */ -void gg_debug_real(int level, char *format, ...) +void gg_debug(int level, char *format, ...) { va_list ap; - + if ((gg_debug_level & level)) { va_start(ap, format); vprintf(format, ap); @@ -61,8 +79,6 @@ } } -#endif /* GG_DEBUG */ - /* * fix32() // funkcja wewnêtrzna * @@ -70,15 +86,14 @@ */ static inline unsigned long fix32(unsigned long x) { -#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#ifndef WORDS_BIGENDIAN return x; #else return (unsigned long) - (((x & (unsigned long) 0x000000ffU) << 24) | - ((x & (unsigned long) 0x0000ff00U) << 8) | - ((x & (unsigned long) 0x00ff0000U) >> 8) | - ((x & (unsigned long) 0xff000000U) >> 24)); -#endif + (((x & (unsigned long)0x000000ffU) << 24) | + ((x & (unsigned long)0x0000ff00U) << 8) | + ((x & (unsigned long)0x00ff0000U) >> 8) | ((x & (unsigned long)0xff000000U) >> 24)); +#endif } /* @@ -88,12 +103,11 @@ */ static inline unsigned short fix16(unsigned short x) { -#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#ifndef WORDS_BIGENDIAN return x; #else return (unsigned short) - (((x & (unsigned short) 0x00ffU) << 8) | - ((x & (unsigned short) 0xff00U) >> 8)); + (((x & (unsigned short)0x00ffU) << 8) | ((x & (unsigned short)0xff00U) >> 8)); #endif } @@ -101,8 +115,8 @@ * gg_alloc_sprintf() // funkcja wewnêtrzna * * robi dok³adnie to samo, co sprintf(), tyle ¿e alokuje sobie wcze¶niej - * miejsce na dane. jak znam ¿ycie, ze wzglêdu na ró¿nice miêdzy funkcjami - * vsnprintf() na ró¿nych platformach, nie bêdzie dzia³a³o ;) + * 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() * @@ -112,16 +126,26 @@ char *gg_alloc_sprintf(char *format, ...) { va_list ap; - char *buf = NULL; - int size; + char *buf = NULL, *tmp; + int size = 0, res; va_start(ap, format); - - if ((size = vsnprintf(buf, 0, format, ap)) < 0) - return NULL; - if (!(buf = malloc(size + 1))) - return NULL; + 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); @@ -131,6 +155,40 @@ } /* + * gg_get_line() // funkcja wewnêtrzna + * + * 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_resolve() // funkcja wewnêtrzna * * tworzy pipe'y, forkuje siê i w drugim procesie zaczyna resolvowaæ @@ -150,7 +208,7 @@ struct in_addr a; gg_debug(GG_DEBUG_FUNCTION, "** gg_resolve(..., \"%s\");\n", hostname); - + if (!fd | !pid) { errno = EFAULT; return -1; @@ -165,11 +223,11 @@ if (!res) { if ((a.s_addr = inet_addr(hostname)) == INADDR_NONE) { struct hostent *he; - + if (!(he = gethostbyname(hostname))) a.s_addr = INADDR_NONE; else - memcpy((char*) &a, he->h_addr, sizeof(a)); + memcpy((char *)&a, he->h_addr, sizeof(a)); } write(pipes[1], &a, sizeof(a)); @@ -205,21 +263,16 @@ 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) { -#ifdef FIONBIO if (ioctl(sock, FIONBIO, &one) == -1) { -#else - int flags = fcntl (sock, F_GETFL); - if (flags < 0 || - fcntl (sock, F_SETFL, flags | O_NONBLOCK) < 0) { -#endif - gg_debug(GG_DEBUG_MISC, "-- ioctl() failed. errno = %d (%s)\n", errno, strerror(errno)); + gg_debug(GG_DEBUG_MISC, "-- ioctl() failed. errno = %d (%s)\n", errno, + strerror(errno)); return -1; } } @@ -227,13 +280,16 @@ 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) { - gg_debug(GG_DEBUG_MISC, "-- connect() failed. errno = %d (%s)\n", errno, strerror(errno)); - if (errno && (!async || errno != EINPROGRESS)) + + 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; } @@ -253,7 +309,7 @@ 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) { @@ -289,7 +345,7 @@ int ret = 0, offset, size = 0; gg_debug(GG_DEBUG_FUNCTION, "** gg_recv_packet(...);\n"); - + if (!sess) { errno = EFAULT; return NULL; @@ -301,7 +357,8 @@ gg_debug(GG_DEBUG_MISC, "-- header recv(..., %d) = %d\n", sizeof(h), ret); if (ret < sizeof(h)) { if (errno != EINTR) { - gg_debug(GG_DEBUG_MISC, "-- errno = %d (%s)\n", errno, strerror(errno)); + gg_debug(GG_DEBUG_MISC, "-- errno = %d (%s)\n", errno, + strerror(errno)); return NULL; } } @@ -343,7 +400,7 @@ if (ret > -1 && ret <= size) { offset += ret; size -= ret; - } else if (ret == -1) { + } else if (ret == -1) { gg_debug(GG_DEBUG_MISC, "-- errno = %d (%s)\n", errno, strerror(errno)); if (errno == EAGAIN) { gg_debug(GG_DEBUG_MISC, "-- %d bytes received, %d left\n", offset, size); @@ -353,7 +410,7 @@ return NULL; } if (errno != EINTR) { - /* errno = EINVAL; */ +// errno = EINVAL; free(buf); return NULL; } @@ -362,16 +419,14 @@ sess->recv_left = 0; -#ifdef GG_DEBUG if ((gg_debug_level & GG_DEBUG_DUMP)) { int i; gg_debug(GG_DEBUG_DUMP, ">> received packet (type=%.2x):", h.type); - for (i = 0; i < sizeof(h) + h.length; i++) - gg_debug(GG_DEBUG_DUMP, " %.2x", (unsigned char) buf[i]); + for (i = 0; i < sizeof(h) + h.length; i++) + gg_debug(GG_DEBUG_DUMP, " %.2x", (unsigned char)buf[i]); gg_debug(GG_DEBUG_DUMP, "\n"); } -#endif return buf; } @@ -392,14 +447,16 @@ * zabrak³o pamiêci. inaczej by³ b³±d przy wysy³aniu pakietu. dla errno=0 * nie wys³ano ca³ego pakietu. */ -static int gg_send_packet(int sock, int type, void *packet, int length, void *payload, int payload_length) +static int gg_send_packet(int sock, int type, void *packet, int length, void *payload, + int payload_length) { struct gg_header *h; int res, plen; char *tmp; - gg_debug(GG_DEBUG_FUNCTION, "** gg_send_packet(0x%.2x, %d, %d);\n", type, length, payload_length); - + gg_debug(GG_DEBUG_FUNCTION, "** gg_send_packet(0x%.2x, %d, %d);\n", type, length, + payload_length); + if (length < 0 || payload_length < 0) { gg_debug(GG_DEBUG_MISC, "-- invalid packet/payload length\n"); errno = ERANGE; @@ -411,7 +468,7 @@ return -1; } - h = (struct gg_header*) tmp; + h = (struct gg_header *)tmp; h->type = fix32(type); h->length = fix32(length + payload_length); @@ -420,26 +477,25 @@ if (payload) memcpy(tmp + sizeof(struct gg_header) + length, payload, payload_length); -#ifdef GG_DEBUG if ((gg_debug_level & GG_DEBUG_DUMP)) { int i; gg_debug(GG_DEBUG_DUMP, "%%%% sending packet (type=%.2x):", fix32(h->type)); for (i = 0; i < sizeof(struct gg_header) + fix32(h->length); i++) - gg_debug(GG_DEBUG_DUMP, " %.2x", (unsigned char) tmp[i]); + gg_debug(GG_DEBUG_DUMP, " %.2x", (unsigned char)tmp[i]); gg_debug(GG_DEBUG_DUMP, "\n"); } -#endif plen = sizeof(struct gg_header) + length + payload_length; - + if ((res = write(sock, tmp, plen)) < plen) { - gg_debug(GG_DEBUG_MISC, "-- write() failed. res = %d, errno = %d (%s)\n", res, errno, strerror(errno)); + gg_debug(GG_DEBUG_MISC, "-- write() failed. res = %d, errno = %d (%s)\n", res, errno, + strerror(errno)); free(tmp); return -1; } - free(tmp); + free(tmp); return 0; } @@ -479,6 +535,9 @@ sess->async = async; sess->seq = 0; sess->recv_left = 0; + sess->last_pong = 0; + sess->server_ip = 0; + sess->initial_status = 0; if (async) { if (gg_resolve(&sess->fd, &sess->pid, GG_APPMSG_HOST)) { @@ -491,13 +550,13 @@ if ((a.s_addr = inet_addr(GG_APPMSG_HOST)) == INADDR_NONE) { struct hostent *he; - + if (!(he = gethostbyname(GG_APPMSG_HOST))) { gg_debug(GG_DEBUG_MISC, "-- host %s not found\n", GG_APPMSG_HOST); free(sess); return NULL; } else - memcpy((char*) &a, he->h_addr, sizeof(a)); + memcpy((char *)&a, he->h_addr, sizeof(a)); } if (!(sess->fd = gg_connect(&a, GG_APPMSG_PORT, 0)) == -1) { @@ -518,6 +577,7 @@ } if (e->type == GG_EVENT_CONN_FAILED) { + errno = EACCES; gg_debug(GG_DEBUG_MISC, "-- could not login\n"); gg_free_event(e); free(sess); @@ -598,7 +658,7 @@ if (sess->state == GG_STATE_CONNECTED) gg_change_status(sess, GG_STATUS_NOT_AVAIL); - + if (sess->fd) { shutdown(sess->fd, 2); close(sess->fd); @@ -626,7 +686,7 @@ errno = EFAULT; return -1; } - + if (sess->state != GG_STATE_CONNECTED) { errno = ENOTCONN; return -1; @@ -640,7 +700,7 @@ s.seq = fix32(sess->seq); s.msgclass = fix32(msgclass); sess->seq += (rand() % 0x300) + 0x300; - + if (gg_send_packet(sess->fd, GG_SEND_MSG, &s, sizeof(s), message, strlen(message) + 1) == -1) return -1; @@ -704,7 +764,7 @@ * * je¶li uda³o siê, zwraca 0. je¶li b³±d, dostajemy -1. */ -int gg_notify(struct gg_session *sess, uin_t *userlist, int count) +int gg_notify(struct gg_session *sess, uin_t * userlist, int count) { struct gg_notify *n; uin_t *u; @@ -714,25 +774,25 @@ errno = EFAULT; return -1; } - + if (sess->state != GG_STATE_CONNECTED) { errno = ENOTCONN; return -1; } gg_debug(GG_DEBUG_FUNCTION, "** gg_notify(..., %d);\n", count); - + if (!userlist || !count) return 0; - - if (!(n = (struct gg_notify*) malloc(sizeof(*n) * count))) + + if (!(n = (struct gg_notify *)malloc(sizeof(*n) * count))) return -1; - - for (u = userlist, i = 0; i < count; u++, i++) { + + for (u = userlist, i = 0; i < count; u++, i++) { n[i].uin = fix32(*u); n[i].dunno1 = 3; } - + if (gg_send_packet(sess->fd, GG_NOTIFY, n, sizeof(*n) * count, NULL, 0) == -1) res = -1; @@ -764,12 +824,12 @@ errno = ENOTCONN; return -1; } - + gg_debug(GG_DEBUG_FUNCTION, "** gg_add_notify(..., %u);\n", uin); - + a.uin = fix32(uin); a.dunno1 = 3; - + return gg_send_packet(sess->fd, GG_ADD_NOTIFY, &a, sizeof(a), NULL, 0); } @@ -798,10 +858,10 @@ } gg_debug(GG_DEBUG_FUNCTION, "** gg_remove_notify(..., %u);\n", uin); - + a.uin = fix32(uin); a.dunno1 = 3; - + return gg_send_packet(sess->fd, GG_REMOVE_NOTIFY, &a, sizeof(a), NULL, 0); } @@ -827,12 +887,13 @@ gg_debug(GG_DEBUG_FUNCTION, "** gg_watch_fd_connected(...);\n"); if (!(h = gg_recv_packet(sess))) { - gg_debug(GG_DEBUG_MISC, "-- gg_recv_packet failed. errno = %d (%d)\n", errno, strerror(errno)); + gg_debug(GG_DEBUG_MISC, "-- gg_recv_packet failed. errno = %d (%d)\n", errno, + strerror(errno)); return -1; } - p = (void*) h + sizeof(struct gg_header); - + p = (void *)h + sizeof(struct gg_header); + if (h->type == GG_RECV_MSG) { struct gg_recv_msg *r = p; @@ -842,7 +903,8 @@ e->type = GG_EVENT_MSG; e->event.msg.msgclass = fix32(r->msgclass); e->event.msg.sender = fix32(r->sender); - e->event.msg.message = strdup((char*) r + sizeof(*r)); + e->event.msg.message = strdup((char *)r + sizeof(*r)); + e->event.msg.time = fix32(r->time); } } @@ -851,9 +913,9 @@ int count, i; gg_debug(GG_DEBUG_MISC, "-- received a notify reply\n"); - + e->type = GG_EVENT_NOTIFY; - if (!(e->event.notify = (void*) malloc(h->length + 2 * sizeof(*n)))) { + if (!(e->event.notify = (void *)malloc(h->length + 2 * sizeof(*n)))) { gg_debug(GG_DEBUG_MISC, "-- not enough memory\n"); free(h); return -1; @@ -893,6 +955,12 @@ } } + if (h->type == GG_PONG) { + gg_debug(GG_DEBUG_MISC, "-- received a pong\n"); + + sess->last_pong = time(NULL); + } + free(h); return 0; @@ -944,7 +1012,7 @@ gg_debug(GG_DEBUG_FUNCTION, "** gg_watch_fd(...);\n"); - if (!(e = (void*) malloc(sizeof(*e)))) { + if (!(e = (void *)malloc(sizeof(*e)))) { gg_debug(GG_DEBUG_MISC, "-- not enough memory\n"); return NULL; } @@ -952,15 +1020,16 @@ e->type = GG_EVENT_NONE; switch (sess->state) { - case GG_STATE_RESOLVING: + case GG_STATE_RESOLVING: { struct in_addr a; gg_debug(GG_DEBUG_MISC, "== GG_STATE_RESOLVING\n"); if (read(sess->fd, &a, sizeof(a)) < sizeof(a) || a.s_addr == INADDR_NONE) { - gg_debug(GG_DEBUG_MISC, "-- resolving failed\n"); + gg_debug(GG_DEBUG_MISC, "-- resolving failed\n"); + errno = ENOENT; e->type = GG_EVENT_CONN_FAILED; e->event.failure = GG_FAILURE_RESOLVING; sess->state = GG_STATE_IDLE; @@ -970,6 +1039,8 @@ break; } + sess->server_ip = a.s_addr; + close(sess->fd); waitpid(sess->pid, NULL, 0); @@ -977,50 +1048,83 @@ gg_debug(GG_DEBUG_MISC, "-- resolved, now connecting\n"); if ((sess->fd = gg_connect(&a, GG_APPMSG_PORT, sess->async)) == -1) { - gg_debug(GG_DEBUG_MISC, "-- connection failed\n"); + struct in_addr *addr = (struct in_addr *)&sess->server_ip; - e->type = GG_EVENT_CONN_FAILED; - e->event.failure = GG_FAILURE_CONNECTING; - sess->state = GG_STATE_IDLE; - break; - } + gg_debug(GG_DEBUG_MISC, + "-- connection failed, trying direct connection\n"); - sess->state = GG_STATE_CONNECTING_HTTP; - sess->check = GG_CHECK_WRITE; + if ((sess->fd = gg_connect(addr, GG_DEFAULT_PORT, sess->async)) == -1) { + gg_debug(GG_DEBUG_MISC, + "-- connection failed, trying https connection\n"); + if ((sess->fd = + gg_connect(&a, GG_HTTPS_PORT, sess->async)) == -1) { + gg_debug(GG_DEBUG_MISC, + "-- connect() failed. errno = %d (%s)\n", errno, + strerror(errno)); + e->type = GG_EVENT_CONN_FAILED; + e->event.failure = GG_FAILURE_CONNECTING; + sess->state = GG_STATE_IDLE; + break; + } + } + sess->state = GG_STATE_CONNECTING_GG; + sess->check = GG_CHECK_WRITE; + } else { + sess->state = GG_STATE_CONNECTING_HTTP; + sess->check = GG_CHECK_WRITE; + } + break; } - case GG_STATE_CONNECTING_HTTP: + case GG_STATE_CONNECTING_HTTP: { char buf[1024]; int res, res_size = sizeof(res); gg_debug(GG_DEBUG_MISC, "== GG_STATE_CONNECTING_HTTP\n"); - if (sess->async && (getsockopt(sess->fd, SOL_SOCKET, SO_ERROR, &res, &res_size) || res)) { - gg_debug(GG_DEBUG_MISC, "-- http connection failed, errno = %d (%s)\n", res, strerror(res)); + if (sess->async + && (getsockopt(sess->fd, SOL_SOCKET, SO_ERROR, &res, &res_size) || res)) { + struct in_addr *addr = (struct in_addr *)&sess->server_ip; + gg_debug(GG_DEBUG_MISC, + "-- http connection failed, errno = %d (%s), trying direct connection\n", + res, strerror(res)); - errno = res; - e->type = GG_EVENT_CONN_FAILED; - e->event.failure = GG_FAILURE_CONNECTING; - sess->state = GG_STATE_IDLE; + if ((sess->fd = gg_connect(addr, GG_DEFAULT_PORT, sess->async)) == -1) { + gg_debug(GG_DEBUG_MISC, + "-- connection failed, trying https connection\n"); + if ((sess->fd = + gg_connect(addr, GG_HTTPS_PORT, sess->async)) == -1) { + gg_debug(GG_DEBUG_MISC, + "-- connect() failed. errno = %d (%s)\n", errno, + strerror(errno)); + + e->type = GG_EVENT_CONN_FAILED; + e->event.failure = GG_FAILURE_CONNECTING; + sess->state = GG_STATE_IDLE; + break; + } + } + + sess->state = GG_STATE_CONNECTING_GG; + sess->check = GG_CHECK_WRITE; break; } gg_debug(GG_DEBUG_MISC, "-- http connection succeded, sending query\n"); - snprintf(buf, sizeof(buf) - 1, - "GET /appsvc/appmsg.asp?fmnumber=%u HTTP/1.0\r\n" - "Host: " GG_APPMSG_HOST "\r\n" - "User-Agent: Mozilla/4.7 [en] (Win98; I)\r\n" - "Pragma: no-cache\r\n" - "\r\n", sess->uin); + "GET /appsvc/appmsg.asp?fmnumber=%lu HTTP/1.0\r\n" + "Host: " GG_APPMSG_HOST "\r\n" + "User-Agent: " GG_HTTP_USERAGENT "\r\n" + "Pragma: no-cache\r\n" "\r\n", sess->uin); if (write(sess->fd, buf, strlen(buf)) < strlen(buf)) { gg_debug(GG_DEBUG_MISC, "-- sending query failed\n"); + errno = EIO; e->type = GG_EVENT_CONN_FAILED; e->event.failure = GG_FAILURE_WRITING; sess->state = GG_STATE_IDLE; @@ -1033,7 +1137,7 @@ break; } - case GG_STATE_WRITING_HTTP: + case GG_STATE_WRITING_HTTP: { char buf[1024], *tmp, *host; int port = GG_DEFAULT_PORT; @@ -1043,26 +1147,27 @@ gg_read_line(sess->fd, buf, sizeof(buf) - 1); gg_chomp(buf); - + gg_debug(GG_DEBUG_TRAFFIC, "-- got http response (%s)\n", buf); - + if (strncmp(buf, "HTTP/1.", 7) || strncmp(buf + 9, "200", 3)) { gg_debug(GG_DEBUG_MISC, "-- but that's not what we've expected\n"); + errno = EINVAL; e->type = GG_EVENT_CONN_FAILED; e->event.failure = GG_FAILURE_INVALID; sess->state = GG_STATE_IDLE; break; } - + while (strcmp(buf, "\r\n") && strcmp(buf, "")) gg_read_line(sess->fd, buf, sizeof(buf) - 1); gg_read_line(sess->fd, buf, sizeof(buf) - 1); gg_chomp(buf); - + close(sess->fd); - + gg_debug(GG_DEBUG_TRAFFIC, "-- received http data (%s)\n", buf); tmp = buf; @@ -1085,53 +1190,68 @@ if ((tmp = strchr(host, ':'))) { *tmp = 0; - port = atoi(tmp+1); + port = atoi(tmp + 1); } a.s_addr = inet_addr(host); + sess->server_ip = a.s_addr; if ((sess->fd = gg_connect(&a, port, sess->async)) == -1) { - gg_debug(GG_DEBUG_MISC, "-- connect() failed. errno = %d (%s)\n", errno, strerror(errno)); + gg_debug(GG_DEBUG_MISC, + "-- connection failed, trying https connection\n"); + if ((sess->fd = gg_connect(&a, GG_HTTPS_PORT, sess->async)) == -1) { + gg_debug(GG_DEBUG_MISC, + "-- connection failed, errno = %d (%s)\n", errno, + strerror(errno)); - e->type = GG_EVENT_CONN_FAILED; - e->event.failure = GG_FAILURE_CONNECTING; - sess->state = GG_STATE_IDLE; - break; + e->type = GG_EVENT_CONN_FAILED; + e->event.failure = GG_FAILURE_CONNECTING; + sess->state = GG_STATE_IDLE; + break; + } } sess->state = GG_STATE_CONNECTING_GG; sess->check = GG_CHECK_WRITE; - + break; } - case GG_STATE_CONNECTING_GG: + case GG_STATE_CONNECTING_GG: { int res, res_size = sizeof(res); gg_debug(GG_DEBUG_MISC, "== GG_STATE_CONNECTING_GG\n"); - if (sess->async && (getsockopt(sess->fd, SOL_SOCKET, SO_ERROR, &res, &res_size) || res)) { - gg_debug(GG_DEBUG_MISC, "-- connection failed, errno = %d (%s)\n", errno, strerror(errno)); + if (sess->async + && (getsockopt(sess->fd, SOL_SOCKET, SO_ERROR, &res, &res_size) || res)) { + struct in_addr *addr = (struct in_addr *)&sess->server_ip; - errno = res; - e->type = GG_EVENT_CONN_FAILED; - e->event.failure = GG_FAILURE_CONNECTING; - sess->state = GG_STATE_IDLE; - break; + gg_debug(GG_DEBUG_MISC, + "-- connection failed, trying https connection\n"); + if ((sess->fd = gg_connect(addr, GG_HTTPS_PORT, sess->async)) == -1) { + gg_debug(GG_DEBUG_MISC, + "-- connection failed, errno = %d (%s)\n", errno, + strerror(errno)); + + e->type = GG_EVENT_CONN_FAILED; + e->event.failure = GG_FAILURE_CONNECTING; + sess->state = GG_STATE_IDLE; + break; + } } gg_debug(GG_DEBUG_MISC, "-- connected\n"); - + sess->state = GG_STATE_WAITING_FOR_KEY; sess->check = GG_CHECK_READ; break; } - case GG_STATE_WAITING_FOR_KEY: + case GG_STATE_WAITING_FOR_KEY: { - struct gg_header *h; + struct gg_header *h; struct gg_welcome *w; struct gg_login l; unsigned int hash; @@ -1140,7 +1260,8 @@ gg_debug(GG_DEBUG_MISC, "== GG_STATE_WAITING_FOR_KEY\n"); if (!(h = gg_recv_packet(sess))) { - gg_debug(GG_DEBUG_MISC, "-- gg_recv_packet() failed. errno = %d (%s)\n", errno, strerror(errno)); + gg_debug(GG_DEBUG_MISC, "-- gg_recv_packet() failed. errno = %d (%s)\n", + errno, strerror(errno)); e->type = GG_EVENT_CONN_FAILED; e->event.failure = GG_FAILURE_READING; @@ -1148,43 +1269,46 @@ close(sess->fd); break; } - + if (h->type != GG_WELCOME) { gg_debug(GG_DEBUG_MISC, "-- invalid packet received\n"); free(h); close(sess->fd); + errno = EINVAL; e->type = GG_EVENT_CONN_FAILED; e->event.failure = GG_FAILURE_INVALID; sess->state = GG_STATE_IDLE; break; } - - w = (void*) h + sizeof(struct gg_header); + + w = (void *)h + sizeof(struct gg_header); w->key = fix32(w->key); for (hash = 1; *password; password++) hash *= (*password) + 1; hash *= w->key; - - gg_debug(GG_DEBUG_DUMP, "%%%% klucz serwera %.4x, hash has³a %.8x\n", w->key, hash); - + + gg_debug(GG_DEBUG_DUMP, "%%%% klucz serwera %.4x, hash has³a %.8x\n", w->key, + hash); + free(h); free(sess->password); sess->password = NULL; - + l.uin = fix32(sess->uin); l.hash = fix32(hash); - l.status = fix32(GG_STATUS_AVAIL); + l.status = fix32(sess->initial_status ? sess->initial_status : GG_STATUS_AVAIL); l.dunno = fix32(0x0b); l.local_ip = 0; l.local_port = 0; - + gg_debug(GG_DEBUG_TRAFFIC, "-- sending GG_LOGIN packet\n"); if (gg_send_packet(sess->fd, GG_LOGIN, &l, sizeof(l), NULL, 0) == -1) { - gg_debug(GG_DEBUG_TRAFFIC, "-- oops, failed. errno = %d (%s)\n", errno, strerror(errno)); + gg_debug(GG_DEBUG_TRAFFIC, "-- oops, failed. errno = %d (%s)\n", errno, + strerror(errno)); close(sess->fd); e->type = GG_EVENT_CONN_FAILED; @@ -1192,13 +1316,13 @@ sess->state = GG_STATE_IDLE; break; } - + sess->state = GG_STATE_SENDING_KEY; break; } - case GG_STATE_SENDING_KEY: + case GG_STATE_SENDING_KEY: { struct gg_header *h; @@ -1212,11 +1336,12 @@ close(sess->fd); break; } - + if (h->type == GG_LOGIN_OK) { gg_debug(GG_DEBUG_MISC, "-- login succeded\n"); e->type = GG_EVENT_CONN_SUCCESS; sess->state = GG_STATE_CONNECTED; + free(h); break; } @@ -1227,24 +1352,28 @@ } else { gg_debug(GG_DEBUG_MISC, "-- invalid packet\n"); e->event.failure = GG_FAILURE_INVALID; + errno = EINVAL; } e->type = GG_EVENT_CONN_FAILED; sess->state = GG_STATE_IDLE; close(sess->fd); + free(h); break; } - case GG_STATE_CONNECTED: + case GG_STATE_CONNECTED: { gg_debug(GG_DEBUG_MISC, "== GG_STATE_CONNECTED\n"); if ((res = gg_watch_fd_connected(sess, e)) == -1) { - gg_debug(GG_DEBUG_MISC, "-- watch_fd_connected failed. errno = %d (%s)\n", errno, strerror(errno)); + gg_debug(GG_DEBUG_MISC, + "-- watch_fd_connected failed. errno = %d (%s)\n", errno, + strerror(errno)); - if (errno == EAGAIN) { + if (errno == EAGAIN) { e->type = GG_EVENT_NONE; res = 0; } else @@ -1261,5 +1390,3 @@ return e; } - - Index: libgg.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/libgg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- libgg.h 2001/10/15 19:18:19 1.4 +++ libgg.h 2001/11/26 21:22:56 1.5 @@ -1,7 +1,8 @@ /* $Id$ */ /* - * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...> + * (C) Copyright 2001 Wojtek Kaniewski <woj...@ir...>, + * Robert J. Wo¼ny <sp...@at...> * * 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 @@ -24,201 +25,201 @@ extern "C" { #endif -#define GG_DEBUG 1 - -#ifndef INADDR_NONE +#if defined(sun) && !defined(INADDR_NONE) #define INADDR_NONE 0xffffffff #endif +#include <sys/types.h> + /* * typ zmiennej okre¶laj±cej numerek danej osoby. */ -typedef unsigned int uin_t; + typedef unsigned long uin_t; /* * co¶tam. */ -struct gg_session { - int state, check; - int fd, pid; - int port; - int seq, async; + struct gg_session { + int state, check; + int fd, pid; + int port; + int seq, async; + int last_pong; - uin_t uin; - char *password; + /* powinno byæ ,,in_addr'', ale nie chcê inkludowaæ sieci tutaj */ + unsigned long server_ip; - char *recv_buf; - int recv_done, recv_left; -}; + uin_t uin; + char *password; + int initial_status; + char *recv_buf; + int recv_done, recv_left; + }; + /* * ró¿ne stany asynchronicznej maszynki. */ -enum { - GG_STATE_IDLE = 0, /* wspólne */ - GG_STATE_RESOLVING, - GG_STATE_CONNECTING_HTTP, + enum { + GG_STATE_IDLE = 0, /* wspólne */ + GG_STATE_RESOLVING, + GG_STATE_CONNECTING_HTTP, - GG_STATE_WRITING_HTTP, /* gg_login */ - GG_STATE_CONNECTING_GG, - GG_STATE_WAITING_FOR_KEY, - GG_STATE_SENDING_KEY, - GG_STATE_CONNECTED, + GG_STATE_WRITING_HTTP, /* gg_login */ + GG_STATE_CONNECTING_GG, + GG_STATE_WAITING_FOR_KEY, + GG_STATE_SENDING_KEY, + GG_STATE_CONNECTED, - GG_STATE_READING_HEADER, /* gg_search */ - GG_STATE_READING_DATA, - GG_STATE_PARSING, - GG_STATE_FINISHED, -}; + GG_STATE_READING_HEADER, /* gg_search */ + GG_STATE_READING_DATA, + GG_STATE_PARSING, + GG_STATE_FINISHED, + }; /* * 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, + GG_CHECK_WRITE = 1, + GG_CHECK_READ = 2, + }; -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 */ - int status; /* status danej osoby */ - int remote_ip; /* adres ip delikwenta */ - short remote_port; /* port, na którym s³ucha klient */ - int dunno1; /* == 0x0b */ - 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 dunno1; /* == 0x0b */ + unsigned short dunno2; /* znowu port? */ + } __attribute__ ((packed)); -struct gg_status { - uin_t uin; /* numerek */ - int 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, -}; + enum { + GG_FAILURE_RESOLVING = 1, + GG_FAILURE_CONNECTING, + GG_FAILURE_INVALID, + GG_FAILURE_READING, + GG_FAILURE_WRITING, + GG_FAILURE_PASSWORD, + }; -struct gg_event { - int type; - union { - struct { - uin_t sender; - int msgclass; - 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; -}; + 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; + }; -struct gg_event *gg_watch_fd(struct gg_session *sess); -void gg_free_event(struct gg_event *e); + 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); + 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. */ -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_search_result { + uin_t uin; + char *first_name; + char *last_name; + char *nickname; + int born; + int gender; + char *city; + int active; + }; -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; -}; + 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; + }; -struct gg_search { - struct gg_search_request request; + struct gg_search { + struct gg_search_request request; - /* bzdurki */ - int mode, fd, async, state, check, error, pid; - char *header_buf, *data_buf; - int header_size, data_size; + /* bzdurki */ + int mode, fd, async, state, check, error, pid; + char *header_buf, *data_buf; + int header_size, data_size; - /* wyniki */ - int count; - struct gg_search_result *results; -}; + /* wyniki */ + int count; + struct gg_search_result *results; + }; #define GG_GENDER_NONE 0 #define GG_GENDER_FEMALE 1 #define GG_GENDER_MALE 2 -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); + 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); /* - * je¶li chcemy sobie podebugowaæ, wystarczy zdefiniowaæ GG_DEBUG. + * 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; - -#ifdef GG_DEBUG -# define GG_DEBUG_NET 1 -# define GG_DEBUG_TRAFFIC 2 -# define GG_DEBUG_DUMP 4 -# define GG_DEBUG_FUNCTION 8 -# define GG_DEBUG_MISC 16 - - void gg_debug_real(int level, char *format, ...); -# define gg_debug(x, y...) gg_debug_real(x, y) - -#else + extern int gg_debug_level; -# define gg_debug(x, y...) while(0) { }; +#define GG_DEBUG_NET 1 +#define GG_DEBUG_TRAFFIC 2 +#define GG_DEBUG_DUMP 4 +#define GG_DEBUG_FUNCTION 8 +#define GG_DEBUG_MISC 16 -#endif /* GG_DEBUG */ + void gg_debug(int level, char *format, ...); /* * ------------------------------------------------------------------------- @@ -229,37 +230,41 @@ * ------------------------------------------------------------------------- */ -int gg_resolve(int *fd, int *pid, char *hostname); -int gg_connect(void *addr, int port, int async); -char *gg_alloc_sprintf(char *format, ...); + 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); #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_DEFAULT_PORT 8074 +#define GG_HTTPS_PORT 443 +#define GG_HTTP_USERAGENT "Mozilla/4.7 [en] (Win98; I)" -struct gg_header { - int type; /* typ pakietu */ - int 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 { - int 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 */ - int hash; /* hash has³a */ - int status; /* status na dzieñ dobry */ - int dunno; /* == 0x0b */ - int local_ip; /* mój adres ip */ - 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 @@ -268,76 +273,77 @@ #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 { - int 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 +#define GG_CLASS_OFFLINE GG_CLASS_QUEUED #define GG_CLASS_MSG 0x0004 #define GG_CLASS_CHAT 0x0008 -struct gg_send_msg { - int recipient; - int seq; - int 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 { - int status; - int recipient; - int 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 { - int sender; - int dunno1; - int dunno2; - int 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 |
From: Eric W. <war...@us...> - 2001-11-26 20:39:57
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv17025 Modified Files: dialogs.c gaim.h Log Message: i hate this shit. i should just stop hacking gaim. Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.291 retrieving revision 1.292 diff -u -d -r1.291 -r1.292 --- dialogs.c 2001/11/20 21:25:44 1.291 +++ dialogs.c 2001/11/26 20:39:53 1.292 @@ -1772,7 +1772,13 @@ return NULL; } -void g_show_info_text(struct gaim_connection *gc, char *who, gboolean away, char *info, ...) +/* if away is 0, show regardless and try to get away message + * 1, don't show if regular info isn't shown + * 2, show regardless but don't try to get away message + * + * i wish this were my client. if i were i wouldn't have to deal with this shit. + */ +void g_show_info_text(struct gaim_connection *gc, char *who, int away, char *info, ...) { GtkWidget *ok; GtkWidget *label; @@ -1784,7 +1790,7 @@ va_list ap; struct info_dlg *b = find_info_dlg(gc, who); - if (!b && away) + if (!b && (away == 1)) return; if (!b) { b = g_new0(struct info_dlg, 1); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.297 retrieving revision 1.298 diff -u -d -r1.297 -r1.298 --- gaim.h 2001/11/21 12:15:37 1.297 +++ gaim.h 2001/11/26 20:39:53 1.298 @@ -332,7 +332,7 @@ extern struct conversation *find_conversation(char *); /* Functions in dialogs.c */ -extern void g_show_info_text(struct gaim_connection *, char *, gboolean, char *, ...); +extern void g_show_info_text(struct gaim_connection *, char *, int, char *, ...); extern GtkWidget *do_error_dialog(char *, char *); extern void show_change_passwd(struct gaim_connection *); extern void show_set_dir(struct gaim_connection *); |
From: Eric W. <war...@us...> - 2001-11-26 20:39:57
|
Update of /cvsroot/gaim/gaim/src/protocols/icq In directory usw-pr-cvs1:/tmp/cvs-serv17025/protocols/icq Modified Files: gaim_icq.c Log Message: i hate this shit. i should just stop hacking gaim. Index: gaim_icq.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/icq/gaim_icq.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- gaim_icq.c 2001/11/20 01:01:21 1.21 +++ gaim_icq.c 2001/11/26 20:39:53 1.22 @@ -201,7 +201,7 @@ nick, first, last, email); - g_show_info_text(gc, who, FALSE, buf, NULL); + g_show_info_text(gc, who, 2, buf, NULL); } static void icq_web_pager(icq_Link *link, unsigned char hour, unsigned char minute, |
From: Eric W. <war...@us...> - 2001-11-26 20:39:57
|
Update of /cvsroot/gaim/gaim/src/protocols/zephyr In directory usw-pr-cvs1:/tmp/cvs-serv17025/protocols/zephyr Modified Files: zephyr.c Log Message: i hate this shit. i should just stop hacking gaim. Index: zephyr.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- zephyr.c 2001/11/20 01:01:22 1.16 +++ zephyr.c 2001/11/26 20:39:54 1.17 @@ -349,7 +349,7 @@ g_string_sprintfa(str, "<br>At %s since %s", locs.host, locs.time); } - g_show_info_text(NULL, NULL, FALSE, str->str, NULL); + g_show_info_text(NULL, NULL, 2, str->str, NULL); g_string_free(str, TRUE); } else serv_got_update(zgc, b->name, nlocs, 0, 0, 0, 0, 0); |
From: Eric W. <war...@us...> - 2001-11-26 20:39:57
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv17025/protocols/oscar Modified Files: oscar.c Log Message: i hate this shit. i should just stop hacking gaim. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- oscar.c 2001/11/24 19:15:32 1.72 +++ oscar.c 2001/11/26 20:39:54 1.73 @@ -99,6 +99,7 @@ gboolean killme; gboolean icq; + GSList *evilhack; }; struct chat_connection { @@ -520,6 +521,10 @@ odata->hasicons = g_slist_remove(odata->hasicons, n); g_free(n); } + while (odata->evilhack) { + g_free(odata->evilhack->data); + odata->evilhack = g_slist_remove(odata->evilhack, odata->evilhack->data); + } if (odata->create_name) g_free(odata->create_name); if (odata->email) @@ -1555,9 +1560,12 @@ aim_userinfo_t *info; char *prof_enc = NULL, *prof = NULL; fu16_t infotype; - char buf[BUF_LONG]; + char header[BUF_LONG]; char legend[BUF_LONG]; struct gaim_connection *gc = sess->aux_data; + struct oscar_data *od = gc->proto_data; + GSList *l = od->evilhack; + gboolean evilhack = FALSE; gboolean away; va_list ap; char *asc; @@ -1577,17 +1585,13 @@ "<IMG SRC=\"admin_icon.gif\"> : Administrator")); away = infotype != AIM_GETINFO_GENERALINFO; - if (away && (!prof || !*prof)) { - g_show_info_text(gc, info->sn, away, legend, NULL); - return 1; - } if (info->membersince) asc = g_strdup_printf("Member Since : <B>%s</B><BR>\n", asctime(localtime(&info->membersince))); else asc = g_strdup(""); - g_snprintf(buf, sizeof buf, + g_snprintf(header, sizeof header, _("Username : <B>%s</B> %s <BR>\n" "%s" "Warning Level : <B>%d %%</B><BR>\n" @@ -1600,16 +1604,38 @@ info->idletime); g_free(asc); - g_show_info_text(gc, info->sn, away, away ? "<br><hr>" : buf, - (prof && strlen(prof)) ? - away_subs(prof, gc->username) - : - away ? - _("<i>User has no away message</i>") : - _("<i>No Information Provided</i>"), - legend, - NULL); + while (l) { + char *x = l->data; + if (!strcmp(x, normalize(info->sn))) { + evilhack = TRUE; + g_free(x); + od->evilhack = g_slist_remove(od->evilhack, x); + break; + } + l = l->next; + } + if (away) { + if (evilhack) { + g_show_info_text(gc, info->sn, 2, + header, + (prof && *prof) ? prof : + _("<i>User has no away message</i>"), + legend, NULL); + } else { + g_show_info_text(gc, info->sn, 0, + header, + (prof && *prof) ? prof : NULL, + NULL); + } + } else { + g_show_info_text(gc, info->sn, 1, + "<BR><HR><BR>", + (prof && *prof) ? prof : _("<i>No Information Provided</i>"), + legend, + NULL); + } + return 1; } @@ -2266,16 +2292,17 @@ if (odata->icq) aim_icq_getsimpleinfo(odata->sess, name); else - aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_GENERALINFO); + /* people want the away message on the top, so we get the away message + * first and then get the regular info, since it's too difficult to + * insert in the middle. i hate people. */ + aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_AWAYMESSAGE); } -/* -static void oscar_get_away_msg(struct gaim_connection *g, char *name) { +static void oscar_get_away(struct gaim_connection *g, char *name) { struct oscar_data *odata = (struct oscar_data *)g->proto_data; if (!odata->icq) - aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_AWAYMESSAGE); + aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_GENERALINFO); } -*/ static void oscar_set_dir(struct gaim_connection *g, char *first, char *middle, char *last, char *maiden, char *city, char *state, char *country, int web) { @@ -2692,6 +2719,12 @@ do_ask_dialog(buf, data, oscar_direct_im, oscar_cancel_direct_im); } +static void oscar_get_away_msg(struct gaim_connection *gc, char *who) { + struct oscar_data *od = gc->proto_data; + od->evilhack = g_slist_append(od->evilhack, g_strdup(normalize(who))); + oscar_get_info(gc, who); +} + static GList *oscar_buddy_menu(struct gaim_connection *gc, char *who) { GList *m = NULL; struct proto_buddy_menu *pbm; @@ -2703,6 +2736,12 @@ 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))) { pbm = g_new0(struct proto_buddy_menu, 1); pbm->label = _("Direct IM"); @@ -2915,7 +2954,7 @@ ret->set_info = oscar_set_info; ret->get_info = oscar_get_info; ret->set_away = oscar_set_away; - ret->get_away = NULL; + ret->get_away = oscar_get_away; ret->set_dir = oscar_set_dir; ret->get_dir = NULL; /* Oscar really doesn't have this */ ret->dir_search = oscar_dir_search; |
From: Eric W. <war...@us...> - 2001-11-26 20:39:57
|
Update of /cvsroot/gaim/gaim/src/protocols/toc In directory usw-pr-cvs1:/tmp/cvs-serv17025/protocols/toc Modified Files: toc.c Log Message: i hate this shit. i should just stop hacking gaim. Index: toc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/toc/toc.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- toc.c 2001/11/20 01:01:22 1.34 +++ toc.c 2001/11/26 20:39:54 1.35 @@ -382,7 +382,7 @@ if (!url_text) return; - g_show_info_text(NULL, NULL, FALSE, url_text, NULL); + g_show_info_text(NULL, NULL, 2, url_text, NULL); } static char *show_error_message() |
From: Eric W. <war...@us...> - 2001-11-26 20:39:57
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv17025/protocols/jabber Modified Files: jabber.c Log Message: i hate this shit. i should just stop hacking gaim. Index: jabber.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- jabber.c 2001/11/20 01:01:22 1.27 +++ jabber.c 2001/11/26 20:39:53 1.28 @@ -961,7 +961,7 @@ if (desc) at += g_snprintf(buf + at, sizeof(buf) - at, "<HR>%s<br>\n", desc); - g_show_info_text(gc, buddy, FALSE, buf, NULL); + g_show_info_text(gc, buddy, 2, buf, NULL); g_free(buddy); } |
From: Eric W. <war...@us...> - 2001-11-26 20:39:57
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv17025/protocols/gg Modified Files: gg.c Log Message: i hate this shit. i should just stop hacking gaim. Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- gg.c 2001/11/20 01:01:21 1.10 +++ gg.c 2001/11/26 20:39:53 1.11 @@ -790,7 +790,7 @@ g_strfreev(webdata_tbl); - g_show_info_text(gc, NULL, FALSE, buf, NULL); + g_show_info_text(gc, NULL, 2, buf, NULL); g_free(buf); } |
From: Eric W. <war...@us...> - 2001-11-26 20:39:56
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv17025/protocols/irc Modified Files: irc.c Log Message: i hate this shit. i should just stop hacking gaim. Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- irc.c 2001/11/20 20:47:25 1.58 +++ irc.c 2001/11/26 20:39:53 1.59 @@ -639,7 +639,7 @@ case 318: if (id->in_whois && id->whois_str) { GString *str = decode_html(id->whois_str->str); - g_show_info_text(gc, NULL, FALSE, str->str, NULL); + g_show_info_text(gc, NULL, 2, str->str, NULL); g_string_free(str, TRUE); g_string_free(id->whois_str, TRUE); id->whois_str = NULL; |
From: Eric W. <war...@us...> - 2001-11-26 20:16:02
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv9756 Modified Files: proxy.c Log Message: moocow (transmission) says this is better Index: proxy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/proxy.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- proxy.c 2001/11/19 04:35:39 1.32 +++ proxy.c 2001/11/26 20:15:59 1.33 @@ -547,7 +547,7 @@ return; } - if ((buf[0] != 0x01) || (buf[1] == 0x00)) { + if ((buf[0] != 0x01) || (buf[1] != 0x00)) { close(source); phb->func(phb->data, -1, GAIM_INPUT_READ); g_free(phb->host); |
From: Eric W. <war...@us...> - 2001-11-24 19:15:35
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv24336/protocols/oscar Modified Files: oscar.c Log Message: I don't think anyone is being pleased with the way it is now. So I'll put in this fix. Maybe this will make more people happy. That comment pissed me off so much. I'll put it back to the way it was originally tomorrow when I get home. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- oscar.c 2001/11/20 01:01:22 1.71 +++ oscar.c 2001/11/24 19:15:32 1.72 @@ -1607,7 +1607,7 @@ away ? _("<i>User has no away message</i>") : _("<i>No Information Provided</i>"), - away ? legend : NULL, + legend, NULL); return 1; @@ -2269,11 +2269,13 @@ aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_GENERALINFO); } +/* static void oscar_get_away_msg(struct gaim_connection *g, char *name) { struct oscar_data *odata = (struct oscar_data *)g->proto_data; if (!odata->icq) aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_AWAYMESSAGE); } +*/ static void oscar_set_dir(struct gaim_connection *g, char *first, char *middle, char *last, char *maiden, char *city, char *state, char *country, int web) { @@ -2913,7 +2915,7 @@ ret->set_info = oscar_set_info; ret->get_info = oscar_get_info; ret->set_away = oscar_set_away; - ret->get_away = oscar_get_away_msg; + ret->get_away = NULL; ret->set_dir = oscar_set_dir; ret->get_dir = NULL; /* Oscar really doesn't have this */ ret->dir_search = oscar_dir_search; |
From: Eric W. <war...@us...> - 2001-11-21 12:22:34
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv25815 Modified Files: conversation.c Log Message: forgot i left this in there. it didn't work but didn't hurt being there. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.304 retrieving revision 1.305 diff -u -d -r1.304 -r1.305 --- conversation.c 2001/11/21 12:15:37 1.304 +++ conversation.c 2001/11/21 12:22:31 1.305 @@ -60,8 +60,6 @@ #include "pixmaps/mrt.xpm" #include "pixmaps/download.xpm" -static GtkTooltips *tabtips = NULL; - static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; int state_lock = 0; @@ -2158,7 +2156,6 @@ c->hasfg = 0; if (im_options & OPT_IM_ONE_WINDOW) { - GtkWidget *page; if (!all_convos) { win = all_convos = c->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(win), "conversation", "Gaim"); @@ -2171,11 +2168,6 @@ GTK_SIGNAL_FUNC(delete_all_convo), NULL); convo_notebook = gtk_notebook_new(); - if (!tabtips) { - tabtips = gtk_tooltips_new(); - if (!(im_options & OPT_IM_ALIAS_TAB)) - gtk_tooltips_disable(tabtips); - } if (im_options & OPT_IM_SIDE_TAB) { if (im_options & OPT_IM_BR_TAB) { gtk_notebook_set_tab_pos(GTK_NOTEBOOK(convo_notebook), @@ -2207,11 +2199,6 @@ /* 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)); gtk_widget_show(cont); - - page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(convo_notebook), - g_list_index(conversations, c)); - page = gtk_notebook_get_tab_label(GTK_NOTEBOOK(convo_notebook), page); - gtk_tooltips_set_tip(tabtips, page->parent, c->name, c->name); } else { cont = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); c->window = win; |
From: Eric W. <war...@us...> - 2001-11-21 12:16:18
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv24690 Modified Files: ChangeLog Log Message: i wish i had a spine Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.358 retrieving revision 1.359 diff -u -d -r1.358 -r1.359 --- ChangeLog 2001/11/20 21:13:46 1.358 +++ ChangeLog 2001/11/21 12:16:15 1.359 @@ -6,6 +6,7 @@ * Updated Russian translation (thanks Grigory Bakunov) * Updated Korean translation (thanks Ho-seok Lee, also for resized ICQ icons) + * Option to show aliases in conversation tabs version 0.48 (11/18/2001): * Right-click on links to open/copy URL |
From: Eric W. <war...@us...> - 2001-11-21 12:15:40
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv24559 Modified Files: buddy.c conversation.c gaim.h prefs.c server.c ui.h Log Message: i wish i had a spine Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.277 retrieving revision 1.278 diff -u -d -r1.277 -r1.278 --- buddy.c 2001/11/20 07:20:05 1.277 +++ buddy.c 2001/11/21 12:15:37 1.278 @@ -239,6 +239,7 @@ void handle_buddy_rename(struct buddy *b, char *prevname) { + struct conversation *cnv; struct buddy_show *bs; struct group_show *gs; struct group *g; @@ -254,6 +255,9 @@ else g_snprintf(buf, sizeof(buf), "%s", b->name); gtk_ctree_node_set_text(GTK_CTREE(edittree), c, 0, buf); + + if ((cnv = find_conversation(b->name)) != NULL) + set_convo_title(cnv); gs = find_group_show(prevname); Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.303 retrieving revision 1.304 diff -u -d -r1.303 -r1.304 --- conversation.c 2001/11/20 01:01:14 1.303 +++ conversation.c 2001/11/21 12:15:37 1.304 @@ -60,6 +60,8 @@ #include "pixmaps/mrt.xpm" #include "pixmaps/download.xpm" +static GtkTooltips *tabtips = NULL; + static gchar *ispell_cmd[] = { "ispell", "-a", NULL }; int state_lock = 0; @@ -200,20 +202,13 @@ void rm_log(struct log_conversation *a) { struct conversation *cnv = find_conversation(a->name); - char buf[128]; log_conversations = g_list_remove(log_conversations, a); save_prefs(); - if (cnv) { - if (!(logging_options & OPT_LOG_ALL)) - g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, cnv->name); - else - g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, cnv->name); - if (!(im_options & OPT_IM_ONE_WINDOW)) - gtk_window_set_title(GTK_WINDOW(cnv->window), buf); - } + if (cnv && !(im_options & OPT_IM_ONE_WINDOW)) + set_convo_title(cnv); } struct log_conversation *find_log_info(char *name) @@ -1873,6 +1868,8 @@ cnv->gc = c; + set_convo_title(cnv); + update_buttons_by_protocol(cnv); update_icon(cnv); @@ -2029,6 +2026,8 @@ c->gc = gc; + set_convo_title(c); + update_buttons_by_protocol(c); update_icon(c); @@ -2126,7 +2125,6 @@ { GtkWidget *win; GtkWidget *cont; - char buf[256]; GtkWidget *text; GtkWidget *sw; GtkWidget *send; @@ -2160,6 +2158,7 @@ c->hasfg = 0; if (im_options & OPT_IM_ONE_WINDOW) { + GtkWidget *page; if (!all_convos) { win = all_convos = c->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_wmclass(GTK_WINDOW(win), "conversation", "Gaim"); @@ -2172,6 +2171,11 @@ GTK_SIGNAL_FUNC(delete_all_convo), NULL); convo_notebook = gtk_notebook_new(); + if (!tabtips) { + tabtips = gtk_tooltips_new(); + if (!(im_options & OPT_IM_ALIAS_TAB)) + gtk_tooltips_disable(tabtips); + } if (im_options & OPT_IM_SIDE_TAB) { if (im_options & OPT_IM_BR_TAB) { gtk_notebook_set_tab_pos(GTK_NOTEBOOK(convo_notebook), @@ -2200,8 +2204,14 @@ 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)); gtk_widget_show(cont); + + page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(convo_notebook), + g_list_index(conversations, c)); + page = gtk_notebook_get_tab_label(GTK_NOTEBOOK(convo_notebook), page); + gtk_tooltips_set_tip(tabtips, page->parent, c->name, c->name); } else { cont = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); c->window = win; @@ -2211,14 +2221,10 @@ gtk_container_border_width(GTK_CONTAINER(win), 10); gtk_widget_realize(win); aol_icon(win->window); - if ((find_log_info(c->name)) || ((logging_options & OPT_LOG_ALL))) - g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, c->name); - else - g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, c->name); - gtk_window_set_title(GTK_WINDOW(win), buf); gtk_signal_connect(GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(delete_event_convo), c); } + set_convo_title(c); paned = gtk_vpaned_new(); gtk_paned_set_gutter_size(GTK_PANED(paned), 15); @@ -2503,14 +2509,40 @@ } } -void set_convo_tab_label(struct conversation *c, char *text) +void set_convo_title(struct conversation *c) { - gtk_label_set_text(GTK_LABEL(gtk_notebook_get_tab_label(GTK_NOTEBOOK(convo_notebook), - gtk_notebook_get_nth_page(GTK_NOTEBOOK - (convo_notebook), - g_list_index - (conversations, - c)))), text); + struct buddy *b; + char *text; + int index; + GtkNotebook *nb; + + 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); + else + g_snprintf(buf, sizeof(buf), CONVERSATION_TITLE, c->name); + gtk_window_set_title(GTK_WINDOW(c->window), buf); + return; + } + + 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() +{ + GList *c = conversations; + while (c) { + set_convo_title(c->data); + c = c->next; + } } void raise_convo_tab(struct conversation *c) Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.296 retrieving revision 1.297 diff -u -d -r1.296 -r1.297 --- gaim.h 2001/11/20 01:01:16 1.296 +++ gaim.h 2001/11/21 12:15:37 1.297 @@ -242,6 +242,7 @@ #define OPT_IM_SIDE_TAB 0x00000020 #define OPT_IM_BR_TAB 0x00000040 #define OPT_IM_HIDE_ICONS 0x00000080 +#define OPT_IM_ALIAS_TAB 0x00002000 extern guint chat_options; #define OPT_CHAT_ONE_WINDOW 0x00000001 Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.202 retrieving revision 1.203 diff -u -d -r1.202 -r1.203 --- prefs.c 2001/11/19 10:06:59 1.202 +++ prefs.c 2001/11/21 12:15:37 1.203 @@ -906,6 +906,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); frame = gtk_frame_new(_("Window Sizes")); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); @@ -2628,6 +2629,9 @@ if (option == OPT_IM_HIDE_ICONS) set_hide_icons(); + + if (option == OPT_IM_ALIAS_TAB) + set_convo_titles(); save_prefs(); } Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.211 retrieving revision 1.212 diff -u -d -r1.211 -r1.212 --- server.c 2001/11/20 01:01:21 1.211 +++ server.c 2001/11/21 12:15:37 1.212 @@ -665,34 +665,7 @@ /* server with what's in our record. We want to */ /* store things how THEY want it... */ if (strcmp(name, b->name)) { - GList *cnv = conversations; - struct conversation *cv; - - char *who = g_malloc(80); - - strcpy(who, normalize(name)); - - while (cnv) { - cv = (struct conversation *)cnv->data; - if (!g_strcasecmp(who, normalize(cv->name))) { - if (im_options & OPT_IM_ONE_WINDOW) { - set_convo_tab_label(cv, b->name); - } else { - g_snprintf(cv->name, sizeof(cv->name), "%s", name); - if (find_log_info(name) || (logging_options & OPT_LOG_ALL)) - g_snprintf(who, 63, LOG_CONVERSATION_TITLE, name); - else - g_snprintf(who, 63, CONVERSATION_TITLE, name); - gtk_window_set_title(GTK_WINDOW(cv->window), who); - /* was g_free(buf), but break gives us that - * and freeing twice is not good --Sumner */ - break; - } - } - cnv = cnv->next; - } - g_free(who); - who = g_strdup(b->name); + char *who = g_strdup(b->name); g_snprintf(b->name, sizeof(b->name), "%s", name); handle_buddy_rename(b, who); g_free(who); Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ui.h 2001/11/19 12:03:38 1.20 +++ ui.h 2001/11/21 12:15:37 1.21 @@ -336,7 +336,7 @@ extern void gaim_setup_imhtml(GtkWidget *); extern void update_convo_add_button(struct conversation *); extern void raise_convo_tab(struct conversation *); -extern void set_convo_tab_label(struct conversation *, char *); +extern void set_convo_title(struct conversation *); extern void show_conv(struct conversation *); extern struct conversation *new_conversation(char *); extern void delete_conversation(struct conversation *); @@ -373,6 +373,7 @@ extern void update_convo_color(); extern void update_convo_font(); extern void set_hide_icons(); +extern void set_convo_titles(); /* Functions in dialogs.c */ extern void alias_dialog_bud(struct buddy *); |
From: Eric W. <war...@us...> - 2001-11-21 01:52:45
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv8085 Modified Files: yahoo.c Log Message: game msg. thanks brian macke Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- yahoo.c 2001/11/19 23:32:04 1.16 +++ yahoo.c 2001/11/21 01:52:41 1.17 @@ -90,7 +90,8 @@ YAHOO_SERVICE_CHATLOGOFF, YAHOO_SERVICE_CHATMSG = 0x20, YAHOO_SERVICE_GAMELOGON = 0x28, - YAHOO_SERVICE_GAMELOGOFF = 0x29, + YAHOO_SERVICE_GAMELOGOFF, + YAHOO_SERVICE_GAMEMSG = 0x2a, YAHOO_SERVICE_FILETRANSFER = 0x46, YAHOO_SERVICE_LIST = 0x55, YAHOO_SERVICE_ADDBUDDY = 0x83, @@ -675,6 +676,7 @@ yahoo_process_status(gc, pkt); break; case YAHOO_SERVICE_MESSAGE: + case YAHOO_SERVICE_GAMEMSG: yahoo_process_message(gc, pkt); break; case YAHOO_SERVICE_NEWMAIL: |
From: Eric W. <war...@us...> - 2001-11-20 21:25:47
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv8789 Modified Files: dialogs.c Log Message: well, that was stupid. Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.290 retrieving revision 1.291 diff -u -d -r1.290 -r1.291 --- dialogs.c 2001/11/20 01:01:14 1.290 +++ dialogs.c 2001/11/20 21:25:44 1.291 @@ -2778,10 +2778,10 @@ gtk_object_set_user_data(GTK_OBJECT(c->font_dialog), NULL); if (c->fontxfld[0]) { - gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), + gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(c->font_dialog), c->fontxfld); } else { - gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), + gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(c->font_dialog), DEFAULT_FONT_XFLD); } |
From: Eric W. <war...@us...> - 2001-11-20 21:13:50
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv5354 Modified Files: ChangeLog Log Message: A Lee (Ho-seok Lee)'s updated translation Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.357 retrieving revision 1.358 diff -u -d -r1.357 -r1.358 --- ChangeLog 2001/11/19 16:56:57 1.357 +++ ChangeLog 2001/11/20 21:13:46 1.358 @@ -4,6 +4,8 @@ * Can compile against GTK+ 2.0 (version 1.3.10) * Confirm before removing buddies * Updated Russian translation (thanks Grigory Bakunov) + * Updated Korean translation (thanks Ho-seok Lee, also for + resized ICQ icons) version 0.48 (11/18/2001): * Right-click on links to open/copy URL |
From: Eric W. <war...@us...> - 2001-11-20 21:12:27
|
Update of /cvsroot/gaim/gaim/po In directory usw-pr-cvs1:/tmp/cvs-serv5005 Modified Files: ko.po Log Message: A Lee (Ho-seok Lee)'s updated translation Index: ko.po =================================================================== RCS file: /cvsroot/gaim/gaim/po/ko.po,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ko.po 2001/10/30 16:49:59 1.20 +++ ko.po 2001/11/20 21:12:24 1.21 @@ -4,264 +4,280 @@ # msgid "" msgstr "" -"Project-Id-Version: gaim 0.46\n" -"POT-Creation-Date: 2001-10-18 09:08-0700\n" -"PO-Revision-Date: 2001-10-29 17:24+0900\n" -"Last-Translator: ½É»óÇö <art...@kl...>\n" +"Project-Id-Version: gaim 0.48\n" +"POT-Creation-Date: 2001-11-01 09:55-0800\n" +"PO-Revision-Date: 2001-11-07 16:22+0900\n" +"Last-Translator: ÀÌÈ£¼® <al...@de...>\n" [...3720 lines suppressed...] # src/buddy_chat.c:1163 src/conversation.c:2162 src/dialogs.c:380 # src/dialogs.c:405 -#: src/server.c:758 +#: src/server.c:756 msgid "Warned" msgstr "°æ°í¹Þ¾Ò½À´Ï´Ù" # src/server.c:781 -#: src/server.c:829 +#: src/server.c:827 msgid "Yes" msgstr "³×" # src/server.c:782 -#: src/server.c:830 +#: src/server.c:828 msgid "No" msgstr "¾Æ´Ï¿ä" |
From: Eric W. <war...@us...> - 2001-11-20 21:09:57
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv4002/pixmaps Modified Files: gnomeicu-away.xpm gnomeicu-offline.xpm Log Message: more pixmap resizings from A Lee (Ho-seok Lee) Index: gnomeicu-away.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-away.xpm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gnomeicu-away.xpm 2001/11/20 20:19:42 1.2 +++ gnomeicu-away.xpm 2001/11/20 21:09:54 1.3 @@ -34,10 +34,11 @@ ".++++-+@@+#*", ".;>,',,++&#*", ".),>!')~'&#*", -".{)!])~~^&#*", -".~'/+)'~%_#*", -".^:+@<[}}&#*", -"##+@#######*", -" *+.###*****", -" .###* ", -" .#######* "}; +".')!])~~^&#*", +".~~++)'~%_#*", +".^++@<[}}&#*", +"##++@######*", +" ****##*****", +" ###* ", +" .######* "}; + Index: gnomeicu-offline.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-offline.xpm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gnomeicu-offline.xpm 2001/11/20 20:19:43 1.2 +++ gnomeicu-offline.xpm 2001/11/20 21:09:54 1.3 @@ -32,6 +32,7 @@ ">O$$@.@..X:o", ":::::::::::o", ",oo>:::ooooo", -",,,>:::o,,,,", -",>:::::::o,,", +",,,,>::o,,,,", +",,>::::::o,,", ",,,,,,,,,,,,"}; + |
From: Eric W. <war...@us...> - 2001-11-20 20:47:30
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv30863 Modified Files: irc.c Log Message: maybe this is better? Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- irc.c 2001/11/20 01:01:21 1.57 +++ irc.c 2001/11/20 20:47:25 1.58 @@ -806,6 +806,19 @@ return FALSE; } + if (!idata->online) { + /* Now lets sign ourselves on */ + account_online(gc); + serv_finish_login(gc); + + if (bud_list_cache_exists(gc)) + do_import(gc, NULL); + + /* we don't call this now because otherwise some IRC servers might not like us */ + idata->timer = g_timeout_add(20000, irc_request_buddy_update, gc); + idata->online = TRUE; + } + buf++; process_data_init(pdibuf, buf, word, word_eol, FALSE); @@ -934,19 +947,6 @@ int i = 0; gchar buf[1024]; gboolean off; - - if (!idata->online) { - /* Now lets sign ourselves on */ - account_online(gc); - serv_finish_login(gc); - - if (bud_list_cache_exists(gc)) - do_import(gc, NULL); - - /* we don't call this now because otherwise some IRC servers might not like us */ - idata->timer = g_timeout_add(20000, irc_request_buddy_update, gc); - idata->online = TRUE; - } i = read(idata->fd, buf, 1024); if (i <= 0) { |
From: Eric W. <war...@us...> - 2001-11-20 20:19:46
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv22955/src Modified Files: browser.c sound.c Log Message: Ho-seok Lee's icon resizings Index: browser.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/browser.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- browser.c 2001/11/20 06:16:15 1.18 +++ browser.c 2001/11/20 20:19:43 1.19 @@ -620,8 +620,6 @@ char command[1024]; - char *ms; - g_snprintf(command, sizeof(command), web_command, url); args[0] = "sh"; Index: sound.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/sound.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- sound.c 2001/11/20 06:16:15 1.44 +++ sound.c 2001/11/20 20:19:43 1.45 @@ -405,7 +405,6 @@ if (sound_cmd[0]) { char *args[4]; char command[4096]; - char *ms; g_snprintf(command, sizeof(command), sound_cmd, filename); |
From: Eric W. <war...@us...> - 2001-11-20 20:19:46
|
Update of /cvsroot/gaim/gaim/pixmaps In directory usw-pr-cvs1:/tmp/cvs-serv22955/pixmaps Modified Files: available-away.xpm available-chat.xpm available-dnd.xpm available-xa.xpm available.xpm gnomeicu-away.xpm gnomeicu-dnd.xpm gnomeicu-ffc.xpm gnomeicu-na.xpm gnomeicu-occ.xpm gnomeicu-offline.xpm gnomeicu-online.xpm Log Message: Ho-seok Lee's icon resizings Index: available-away.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/available-away.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- available-away.xpm 2000/12/22 03:14:27 1.1 +++ available-away.xpm 2001/11/20 20:19:42 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * available_away_xpm[] = { -"15 15 7 1", +"12 14 7 1", " c None", ". c #333333", "+ c #FFFF00", @@ -8,18 +8,17 @@ "# c #FFFFFF", "$ c #000000", "% c #4C4C4C", -" ", -" ... ", -" .+++. ", -" .+++++. ", -" @@@@@@@@@ ", -" @#########@ ", -" @#$##$##$$##@ ", -" @#$$#$#$##$#@ ", -" @#$#$$#$$$$#@ ", -" @#$##$#$##$#@ ", -" @#########@ ", -" @@@@@@@@@ ", -" %.$$% ", -" ... ", -" "}; +" .. ", +" .++. ", +" .++++. ", +" @@@@@@@@ ", +" @########@ ", +"@#$##$#$$##@", +"@#$$#$$##$#@", +"@#$#$$$$$$#@", +"@#$##$$##$#@", +" @########@ ", +" @@@@@@@@ ", +" %.$$% ", +" ... ", +" "}; Index: available-chat.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/available-chat.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- available-chat.xpm 2000/12/22 03:14:27 1.1 +++ available-chat.xpm 2001/11/20 20:19:42 1.2 @@ -1,24 +1,23 @@ /* XPM */ static char * available_chat_xpm[] = { -"15 15 6 1", +"12 14 6 1", " c None", ". c #333333", "+ c #FFFF00", "@ c #666666", "# c #000000", "$ c #4C4C4C", -" ", -" ... ", -" .+++. ", -" .+++++. ", -" .++@+@++. ", -" .+@+@+@+. ", -" .+@+++### ", -" .+@+#+++# ", -" .+@#+++++# ", -" .#++#+#++#", -" .#+++++++#", -" $#++#+#++#", -" $.#++#++# ", -" ..#+++# ", -" ### "}; +" ... ", +" .+++. ", +" .+++++. ", +".++@+@++. ", +".+@+@+@+. ", +".+@+++### ", +" .+@+#+++# ", +" .+@#+++++# ", +" .#++#+#++#", +" .#+++++++#", +" $#++#+#++#", +" $.#++#++# ", +" ..#+++# ", +" ### "}; Index: available-dnd.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/available-dnd.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- available-dnd.xpm 2000/12/22 03:14:27 1.1 +++ available-dnd.xpm 2001/11/20 20:19:42 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * available_dnd_xpm[] = { -"15 15 8 1", +"12 14 8 1", " c None", ". c #333333", "+ c #FFFF00", @@ -9,18 +9,17 @@ "$ c #FF0000", "% c #FFFFFF", "& c #4C4C4C", -" ", -" ... ", -" .+++. ", -" .+++++. ", -" .++@+@++. ", -" .+@+@+@+. ", -" .+@+++### ", -" .+@+#$$$# ", -" .+@#%@$@%# ", -" .#$@%@%@$#", -" .#$$@%@$$#", -" &#$@%@%@$#", -" &.#%@$@%# ", -" ..#$$$# ", -" ### "}; +" ... ", +" .+++. ", +" .+++++. ", +".++@+@++. ", +".+@+@+@+. ", +".+@+++### ", +" .+@+#$$$# ", +" .+@#%@$@%# ", +" .#$@%@%@$#", +" .#$$@%@$$#", +" &#$@%@%@$#", +" &.#%@$@%# ", +" ..#$$$# ", +" ### "}; Index: available-xa.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/available-xa.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- available-xa.xpm 2000/12/22 03:14:27 1.1 +++ available-xa.xpm 2001/11/20 20:19:42 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * available_xa_xpm[] = { -"15 15 10 1", +"12 14 10 1", " c None", ". c #FF0000", "+ c #333333", @@ -11,18 +11,17 @@ "& c #000000", "* c #B2B2B2", "= c #4C4C4C", -" ", -" .+++. ", -" .+@@@+. ", -" .@@@@@.## ", -" +.@$@##.%# ", -" +.###%%%&&# ", -" ##.%%%*%&&%# ", -" #%*&*&%&%*&# ", -" #%&%&&%&&%&# ", -" #%&%&%&&%%%# ", -" #*&*%%%### ", -" #%%#### ", -" ###+&&= ", -" +++ ", -" "}; +" .+++. ", +" .+@@@+. ", +" .@@@@@.## ", +" +.@$@##.%# ", +" +.###%%%&&#", +"##.%%%*%&&%#", +"#%*&*&%&%*&#", +"#%&%&&%&&%&#", +"#%&%&%&&%%%#", +" #*&*%%%### ", +" #%%#### ", +" ###+&&= ", +" +++ ", +" "}; Index: available.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/available.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- available.xpm 2000/12/21 10:31:41 1.1 +++ available.xpm 2001/11/20 20:19:42 1.2 @@ -1,23 +1,22 @@ /* XPM */ static char * available_xpm[] = { -"15 15 5 1", +"12 14 5 1", " c None", ". c #333333", "+ c #FFFF00", "@ c #000000", "# c #4C4C4C", -" ", -" ... ", -" .+++. ", -" .+++++. ", -" .+++++++. ", -" .++@+@++. ", -" .++@+@++. ", -" .+++@+++. ", -" .++@++. ", -" .++@++. ", -" .+++. ", -" #@@@# ", -" #@@@# ", -" @@@ ", -" "}; +" ... ", +" .+++. ", +" .+++++. ", +" .+++++++. ", +" .++@+@++. ", +" .++@+@++. ", +" .+++@+++. ", +" .++@++. ", +" .++@++. ", +" .+++. ", +" #@@@# ", +" #@@@# ", +" @@@ ", +" "}; Index: gnomeicu-away.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-away.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gnomeicu-away.xpm 2000/12/08 21:28:32 1.1 +++ gnomeicu-away.xpm 2001/11/20 20:19:42 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * icon_away_xpm[] = { -"13 12 28 1", +"12 12 28 1", " c None", ". c #8B8B8B", "+ c #FFFF00", @@ -29,15 +29,15 @@ "< c #0C3F33", "[ c #09382D", "} c #09382E", -".++@+...+..# ", -".+@@+$%+@+&#*", -".++++=-+@@+#*", -".;>,',,%++&#*", -".),>%!')~'&#*", -".{)!]])~~^&#*", -".~'/+)('~%_#*", -".^:+@+<[}}&#*", -"##+@+#######*", -" **+.###*****", -" .###* ", -" .#######* "}; +".++@+..+..# ", +".+@@+$+@+&#*", +".++++-+@@+#*", +".;>,',,++&#*", +".),>!')~'&#*", +".{)!])~~^&#*", +".~'/+)'~%_#*", +".^:+@<[}}&#*", +"##+@#######*", +" *+.###*****", +" .###* ", +" .#######* "}; Index: gnomeicu-dnd.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-dnd.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gnomeicu-dnd.xpm 2000/12/08 21:28:32 1.1 +++ gnomeicu-dnd.xpm 2001/11/20 20:19:43 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * icon_dnd_xpm[] = { -"15 15 16 1", +"12 14 16 1", " c None", ". c #C1BB7C", "+ c #CFC395", @@ -17,18 +17,17 @@ ", c #FFFFFF", "' c #000000", ") c #666666", -" . ", -" +@# ", -" $%& ", -" * =-; * ", -" * > * ", -" * * ", -" * * ", -"*,,,,,,,,,,,,,*", -"*,'',,',','',,*", -"*,',',')',',',*", -"*,',',')',',',*", -"*,'',,',','',,*", -"*,,,,,,,,,,,,,*", -"***************", -" "}; +" . ", +" +# ", +" $& ", +" * =-;* ", +" * > * ", +" * * ", +"* *", +",,,,,,,,,,,,", +",'',,',','',", +",',',')',','", +",',',')',','", +",'',,',','',", +",,,,,,,,,,,,", +"************"}; Index: gnomeicu-ffc.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-ffc.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gnomeicu-ffc.xpm 2000/12/08 21:28:32 1.1 +++ gnomeicu-ffc.xpm 2001/11/20 20:19:43 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * icon_ffc_xpm[] = { -"16 16 91 1", +"12 14 91 1", " c None", ". c #000000", "+ c #A9A943", @@ -92,19 +92,17 @@ "X c #7D7D7D", "Y c #717171", "Z c #525252", -" ", -" ...... ", -" .+@@@@+. ", -" #$%&**&%+. ", -" =--;>>;-,' ", -" )!~~~{~~]^ ", -" ^%%&*/&%%^(_:< ", -" [>-;>};->|12345", -" 6!7777890abc45", -" ..def@ghij345", -" klmnop3bq45", -" rstuvwbxyz5", -" ABCDEFGHIJ5", -" KLLMNOPLLLQ", -" RSOTU ", -" VMWOXYZ "}; +" .+@@@+. ", +"#$%&*&%+. ", +"=--;>;-,' ", +")!~~~~~]^ ", +"^%%&*&%%^:< ", +"[>-;>;->|345", +" 6!77789bc45", +" def@ghj345", +" klmnopbq45", +" rstuvwxyz5", +" ABCDEFHIJ5", +" KLLMNOLLLQ", +" RSOU ", +" VMWOYZ "}; Index: gnomeicu-na.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-na.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gnomeicu-na.xpm 2000/12/08 21:28:32 1.1 +++ gnomeicu-na.xpm 2001/11/20 20:19:43 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * icon_na_xpm[] = { -"15 15 78 1", +"12 14 78 1", " c None", ". c #F9F900", "+ c #F9E100", @@ -79,18 +79,17 @@ "K c #7D7D7D", "L c #717171", "M c #525252", -" ", -" .......+.+ ", -" .@..@.+@+. ", -" .@@.@+@+@+ ", -" .@.@@.@@@+ ", -" .@.+@+@+@+#$% ", -" ++++++++++&*=-", -" ;>,')!~{]^-", -" /(_:<[}|12-", -" 34567890a2-", -" 3bcdefghi.j", -" klmnopqrstj", -" uvwxyzABBBC", -" DEzFG ", -" HIJzKLM "}; +".......+.+ ", +".@..@.+@+. ", +".@@.@+@+@+ ", +".@.@@.@@@+ ", +".@.+@+@+@+% ", +"++++++++++=-", +" ;>,')!~{]^-", +" /(_:<[}|12-", +" 34567890a2-", +" 3bcdefghi.j", +" klmnopqrstj", +" uvwxyzABBBC", +" DEzFG ", +" HIJzKLM "}; Index: gnomeicu-occ.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-occ.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gnomeicu-occ.xpm 2000/12/08 21:28:32 1.1 +++ gnomeicu-occ.xpm 2001/11/20 20:19:43 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * icon_occ_xpm[] = { -"15 15 65 1", +"12 14 65 1", " c None", ". c #89898D", "+ c #80809E", @@ -66,18 +66,17 @@ "x c #7F7F7F", "y c #7D7D7D", "z c #626262", -" .+++@@@+@# ", -" $%&&*=-;>,' ", -" )!~{]^/(_:' ", -" )!<[}|123:' ", -" )4567890a:' ", -" )bcdefghi:' ", -" jkkkkkkkkl' ", -" mnnopqrnnns ", -" tuqvw ", -" qqxqytz ", -" ", -" sss ", -" s s ss ss ", -" s s s s ", -" sss ss ss s "}; +".+++@@@+@# ", +"$%&&*=-;>,' ", +")!~{]^/(_:' ", +")!<[}|123:' ", +")4567890a:' ", +")bcdefghi:' ", +"jkkkkkkkkl' ", +"mnnopqrnnns ", +" tuqvw ", +" qqxqytz ", +" sss ", +" s s ss ss ", +" s s s s ", +" sss ss ss s"}; Index: gnomeicu-offline.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-offline.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gnomeicu-offline.xpm 2001/10/14 11:36:36 1.1 +++ gnomeicu-offline.xpm 2001/11/20 20:19:43 1.2 @@ -1,7 +1,7 @@ /* XPM */ static char *icon_offline_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 16 18 1", +"12 14 18 1", " c black", ". c #3d4e53", "X c #3f5156", @@ -21,20 +21,17 @@ "> c #8b8b8b", ", c None", /* pixels */ -",,,,,,,,,,,,,,,,", -",,,,,,,,,,,,,,,,", -",,>>>>>>>>>>>:,,", -",,>$&&&%#@@+X:o,", -",,>$;;;--&#+X:o,", -",,>-;;;;;-#+X:o,", -",,>*;;;-;&$+X:o,", -",,>#*--=&##+X:o,", -",,>$&$&*&##+O:o,", -",,>O$$@.@...X:o,", -",,::::::::::::o,", -",,,ooo>:::ooooo,", -",,,,,,>:::o,,,,,", -",,,,>:::::::o,,,", -",,,,,,,,,,,,,,,,", -",,,,,,,,,,,,,,,," -}; +",,,,,,,,,,,,", +">>>>>>>>>>:,", +">$&&&%#@+X:o", +">$;;;--#+X:o", +">-;;;;;#+X:o", +">*;;;-;$+X:o", +">#*--=&#+X:o", +">$&$&*&#+O:o", +">O$$@.@..X:o", +":::::::::::o", +",oo>:::ooooo", +",,,>:::o,,,,", +",>:::::::o,,", +",,,,,,,,,,,,"}; Index: gnomeicu-online.xpm =================================================================== RCS file: /cvsroot/gaim/gaim/pixmaps/gnomeicu-online.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gnomeicu-online.xpm 2000/12/08 21:28:32 1.1 +++ gnomeicu-online.xpm 2001/11/20 20:19:43 1.2 @@ -1,6 +1,6 @@ /* XPM */ static char * icon_online_xpm[] = { -"16 16 50 1", +"12 14 50 1", " c None", ". c #8B8B8B", "+ c #7F7F7F", @@ -51,19 +51,18 @@ "i c #028502", "j c #008600", "k c #7E7E7E", -" ", -" ", -" ...........+ ", -" .@#$%&*=-;>+, ", -" .')!!!~{];>+, ", -" .^/(_:(<[}>+, ", -" .#)|)12%[3>+, ", -" .4%~56%[[7>+, ", -" .@898%0abcd+, ", -" .7efghgijj>+, ", -" +++k++++++++, ", -" ,,,.+++,,,,, ", -" .+++, ", -" .+++++++, ", -" ", -" "}; +" ", +"..........+ ", +".@#$%&*-;>+,", +".')!!!~];>+,", +".^/(_:([}>+,", +".#)|)12[3>+,", +".4%~56%[7>+,", +".@898%0bcd+,", +".7efghgjj>+,", +"+++k+++++++,", +" ,,,.++,,,,,", +" .++, ", +" .++++++, ", +" ", +" "}; |