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: <the...@us...> - 2006-12-15 08:40:03
|
Revision: 18008 http://svn.sourceforge.net/gaim/?rev=18008&view=rev Author: thekingant Date: 2006-12-15 00:39:53 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Patch from Graham Booker to slowly scale up the size of our read or write buffer when transfer files over fast networks. This should hopefully reduce CPU load a tiny bit when transfer large files over fast connections. Modified Paths: -------------- trunk/libgaim/ft.c trunk/libgaim/ft.h Modified: trunk/libgaim/ft.c =================================================================== --- trunk/libgaim/ft.c 2006-12-15 08:23:28 UTC (rev 18007) +++ trunk/libgaim/ft.c 2006-12-15 08:39:53 UTC (rev 18008) @@ -31,6 +31,9 @@ #include "request.h" #include "util.h" +#define FT_INITIAL_BUFFER_SIZE 4096 +#define FT_MAX_BUFFER_SIZE 65535 + static GaimXferUiOps *xfer_ui_ops = NULL; static int gaim_xfer_choose_file(GaimXfer *xfer); @@ -53,6 +56,7 @@ xfer->who = g_strdup(who); xfer->ui_ops = gaim_xfers_get_ui_ops(); xfer->message = NULL; + xfer->current_buffer_size = FT_INITIAL_BUFFER_SIZE; ui_ops = gaim_xfer_get_ui_ops(xfer); @@ -781,6 +785,13 @@ xfer->ops.cancel_recv = fnc; } +static void +gaim_xfer_increase_buffer_size(GaimXfer *xfer) +{ + xfer->current_buffer_size = MIN(xfer->current_buffer_size * 1.5, + FT_MAX_BUFFER_SIZE); +} + gssize gaim_xfer_read(GaimXfer *xfer, guchar **buffer) { @@ -790,9 +801,9 @@ g_return_val_if_fail(buffer != NULL, 0); if (gaim_xfer_get_size(xfer) == 0) - s = 4096; + s = xfer->current_buffer_size; else - s = MIN(gaim_xfer_get_bytes_remaining(xfer), 4096); + s = MIN(gaim_xfer_get_bytes_remaining(xfer), xfer->current_buffer_size); if (xfer->ops.read != NULL) r = (xfer->ops.read)(buffer, xfer); @@ -811,6 +822,14 @@ r = -1; } + if (r == xfer->current_buffer_size) + /* + * We managed to read the entire buffer. This means our this + * network is fast and our buffer is too small, so make it + * bigger. + */ + gaim_xfer_increase_buffer_size(xfer); + return r; } @@ -857,7 +876,7 @@ } if (condition & GAIM_INPUT_WRITE) { - size_t s = MIN(gaim_xfer_get_bytes_remaining(xfer), 4096); + size_t s = MIN(gaim_xfer_get_bytes_remaining(xfer), xfer->current_buffer_size); /* this is so the prpl can keep the connection open if it needs to for some odd reason. */ @@ -883,6 +902,13 @@ } else if (r < s) { /* We have to seek back in the file now. */ fseek(xfer->dest_fp, r - s, SEEK_CUR); + } else { + /* + * We managed to write the entire buffer. This means our + * network is fast and our buffer is too small, so make it + * bigger. + */ + gaim_xfer_increase_buffer_size(xfer); } } Modified: trunk/libgaim/ft.h =================================================================== --- trunk/libgaim/ft.h 2006-12-15 08:23:28 UTC (rev 18007) +++ trunk/libgaim/ft.h 2006-12-15 08:39:53 UTC (rev 18008) @@ -84,7 +84,7 @@ */ struct _GaimXfer { - guint ref; /**< The reference count. */ + guint ref; /**< The reference count. */ GaimXferType type; /**< The type of transfer. */ GaimAccount *account; /**< The account. */ @@ -111,6 +111,9 @@ time_t start_time; /**< When the transfer of data began. */ time_t end_time; /**< When the transfer of data ended. */ + size_t current_buffer_size; /**< This gradually increases for fast + network connections. */ + GaimXferStatusType status; /**< File Transfer's status. */ /* I/O operations. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-15 08:23:47
|
Revision: 18007 http://svn.sourceforge.net/gaim/?rev=18007&view=rev Author: thekingant Date: 2006-12-15 00:23:28 -0800 (Fri, 15 Dec 2006) Log Message: ----------- If status.xml contained a substatus without an account for whatever reason, then we were registering a GaimSavedStatusSub with dbus, freeing it shortly therafter, but not unregistering it with dbus. Modified Paths: -------------- trunk/libgaim/savedstatuses.c Modified: trunk/libgaim/savedstatuses.c =================================================================== --- trunk/libgaim/savedstatuses.c 2006-12-15 07:46:08 UTC (rev 18006) +++ trunk/libgaim/savedstatuses.c 2006-12-15 08:23:28 UTC (rev 18007) @@ -373,7 +373,6 @@ char *data; ret = g_new0(GaimSavedStatusSub, 1); - GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatusSub); /* Read the account */ node = xmlnode_get_child(substatus, "account"); @@ -410,6 +409,7 @@ ret->message = data; } + GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatusSub); return ret; } @@ -447,7 +447,6 @@ int i; ret = g_new0(GaimSavedStatus, 1); - GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatus); attrib = xmlnode_get_attrib(status, "transient"); if ((attrib == NULL) || (strcmp(attrib, "true"))) @@ -506,6 +505,7 @@ ret->substatuses = g_list_prepend(ret->substatuses, new); } + GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatus); return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-15 07:46:23
|
Revision: 18006 http://svn.sourceforge.net/gaim/?rev=18006&view=rev Author: thekingant Date: 2006-12-14 23:46:08 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Another bug fix from Graham Booker to allow gaim_network_get_local_system_ip() to work correctly/reliably on Mac OS X (and probably some BSDs) Modified Paths: -------------- trunk/libgaim/network.c Modified: trunk/libgaim/network.c =================================================================== --- trunk/libgaim/network.c 2006-12-15 07:28:23 UTC (rev 18005) +++ trunk/libgaim/network.c 2006-12-15 07:46:08 UTC (rev 18006) @@ -47,6 +47,16 @@ #include "stun.h" #include "upnp.h" +/* + * Calling sizeof(struct ifreq) isn't always correct on + * Mac OS X (and maybe others). + */ +#ifdef _SIZEOF_ADDR_IFREQ +# define HX_SIZE_OF_IFREQ(a) _SIZEOF_ADDR_IFREQ(a) +#else +# define HX_SIZE_OF_IFREQ(a) sizeof(a) +#endif + #ifdef HAVE_LIBNM #include <libnm_glib.h> @@ -135,7 +145,7 @@ while (tmp < buffer + ifc.ifc_len) { ifr = (struct ifreq *)tmp; - tmp += sizeof(struct ifreq); + tmp += HX_SIZE_OF_IFREQ(*ifr); if (ifr->ifr_addr.sa_family == AF_INET) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-15 07:28:23
|
Revision: 18005 http://svn.sourceforge.net/gaim/?rev=18005&view=rev Author: thekingant Date: 2006-12-14 23:28:23 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Bug fix from Graham Booker. Fix an invalid pointer that resulted from removing the last attribute of an xmlnode. Modified Paths: -------------- trunk/libgaim/xmlnode.c Modified: trunk/libgaim/xmlnode.c =================================================================== --- trunk/libgaim/xmlnode.c 2006-12-15 07:00:32 UTC (rev 18004) +++ trunk/libgaim/xmlnode.c 2006-12-15 07:28:23 UTC (rev 18005) @@ -127,14 +127,16 @@ for(attr_node = node->child; attr_node; attr_node = attr_node->next) { if(attr_node->type == XMLNODE_TYPE_ATTRIB && - !strcmp(attr_node->name, attr)) { + !strcmp(attr_node->name, attr)) + { if(node->child == attr_node) { node->child = attr_node->next; - } else if (node->lastchild == attr_node) { - node->lastchild = sibling; } else { sibling->next = attr_node->next; } + if (node->lastchild == attr_node) { + node->lastchild = sibling; + } xmlnode_free(attr_node); return; } @@ -155,14 +157,16 @@ { if(attr_node->type == XMLNODE_TYPE_ATTRIB && !strcmp(attr_node->name, attr) && - !strcmp(attr_node->xmlns, xmlns)) { + !strcmp(attr_node->xmlns, xmlns)) + { if(node->child == attr_node) { node->child = attr_node->next; - } else if (node->lastchild == attr_node) { - node->lastchild = sibling; } else { sibling->next = attr_node->next; } + if (node->lastchild == attr_node) { + node->lastchild = sibling; + } xmlnode_free(attr_node); return; } @@ -204,7 +208,7 @@ attrib_node->data = g_strdup(value); attrib_node->xmlns = g_strdup(xmlns); - xmlnode_insert_child(node, attrib_node); + xmlnode_insert_child(node, attrib_node); } const char * @@ -231,13 +235,13 @@ g_return_val_if_fail(node != NULL, NULL); for(x = node->child; x; x = x->next) { - if(x->type == XMLNODE_TYPE_ATTRIB && + if(x->type == XMLNODE_TYPE_ATTRIB && !strcmp(attr, x->name) && !strcmp(x->xmlns, xmlns)) { return x->data; } } - return NULL; + return NULL; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-15 07:00:39
|
Revision: 18004 http://svn.sourceforge.net/gaim/?rev=18004&view=rev Author: thekingant Date: 2006-12-14 23:00:32 -0800 (Thu, 14 Dec 2006) Log Message: ----------- This is way less confusing to me Modified Paths: -------------- trunk/libgaim/protocols/yahoo/yahoo_packet.c Modified: trunk/libgaim/protocols/yahoo/yahoo_packet.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo_packet.c 2006-12-15 02:48:27 UTC (rev 18003) +++ trunk/libgaim/protocols/yahoo/yahoo_packet.c 2006-12-15 07:00:32 UTC (rev 18004) @@ -155,7 +155,7 @@ pair->key = strtol(key, NULL, 10); accept = x; /* if x is 0 there was no key, so don't accept it */ - if (len - pos + 1 <= 0) { + if (pos > len) { /* Truncated. Garbage or something. */ accept = FALSE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-15 02:48:27
|
Revision: 18003 http://svn.sourceforge.net/gaim/?rev=18003&view=rev Author: thekingant Date: 2006-12-14 18:48:27 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Get rid of some warnings. It might be good if it were possible to close email notifications in the buddylist. I dunno. Modified Paths: -------------- trunk/gtk/gtknotify.c Modified: trunk/gtk/gtknotify.c =================================================================== --- trunk/gtk/gtknotify.c 2006-12-15 02:42:07 UTC (rev 18002) +++ trunk/gtk/gtknotify.c 2006-12-15 02:48:27 UTC (rev 18003) @@ -343,14 +343,14 @@ GAIM_STOCK_ICON_ONLINE_MSG, GTK_ICON_SIZE_BUTTON, NULL); char *label_text = g_strdup_printf(ngettext("<b>You have %d new e-mail.</b>", "<b>You have %d new e-mails.</b>", - count),count); + count), (int)count); inbox->handle = gc; inbox->url = urls ? g_strdup(urls[0]) : NULL; gaim_gtk_blist_set_headline(label_text, pixbuf, G_CALLBACK(open_inbox_cb), inbox); g_object_unref(pixbuf); - return; + return NULL; } if (mail_dialog == NULL || !detailed) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-15 02:42:22
|
Revision: 18002 http://svn.sourceforge.net/gaim/?rev=18002&view=rev Author: thekingant Date: 2006-12-14 18:42:07 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Two parameters being passed to strncpy() were backwards Modified Paths: -------------- trunk/libgaim/protocols/oscar/libaim.c trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/libgaim/protocols/oscar/libaim.c =================================================================== --- trunk/libgaim/protocols/oscar/libaim.c 2006-12-15 02:40:27 UTC (rev 18001) +++ trunk/libgaim/protocols/oscar/libaim.c 2006-12-15 02:42:07 UTC (rev 18002) @@ -31,6 +31,7 @@ OPT_PROTO_MAIL_CHECK | OPT_PROTO_IM_IMAGE, NULL, /* user_splits */ NULL, /* protocol_options */ + /* The mimimum icon size below is not needed in AIM 6.0 */ {"gif,jpeg,bmp,ico", 48, 48, 50, 50, GAIM_ICON_SCALE_SEND | GAIM_ICON_SCALE_DISPLAY}, /* icon_spec */ oscar_list_icon_aim, /* list_icon */ Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-15 02:40:27 UTC (rev 18001) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-15 02:42:07 UTC (rev 18002) @@ -430,7 +430,7 @@ char *str, *salvage; str = g_malloc(datalen + 1); - strncpy(str, datalen, data); + strncpy(str, data, datalen); str[datalen] = '\0'; salvage = gaim_utf8_salvage(str); ret = g_strdup_printf("%s %s", salvage, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-15 02:40:36
|
Revision: 18001 http://svn.sourceforge.net/gaim/?rev=18001&view=rev Author: thekingant Date: 2006-12-14 18:40:27 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Update our Jabber vcard even when the buddy icon is null. This allows users to remove their buddy icon. Modified Paths: -------------- trunk/libgaim/protocols/jabber/buddy.c Modified: trunk/libgaim/protocols/jabber/buddy.c =================================================================== --- trunk/libgaim/protocols/jabber/buddy.c 2006-12-15 00:40:56 UTC (rev 18000) +++ trunk/libgaim/protocols/jabber/buddy.c 2006-12-15 02:40:27 UTC (rev 18001) @@ -386,8 +386,7 @@ char *avatar_file = NULL; struct tag_attr *tag_attr; - if(js->avatar_hash) - g_free(js->avatar_hash); + g_free(js->avatar_hash); js->avatar_hash = NULL; /* @@ -396,55 +395,53 @@ vc_node = info ? xmlnode_from_str(info, -1) : NULL; avatar_file = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(gc->account)); - if(!vc_node && avatar_file) { + if(!vc_node) { vc_node = xmlnode_new("vCard"); for(tag_attr = vcard_tag_attr_list; tag_attr->attr != NULL; ++tag_attr) xmlnode_set_attrib(vc_node, tag_attr->attr, tag_attr->value); } - if(vc_node) { - if (vc_node->name && - !g_ascii_strncasecmp(vc_node->name, "vCard", 5)) { - GError *error = NULL; - gchar *avatar_data_tmp; - guchar *avatar_data; - gsize avatar_len; + if (vc_node->name && + !g_ascii_strncasecmp(vc_node->name, "vCard", 5)) { + GError *error = NULL; + gchar *avatar_data_tmp; + guchar *avatar_data; + gsize avatar_len; - if(avatar_file && g_file_get_contents(avatar_file, &avatar_data_tmp, &avatar_len, &error)) { - xmlnode *photo, *binval; - gchar *enc; - int i; - unsigned char hashval[20]; - char *p, hash[41]; + if(avatar_file && g_file_get_contents(avatar_file, &avatar_data_tmp, &avatar_len, &error)) { + xmlnode *photo, *binval; + gchar *enc; + int i; + unsigned char hashval[20]; + char *p, hash[41]; - avatar_data = (guchar *) avatar_data_tmp; - photo = xmlnode_new_child(vc_node, "PHOTO"); - binval = xmlnode_new_child(photo, "BINVAL"); - enc = gaim_base64_encode(avatar_data, avatar_len); + avatar_data = (guchar *) avatar_data_tmp; + photo = xmlnode_new_child(vc_node, "PHOTO"); + binval = xmlnode_new_child(photo, "BINVAL"); + enc = gaim_base64_encode(avatar_data, avatar_len); - gaim_cipher_digest_region("sha1", (guchar *)avatar_data, - avatar_len, sizeof(hashval), - hashval, NULL); + gaim_cipher_digest_region("sha1", (guchar *)avatar_data, + avatar_len, sizeof(hashval), + hashval, NULL); - p = hash; - for(i=0; i<20; i++, p+=2) - snprintf(p, 3, "%02x", hashval[i]); - js->avatar_hash = g_strdup(hash); + p = hash; + for(i=0; i<20; i++, p+=2) + snprintf(p, 3, "%02x", hashval[i]); + js->avatar_hash = g_strdup(hash); - xmlnode_insert_data(binval, enc, -1); - g_free(enc); - g_free(avatar_data); - } else if (error != NULL) { - g_error_free(error); - } - g_free(avatar_file); - - iq = jabber_iq_new(js, JABBER_IQ_SET); - xmlnode_insert_child(iq->node, vc_node); - jabber_iq_send(iq); - } else { - xmlnode_free(vc_node); + xmlnode_insert_data(binval, enc, -1); + g_free(enc); + g_free(avatar_data); + } else if (error != NULL) { + g_error_free(error); } + g_free(avatar_file); + + iq = jabber_iq_new(js, JABBER_IQ_SET); + xmlnode_insert_child(iq->node, vc_node); + jabber_iq_send(iq); + } else { + xmlnode_free(vc_node); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-15 00:40:59
|
Revision: 18000 http://svn.sourceforge.net/gaim/?rev=18000&view=rev Author: sadrul Date: 2006-12-14 16:40:56 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Clicking the first window on the taskbar didn't give it focus. Fix that. Modified Paths: -------------- trunk/console/libgnt/gntbindable.c trunk/console/libgnt/gntwm.c Modified: trunk/console/libgnt/gntbindable.c =================================================================== --- trunk/console/libgnt/gntbindable.c 2006-12-14 22:25:18 UTC (rev 17999) +++ trunk/console/libgnt/gntbindable.c 2006-12-15 00:40:56 UTC (rev 18000) @@ -107,10 +107,7 @@ action = g_hash_table_lookup(klass->actions, name); if (action && action->u.action) { - if (list) - return action->u.action(bindable, list); - else - return action->u.action_noparam(bindable); + return action->u.action(bindable, list); } return FALSE; } Modified: trunk/console/libgnt/gntwm.c =================================================================== --- trunk/console/libgnt/gntwm.c 2006-12-14 22:25:18 UTC (rev 17999) +++ trunk/console/libgnt/gntwm.c 2006-12-15 00:40:56 UTC (rev 18000) @@ -300,10 +300,13 @@ GList *l; int n; - if (!wm->ordered || !list) + if (!wm->ordered) return TRUE; - n = GPOINTER_TO_INT(list->data); + if (list) + n = GPOINTER_TO_INT(list->data); + else + n = 0; w = wm->ordered->data; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-14 22:25:18
|
Revision: 17999 http://svn.sourceforge.net/gaim/?rev=17999&view=rev Author: seanegan Date: 2006-12-14 14:25:18 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Setting this namespaced attribute will tell the Google Talk servers that we can accept back a JID from the bind result that isn't necessarily related to the one we requested. This allows googlemail.com users to enter gmail.com as their server and still authenticate properly. Technically, we shouldn't need an attribute like this (this is all valid XMPP), but lesser clients might choke on this. Modified Paths: -------------- trunk/libgaim/protocols/jabber/auth.c Modified: trunk/libgaim/protocols/jabber/auth.c =================================================================== --- trunk/libgaim/protocols/jabber/auth.c 2006-12-14 16:45:42 UTC (rev 17998) +++ trunk/libgaim/protocols/jabber/auth.c 2006-12-14 22:25:18 UTC (rev 17999) @@ -63,7 +63,10 @@ auth = xmlnode_new("auth"); xmlnode_set_namespace(auth, "urn:ietf:params:xml:ns:xmpp-sasl"); - + + xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth"); + xmlnode_set_attrib(auth, "ga:client-users-full-bind-result", "true"); + response = g_string_new(""); response = g_string_append_len(response, "\0", 1); response = g_string_append(response, js->user->node); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-12-14 16:45:43
|
Revision: 17998 http://svn.sourceforge.net/gaim/?rev=17998&view=rev Author: eblanton Date: 2006-12-14 08:45:42 -0800 (Thu, 14 Dec 2006) Log Message: ----------- Stu pointed out that we're writing len elements of size 1, not 1 of size len Modified Paths: -------------- trunk/gtk/gtkconv.c Modified: trunk/gtk/gtkconv.c =================================================================== --- trunk/gtk/gtkconv.c 2006-12-14 16:18:49 UTC (rev 17997) +++ trunk/gtk/gtkconv.c 2006-12-14 16:45:42 UTC (rev 17998) @@ -2404,7 +2404,7 @@ icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); data = gaim_buddy_icon_get_data(icon, &len); - if ((len <= 0) || (data == NULL) || (fwrite(data, 1, len, fp) != 1)) { + if ((len <= 0) || (data == NULL) || (fwrite(data, 1, len, fp) != len)) { gaim_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL); fclose(fp); g_unlink(filename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-12-14 16:18:52
|
Revision: 17997 http://svn.sourceforge.net/gaim/?rev=17997&view=rev Author: eblanton Date: 2006-12-14 08:18:49 -0800 (Thu, 14 Dec 2006) Log Message: ----------- If a buddy icon cannot be retrieved from a conversation, or if the buddy icon write to disk fails to complete, unlink the icon file and abort. This silences a warning, and is more correct to boot. Modified Paths: -------------- trunk/gtk/gtkconv.c Modified: trunk/gtk/gtkconv.c =================================================================== --- trunk/gtk/gtkconv.c 2006-12-14 05:56:50 UTC (rev 17996) +++ trunk/gtk/gtkconv.c 2006-12-14 16:18:49 UTC (rev 17997) @@ -2404,13 +2404,12 @@ icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); data = gaim_buddy_icon_get_data(icon, &len); - if ((len <= 0) || (data == NULL)) { + if ((len <= 0) || (data == NULL) || (fwrite(data, 1, len, fp) != 1)) { gaim_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL); fclose(fp); + g_unlink(filename); return; } - - fwrite(data, 1, len, fp); fclose(fp); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-12-14 05:56:58
|
Revision: 17996 http://svn.sourceforge.net/gaim/?rev=17996&view=rev Author: eblanton Date: 2006-12-13 21:56:50 -0800 (Wed, 13 Dec 2006) Log Message: ----------- This should be friendlier for translators, but doesn't lose meaning Modified Paths: -------------- trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-14 05:14:22 UTC (rev 17995) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-14 05:56:50 UTC (rev 17996) @@ -433,7 +433,8 @@ strncpy(str, datalen, data); str[datalen] = '\0'; salvage = gaim_utf8_salvage(str); - ret = g_strdup_printf(_("%s (There was an error receiving this message. Either you and the buddy you are speaking to have a different encoding selected, or the buddy has a buggy client.)"), salvage); + ret = g_strdup_printf("%s %s", salvage, + _("(There was an error receiving this message. Either you and the buddy you are speaking to have a different encoding selected, or the buddy has a buggy client.)")); g_free(str); g_free(salvage); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-14 05:14:23
|
Revision: 17995 http://svn.sourceforge.net/gaim/?rev=17995&view=rev Author: datallah Date: 2006-12-13 21:14:22 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Fix the 'Typing' and 'Connecting' icons to be the right size Modified Paths: -------------- trunk/gtk/gtkstatusbox.c Modified: trunk/gtk/gtkstatusbox.c =================================================================== --- trunk/gtk/gtkstatusbox.c 2006-12-14 05:02:08 UTC (rev 17994) +++ trunk/gtk/gtkstatusbox.c 2006-12-14 05:14:22 UTC (rev 17995) @@ -1086,7 +1086,7 @@ GtkIconSize icon_size; g_object_set(G_OBJECT(status_box->icon_rend), "xpad", 3, NULL); - icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS_SMALL_TWO_LINE); + icon_size = gtk_icon_size_from_name(GAIM_ICON_SIZE_STATUS_SMALL); if (status_box->connecting_pixbufs[0] != NULL) gdk_pixbuf_unref(status_box->connecting_pixbufs[0]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-14 05:02:20
|
Revision: 17994 http://svn.sourceforge.net/gaim/?rev=17994&view=rev Author: datallah Date: 2006-12-13 21:02:08 -0800 (Wed, 13 Dec 2006) Log Message: ----------- fix the perl bindings for the notify_userinfo changes. Modified Paths: -------------- trunk/libgaim/plugins/perl/common/Notify.xs trunk/libgaim/plugins/perl/common/Util.xs trunk/libgaim/plugins/perl/common/module.h trunk/libgaim/plugins/perl/common/typemap Modified: trunk/libgaim/plugins/perl/common/Notify.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Notify.xs 2006-12-14 04:56:54 UTC (rev 17993) +++ trunk/libgaim/plugins/perl/common/Notify.xs 2006-12-14 05:02:08 UTC (rev 17994) @@ -44,6 +44,65 @@ Gaim::NotifyCloseCallback cb gpointer user_data +void * +gaim_notify_userinfo(gc, who, user_info, cb, user_data) + Gaim::Connection gc + const char *who + Gaim::NotifyUserInfo user_info + Gaim::NotifyCloseCallback cb + gpointer user_data + +Gaim::NotifyUserInfo +gaim_notify_user_info_new() + +void +gaim_notify_user_info_destroy(user_info) + Gaim::NotifyUserInfo user_info + +void +gaim_notify_user_info_get_entries(user_info) + Gaim::NotifyUserInfo user_info +PREINIT: + const GList *l; +PPCODE: + l = gaim_notify_user_info_get_entries(user_info); + for (; l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::NotifyUserInfoEntry"))); + } + +gchar_own * +gaim_notify_user_info_get_text_with_newline(user_info, newline) + Gaim::NotifyUserInfo user_info + const char *newline + +void gaim_notify_user_info_add_pair(user_info, label, value) + Gaim::NotifyUserInfo user_info + const char *label + const char *value + +void gaim_notify_user_info_prepend_pair(user_info, label, value) + Gaim::NotifyUserInfo user_info + const char *label + const char *value + +void gaim_notify_user_info_add_section_break(user_info) + Gaim::NotifyUserInfo user_info + +void gaim_notify_user_info_add_section_header(user_info, label) + Gaim::NotifyUserInfo user_info + const char *label + +void gaim_notify_user_info_remove_last_item(user_info) + Gaim::NotifyUserInfo user_info + +gchar * +gaim_notify_user_info_entry_get_label(user_info_entry) + Gaim::NotifyUserInfoEntry user_info_entry + +gchar * +gaim_notify_user_info_entry_get_value(user_info_entry) + Gaim::NotifyUserInfoEntry user_info_entry + Gaim::NotifyUiOps gaim_notify_get_ui_ops() @@ -77,10 +136,3 @@ void * handle const char *uri -void * -gaim_notify_userinfo(gc, who, text, cb, user_data) - Gaim::Connection gc - const char *who - const char *text - Gaim::NotifyCloseCallback cb - gpointer user_data Modified: trunk/libgaim/plugins/perl/common/Util.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Util.xs 2006-12-14 04:56:54 UTC (rev 17993) +++ trunk/libgaim/plugins/perl/common/Util.xs 2006-12-14 05:02:08 UTC (rev 17994) @@ -82,10 +82,10 @@ gaim_home_dir() gboolean -gaim_markup_extract_info_field(str, len, dest, start_token, skip, end_token, check_value, no_value_token, display_name, is_link, link_prefix, format_cb) +gaim_markup_extract_info_field(str, len, user_info, start_token, skip, end_token, check_value, no_value_token, display_name, is_link, link_prefix, format_cb) const char *str int len - GString *dest + Gaim::NotifyUserInfo user_info const char *start_token int skip const char *end_token Modified: trunk/libgaim/plugins/perl/common/module.h =================================================================== --- trunk/libgaim/plugins/perl/common/module.h 2006-12-14 04:56:54 UTC (rev 17993) +++ trunk/libgaim/plugins/perl/common/module.h 2006-12-14 05:02:08 UTC (rev 17994) @@ -181,6 +181,8 @@ typedef GaimNotifySearchButton * Gaim__NotifySearchButton; typedef GaimNotifyType Gaim__NotifyType; typedef GaimNotifyUiOps * Gaim__NotifyUiOps; +typedef GaimNotifyUserInfo * Gaim__NotifyUserInfo; +typedef GaimNotifyUserInfoEntry * Gaim__NotifyUserInfoEntry; /* plugin.h */ typedef GaimPlugin * Gaim__Plugin; Modified: trunk/libgaim/plugins/perl/common/typemap =================================================================== --- trunk/libgaim/plugins/perl/common/typemap 2006-12-14 04:56:54 UTC (rev 17993) +++ trunk/libgaim/plugins/perl/common/typemap 2006-12-14 05:02:08 UTC (rev 17994) @@ -99,6 +99,8 @@ Gaim::NotifySearchButton T_GaimObj Gaim::NotifyType T_IV Gaim::NotifyUiOps T_GaimObj +Gaim::NotifyUserInfo T_GaimObj +Gaim::NotifyUserInfoEntry T_GaimObj Gaim::Plugin T_GaimObj Gaim::PluginType T_IV This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-14 04:58:37
|
Revision: 17993 http://svn.sourceforge.net/gaim/?rev=17993&view=rev Author: seanegan Date: 2006-12-13 20:56:54 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Blocking on Google Talk. Our Privacy API sucks so bad that even with no prior support for blocking in Jabber, this has no interface changes. If someone wanted to implement the deprecated Jabber privacy lists API, though, that would be ok by me. Modified Paths: -------------- trunk/libgaim/protocols/jabber/disco.c trunk/libgaim/protocols/jabber/google.c trunk/libgaim/protocols/jabber/google.h trunk/libgaim/protocols/jabber/jabber.c trunk/libgaim/protocols/jabber/jabber.h trunk/libgaim/protocols/jabber/parser.c trunk/libgaim/protocols/jabber/roster.c trunk/libgaim/xmlnode.c trunk/libgaim/xmlnode.h Modified: trunk/libgaim/protocols/jabber/disco.c =================================================================== --- trunk/libgaim/protocols/jabber/disco.c 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/protocols/jabber/disco.c 2006-12-14 04:56:54 UTC (rev 17993) @@ -27,8 +27,8 @@ #include "iq.h" #include "disco.h" #include "jabber.h" +#include "roster.h" - struct _jabber_disco_info_cb_data { gpointer data; JabberDiscoInfoCallback *callback; @@ -262,8 +262,14 @@ if (!strcmp("google:mail:notify", var)) { js->server_caps |= JABBER_CAP_GMAIL_NOTIFY; jabber_gmail_init(js); + } else if (!strcmp("google:roster", var)) { + js->server_caps |= JABBER_CAP_GOOGLE_ROSTER; + jabber_google_roster_init(js); } } + + if (!js->server_caps & JABBER_CAP_GOOGLE_ROSTER) + jabber_roster_request(js); } static void Modified: trunk/libgaim/protocols/jabber/google.c =================================================================== --- trunk/libgaim/protocols/jabber/google.c 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/protocols/jabber/google.c 2006-12-14 04:56:54 UTC (rev 17993) @@ -21,8 +21,12 @@ #include "internal.h" #include "debug.h" +#include "privacy.h" + +#include "buddy.h" #include "google.h" #include "jabber.h" +#include "presence.h" #include "iq.h" static void @@ -167,3 +171,190 @@ jabber_iq_set_callback(iq, jabber_gmail_parse, NULL); jabber_iq_send(iq); } + +void jabber_google_roster_init(JabberStream *js) +{ + JabberIq *iq; + xmlnode *query; + + iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:roster"); + query = xmlnode_get_child(iq->node, "query"); + + xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); + xmlnode_set_attrib(query, "gr:ext", "2"); + + jabber_iq_send(iq); +} + +void jabber_google_roster_outgoing(JabberStream *js, xmlnode *query, xmlnode *item) +{ + GaimAccount *account = gaim_connection_get_account(js->gc); + GSList *list = account->deny; + const char *jid = xmlnode_get_attrib(item, "jid"); + char *jid_norm = g_strdup(jabber_normalize(account, jid)); + + while (list) { + if (!strcmp(jid_norm, (char*)list->data)) { + xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); + xmlnode_set_attrib(item, "gr:t", "B"); + xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); + xmlnode_set_attrib(query, "gr:ext", "2"); + return; + } + list = list->next; + } + +} + +void jabber_google_roster_incoming(JabberStream *js, xmlnode *item) +{ + GaimAccount *account = gaim_connection_get_account(js->gc); + GSList *list = account->deny; + const char *jid = xmlnode_get_attrib(item, "jid"); + gboolean on_block_list = FALSE; + + char *jid_norm = g_strdup(jabber_normalize(account, jid)); + + const char *grt = xmlnode_get_attrib_with_namespace(item, "t", "google:roster"); + + while (list) { + if (!strcmp(jid_norm, (char*)list->data)) { + on_block_list = TRUE; + break; + } + list = list->next; + } + + if (!on_block_list && (grt && (*grt == 'B' || *grt == 'b'))) { + gaim_debug_info("jabber", "Blocking %s\n", jid_norm); + gaim_privacy_deny_add(account, jid_norm, TRUE); + } else if (on_block_list && (!grt || (*grt != 'B' && *grt != 'b' ))){ + gaim_debug_info("jabber", "Unblocking %s\n", jid_norm); + gaim_privacy_deny_remove(account, jid_norm, TRUE); + } +} + +void jabber_google_roster_add_deny(GaimConnection *gc, const char *who) +{ + JabberStream *js; + GSList *buddies; + JabberIq *iq; + xmlnode *query; + xmlnode *item; + xmlnode *group; + GaimBuddy *b; + JabberBuddy *jb; + + js = (JabberStream*)(gc->proto_data); + + if (!js || !js->server_caps & JABBER_CAP_GOOGLE_ROSTER) + return; + + jb = jabber_buddy_find(js, who, TRUE); + + buddies = gaim_find_buddies(js->gc->account, who); + if(!buddies) + return; + + b = buddies->data; + + iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:roster"); + + query = xmlnode_get_child(iq->node, "query"); + item = xmlnode_new_child(query, "item"); + + while(buddies) { + GaimGroup *g; + + b = buddies->data; + g = gaim_buddy_get_group(b); + + group = xmlnode_new_child(item, "group"); + xmlnode_insert_data(group, g->name, -1); + + buddies = buddies->next; + } + + iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:roster"); + + query = xmlnode_get_child(iq->node, "query"); + item = xmlnode_new_child(query, "item"); + + xmlnode_set_attrib(item, "jid", who); + xmlnode_set_attrib(item, "name", b->alias ? b->alias : ""); + xmlnode_set_attrib(item, "gr:t", "B"); + xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); + xmlnode_set_attrib(query, "gr:ext", "2"); + + jabber_iq_send(iq); + + /* Synthesize a sign-off */ + if (jb) { + JabberBuddyResource *jbr; + GList *l = jb->resources; + while (l) { + jbr = l->data; + printf("ASDFA %s\n", jbr->name); + jabber_buddy_remove_resource(jb, jbr->name); + l = l->next; + } + } + gaim_prpl_got_user_status(gaim_connection_get_account(gc), who, "offline", NULL); +} + +void jabber_google_roster_rem_deny(GaimConnection *gc, const char *who) +{ + JabberStream *js; + GSList *buddies; + JabberIq *iq; + xmlnode *query; + xmlnode *item; + xmlnode *group; + GaimBuddy *b; + + g_return_if_fail(gc != NULL); + g_return_if_fail(who != NULL); + + js = (JabberStream*)(gc->proto_data); + + if (!js || !js->server_caps & JABBER_CAP_GOOGLE_ROSTER) + return; + + buddies = gaim_find_buddies(js->gc->account, who); + if(!buddies) + return; + + b = buddies->data; + + iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:roster"); + + query = xmlnode_get_child(iq->node, "query"); + item = xmlnode_new_child(query, "item"); + + while(buddies) { + GaimGroup *g; + + b = buddies->data; + g = gaim_buddy_get_group(b); + + group = xmlnode_new_child(item, "group"); + xmlnode_insert_data(group, g->name, -1); + + buddies = buddies->next; + } + + iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:roster"); + + query = xmlnode_get_child(iq->node, "query"); + item = xmlnode_new_child(query, "item"); + + xmlnode_set_attrib(item, "jid", who); + xmlnode_set_attrib(item, "name", b->alias ? b->alias : ""); + xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); + xmlnode_set_attrib(query, "gr:ext", "2"); + + jabber_iq_send(iq); + + /* See if he's online */ + jabber_presence_subscription_set(js, who, "probe"); +} Modified: trunk/libgaim/protocols/jabber/google.h =================================================================== --- trunk/libgaim/protocols/jabber/google.h 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/protocols/jabber/google.h 2006-12-14 04:56:54 UTC (rev 17993) @@ -29,4 +29,12 @@ void jabber_gmail_init(JabberStream *js); void jabber_gmail_poke(JabberStream *js, xmlnode *node); +void jabber_google_roster_init(JabberStream *js); +void jabber_google_roster_outgoing(JabberStream *js, xmlnode *query, xmlnode *item); +void jabber_google_roster_incoming(JabberStream *js, xmlnode *item); +void jabber_google_roster_add_deny(GaimConnection *gc, const char *who); +void jabber_google_roster_rem_deny(GaimConnection *gc, const char *who); + + + #endif /* _GAIM_GOOGLE_H_ */ Modified: trunk/libgaim/protocols/jabber/jabber.c =================================================================== --- trunk/libgaim/protocols/jabber/jabber.c 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/protocols/jabber/jabber.c 2006-12-14 04:56:54 UTC (rev 17993) @@ -41,6 +41,7 @@ #include "buddy.h" #include "chat.h" #include "disco.h" +#include "google.h" #include "iq.h" #include "jutil.h" #include "message.h" @@ -1041,7 +1042,6 @@ break; case JABBER_STREAM_CONNECTED: - jabber_roster_request(js); gpresence = gaim_account_get_presence(js->gc->account); status = gaim_presence_get_active_status(gpresence); jabber_presence_send(js->gc->account, status); @@ -1875,9 +1875,9 @@ jabber_roster_remove_buddy, /* remove_buddy */ NULL, /* remove_buddies */ NULL, /* add_permit */ - NULL, /* add_deny */ + jabber_google_roster_add_deny, /* add_deny */ NULL, /* rem_permit */ - NULL, /* rem_deny */ + jabber_google_roster_rem_deny, /* rem_deny */ NULL, /* set_permit_deny */ jabber_chat_join, /* join_chat */ NULL, /* reject_chat */ Modified: trunk/libgaim/protocols/jabber/jabber.h =================================================================== --- trunk/libgaim/protocols/jabber/jabber.h 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/protocols/jabber/jabber.h 2006-12-14 04:56:54 UTC (rev 17993) @@ -55,6 +55,7 @@ * http://code.google.com/apis/talk/jep_extensions/extensions.html */ JABBER_CAP_GMAIL_NOTIFY = 1 << 9, + JABBER_CAP_GOOGLE_ROSTER = 1 << 10, JABBER_CAP_RETRIEVED = 1 << 31 } JabberCapabilities; Modified: trunk/libgaim/protocols/jabber/parser.c =================================================================== --- trunk/libgaim/protocols/jabber/parser.c 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/protocols/jabber/parser.c 2006-12-14 04:56:54 UTC (rev 17993) @@ -76,13 +76,21 @@ char *txt; int attrib_len = attributes[i+4] - attributes[i+3]; char *attrib = g_malloc(attrib_len + 1); + char *attrib_ns = NULL; + + if (attributes[i+2]) { + attrib_ns = g_strdup(attributes[i+2]);; + } + memcpy(attrib, attributes[i+3], attrib_len); attrib[attrib_len] = '\0'; + txt = attrib; attrib = gaim_unescape_html(txt); g_free(txt); - xmlnode_set_attrib(node, (const char*) attributes[i], attrib); + xmlnode_set_attrib_with_namespace(node, (const char*) attributes[i], attrib_ns, attrib); g_free(attrib); + g_free(attrib_ns); } js->current = node; Modified: trunk/libgaim/protocols/jabber/roster.c =================================================================== --- trunk/libgaim/protocols/jabber/roster.c 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/protocols/jabber/roster.c 2006-12-14 04:56:54 UTC (rev 17993) @@ -24,6 +24,7 @@ #include "util.h" #include "buddy.h" +#include "google.h" #include "presence.h" #include "roster.h" #include "iq.h" @@ -224,6 +225,8 @@ if (g_slist_find_custom(groups, group_name, (GCompareFunc)gaim_utf8_strcasecmp) == NULL) groups = g_slist_append(groups, group_name); } + if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) + jabber_google_roster_incoming(js, item); add_gaim_buddies_in_groups(js, jid, name, groups); } } @@ -271,7 +274,12 @@ if(!grps) g_slist_free(groups); - + + if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) { + jabber_google_roster_outgoing(js, query, item); + xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); + xmlnode_set_attrib(query, "gr:ext", "2"); + } jabber_iq_send(iq); } Modified: trunk/libgaim/xmlnode.c =================================================================== --- trunk/libgaim/xmlnode.c 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/xmlnode.c 2006-12-14 04:56:54 UTC (rev 17993) @@ -142,7 +142,35 @@ } } + void +xmlnode_remove_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns) +{ + xmlnode *attr_node, *sibling = NULL; + + g_return_if_fail(node != NULL); + g_return_if_fail(attr != NULL); + + for(attr_node = node->child; attr_node; attr_node = attr_node->next) + { + if(attr_node->type == XMLNODE_TYPE_ATTRIB && + !strcmp(attr_node->name, attr) && + !strcmp(attr_node->xmlns, xmlns)) { + if(node->child == attr_node) { + node->child = attr_node->next; + } else if (node->lastchild == attr_node) { + node->lastchild = sibling; + } else { + sibling->next = attr_node->next; + } + xmlnode_free(attr_node); + return; + } + sibling = attr_node; + } +} + +void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value) { xmlnode *attrib_node; @@ -160,6 +188,25 @@ xmlnode_insert_child(node, attrib_node); } +void +xmlnode_set_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns, const char *value) +{ + xmlnode *attrib_node; + + g_return_if_fail(node != NULL); + g_return_if_fail(attr != NULL); + g_return_if_fail(value != NULL); + + xmlnode_remove_attrib_with_namespace(node, attr, xmlns); + + attrib_node = new_node(attr, XMLNODE_TYPE_ATTRIB); + + attrib_node->data = g_strdup(value); + attrib_node->xmlns = g_strdup(xmlns); + + xmlnode_insert_child(node, attrib_node); +} + const char * xmlnode_get_attrib(xmlnode *node, const char *attr) { @@ -176,7 +223,24 @@ return NULL; } +const char * +xmlnode_get_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns) +{ + xmlnode *x; + g_return_val_if_fail(node != NULL, NULL); + + for(x = node->child; x; x = x->next) { + if(x->type == XMLNODE_TYPE_ATTRIB && + !strcmp(attr, x->name) && !strcmp(x->xmlns, xmlns)) { + return x->data; + } + } + + return NULL; +} + + void xmlnode_set_namespace(xmlnode *node, const char *xmlns) { g_return_if_fail(node != NULL); Modified: trunk/libgaim/xmlnode.h =================================================================== --- trunk/libgaim/xmlnode.h 2006-12-14 04:17:02 UTC (rev 17992) +++ trunk/libgaim/xmlnode.h 2006-12-14 04:56:54 UTC (rev 17993) @@ -143,6 +143,16 @@ void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value); /** + * Sets a namespaced attribute for a node + * + * @param node The node to set an attribute for. + * @param attr The name of the attribute to set + * @param xmlns The namespace of the attribute to ste + * @param value The value of the attribute + */ +void xmlnode_set_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns, const char *value); + +/** * Gets an attribute from a node. * * @param node The node to get an attribute from. @@ -153,6 +163,17 @@ const char *xmlnode_get_attrib(xmlnode *node, const char *attr); /** + * Gets a namespaced attribute from a node + * + * @param node The node to get an attribute from. + * @param attr The attribute to get + * @param xmlns The namespace of the attribute to get + * + * @return The value of the attribute/ + */ +const char *xmlnode_get_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns); + +/** * Removes an attribute from a node. * * @param node The node to remove an attribute from. @@ -161,6 +182,15 @@ void xmlnode_remove_attrib(xmlnode *node, const char *attr); /** + * Removes a namespaced attribute from a node + * + * @param node The node to remove an attribute from + * @param attr The attribute to remove + * @param xmlns The namespace of the attribute to remove + */ +void xmlnode_remove_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns); + +/** * Sets the namespace of a node * * @param node The node to qualify This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ebl...@us...> - 2006-12-14 04:17:04
|
Revision: 17992 http://svn.sourceforge.net/gaim/?rev=17992&view=rev Author: eblanton Date: 2006-12-13 20:17:02 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Attempt to salvage Oscar strings in an invalid encoding, as well as print an error message. Modified Paths: -------------- trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-14 01:47:25 UTC (rev 17991) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-14 04:17:02 UTC (rev 17992) @@ -426,9 +426,18 @@ ret = gaim_plugin_oscar_convert_to_utf8(data, datalen, charsetstr1, FALSE); if (ret == NULL) ret = gaim_plugin_oscar_convert_to_utf8(data, datalen, charsetstr2, TRUE); - if (ret == NULL) - ret = g_strdup(_("(There was an error receiving this message. Either you and the buddy you are speaking to have a different encoding selected, or the buddy has a buggy client.)")); + if (ret == NULL) { + char *str, *salvage; + str = g_malloc(datalen + 1); + strncpy(str, datalen, data); + str[datalen] = '\0'; + salvage = gaim_utf8_salvage(str); + ret = g_strdup_printf(_("%s (There was an error receiving this message. Either you and the buddy you are speaking to have a different encoding selected, or the buddy has a buggy client.)"), salvage); + g_free(str); + g_free(salvage); + } + return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lsc...@us...> - 2006-12-14 01:47:29
|
Revision: 17991 http://svn.sourceforge.net/gaim/?rev=17991&view=rev Author: lschiere Date: 2006-12-13 17:47:25 -0800 (Wed, 13 Dec 2006) Log Message: ----------- This should reduce the number of questions about encoding errors we get. it also closes rh bug 219524 Modified Paths: -------------- trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-14 01:06:18 UTC (rev 17990) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-14 01:47:25 UTC (rev 17991) @@ -427,7 +427,7 @@ if (ret == NULL) ret = gaim_plugin_oscar_convert_to_utf8(data, datalen, charsetstr2, TRUE); if (ret == NULL) - ret = g_strdup(_("(There was an error receiving this message. The buddy you are speaking to most likely has a buggy client.)")); + ret = g_strdup(_("(There was an error receiving this message. Either you and the buddy you are speaking to have a different encoding selected, or the buddy has a buggy client.)")); return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-14 01:06:39
|
Revision: 17990 http://svn.sourceforge.net/gaim/?rev=17990&view=rev Author: sadrul Date: 2006-12-13 17:06:18 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Update the typing notification properly. Some change to sending typing notification. It needs more work. Modified Paths: -------------- trunk/console/gntconv.c Modified: trunk/console/gntconv.c =================================================================== --- trunk/console/gntconv.c 2006-12-13 21:54:52 UTC (rev 17989) +++ trunk/console/gntconv.c 2006-12-14 01:06:18 UTC (rev 17990) @@ -47,6 +47,32 @@ #include "config.h" static gboolean +send_typing_notification(GntWidget *w, const char *key, GGConv *ggconv) +{ + if (key[0] != 27 && key[0] != '\r') { + const char *text = gnt_entry_get_text(GNT_ENTRY(ggconv->entry)); + gboolean first = (!text || !*text); + if (gaim_prefs_get_bool("/gaim/gnt/conversations/notify_typing")) { + /* Xerox'ed */ + GaimConversation *conv = ggconv->active_conv; + GaimConvIm *im = GAIM_CONV_IM(conv); + + gaim_conv_im_stop_send_typed_timeout(im); + gaim_conv_im_start_send_typed_timeout(im); + if (first || (gaim_conv_im_get_type_again(im) != 0 && + time(NULL) > gaim_conv_im_get_type_again(im))) { + unsigned int timeout; + timeout = serv_send_typing(gaim_conversation_get_gc(conv), + gaim_conversation_get_name(conv), + GAIM_TYPING); + gaim_conv_im_set_type_again(im, timeout); + } + } + } + return FALSE; +} + +static gboolean entry_key_pressed(GntWidget *w, const char *key, GGConv *ggconv) { if (key[0] == '\r' && key[1] == 0) @@ -142,23 +168,6 @@ } else { - gboolean first = !gnt_entry_get_text(GNT_ENTRY(ggconv->entry)); - if (gaim_prefs_get_bool("/gaim/gnt/conversations/notify_typing")) { - /* Xerox'ed */ - GaimConversation *conv = ggconv->active_conv; - GaimConvIm *im = GAIM_CONV_IM(conv); - - gaim_conv_im_stop_send_typed_timeout(im); - gaim_conv_im_start_send_typed_timeout(im); - if (first || (gaim_conv_im_get_type_again(im) != 0 && - time(NULL) > gaim_conv_im_get_type_again(im))) { - unsigned int timeout; - timeout = serv_send_typing(gaim_conversation_get_gc(conv), - gaim_conversation_get_name(conv), - GAIM_TYPING); - gaim_conv_im_set_type_again(im, timeout); - } - } } return FALSE; @@ -244,10 +253,10 @@ scroll = gnt_text_view_get_lines_below(GNT_TEXT_VIEW(ggc->tv)); str = g_strdup_printf(_("\n%s is typing..."), gaim_conversation_get_name(conv)); - /* Update an existing notification if there's one. */ - if (gnt_text_view_tag_change(GNT_TEXT_VIEW(ggc->tv), "typing", str, TRUE) == 0) - gnt_text_view_append_text_with_tag(GNT_TEXT_VIEW(ggc->tv), - str, GNT_TEXT_FLAG_DIM, "typing"); + /* Updating is a little buggy. So just remove and add a new one */ + gnt_text_view_tag_change(GNT_TEXT_VIEW(ggc->tv), "typing", NULL, TRUE); + gnt_text_view_append_text_with_tag(GNT_TEXT_VIEW(ggc->tv), + str, GNT_TEXT_FLAG_DIM, "typing"); g_free(str); if (scroll <= 1) gnt_text_view_scroll(GNT_TEXT_VIEW(ggc->tv), 0); @@ -317,6 +326,7 @@ gnt_entry_set_always_suggest(GNT_ENTRY(ggc->entry), FALSE); g_signal_connect_after(G_OBJECT(ggc->entry), "key_pressed", G_CALLBACK(entry_key_pressed), ggc); + g_signal_connect(G_OBJECT(ggc->entry), "key_pressed", G_CALLBACK(send_typing_notification), ggc); g_signal_connect(G_OBJECT(ggc->window), "destroy", G_CALLBACK(closing_window), ggc); gnt_widget_set_position(ggc->window, gaim_prefs_get_int(PREF_ROOT "/position/x"), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sea...@us...> - 2006-12-13 21:54:53
|
Revision: 17989 http://svn.sourceforge.net/gaim/?rev=17989&view=rev Author: seanegan Date: 2006-12-13 13:54:52 -0800 (Wed, 13 Dec 2006) Log Message: ----------- - Fix a crash when 'detailed' is FALSE - Google Talk will return details for the first 30 e-mails, and give you the total count of new e-mails I made it so that if the total count is > 30, it doesn't show details, and takes you directly to the Inbox - I still need to integrate getting multiple non-detailed mail notifications Modified Paths: -------------- trunk/gtk/gtknotify.c trunk/libgaim/protocols/jabber/google.c Modified: trunk/gtk/gtknotify.c =================================================================== --- trunk/gtk/gtknotify.c 2006-12-13 21:29:16 UTC (rev 17988) +++ trunk/gtk/gtknotify.c 2006-12-13 21:54:52 UTC (rev 17989) @@ -306,6 +306,21 @@ (url == NULL ? NULL : &url)); } +struct inbox_info { + char *url; + void *handle; +}; + +static void +open_inbox_cb(struct inbox_info *inbox) +{ + if (inbox->url) + gaim_notify_uri(inbox->handle, inbox->url); + g_free(inbox->url); + g_free(inbox); +} + + static void * gaim_gtk_notify_emails(GaimConnection *gc, size_t count, gboolean detailed, const char **subjects, const char **froms, @@ -322,6 +337,22 @@ account = gaim_connection_get_account(gc); + if (!detailed) { + struct inbox_info *inbox = g_new0(struct inbox_info, 1); + GdkPixbuf *pixbuf = gtk_widget_render_icon(gaim_gtk_blist_get_default_gtk_blist()->headline_hbox, + GAIM_STOCK_ICON_ONLINE_MSG, GTK_ICON_SIZE_BUTTON, NULL); + char *label_text = g_strdup_printf(ngettext("<b>You have %d new e-mail.</b>", + "<b>You have %d new e-mails.</b>", + count),count); + + inbox->handle = gc; + inbox->url = urls ? g_strdup(urls[0]) : NULL; + gaim_gtk_blist_set_headline(label_text, + pixbuf, G_CALLBACK(open_inbox_cb), inbox); + g_object_unref(pixbuf); + return; + } + if (mail_dialog == NULL || !detailed) { GtkCellRenderer *rend; Modified: trunk/libgaim/protocols/jabber/google.c =================================================================== --- trunk/libgaim/protocols/jabber/google.c 2006-12-13 21:29:16 UTC (rev 17988) +++ trunk/libgaim/protocols/jabber/google.c 2006-12-13 21:54:52 UTC (rev 17989) @@ -70,7 +70,7 @@ url = xmlnode_get_attrib(child, "url"); if (!url || !*url) url = "http://www.gmail.com"; - + message= xmlnode_get_child(child, "mail-thread-info"); for (i=0; message; message = xmlnode_get_next_twin(message), i++) { subject_node = xmlnode_get_child(message, "subject"); @@ -106,9 +106,10 @@ } } - if (i>0) - gaim_notify_emails(js->gc, returned_count, TRUE, subjects, froms, tos, - urls, NULL, js->gc->account); + if (i>0) + gaim_notify_emails(js->gc, count, count == returned_count, subjects, froms, tos, + urls, NULL, NULL); + g_free(to_name); g_free(tos); g_free(froms); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dat...@us...> - 2006-12-13 21:29:25
|
Revision: 17988 http://svn.sourceforge.net/gaim/?rev=17988&view=rev Author: datallah Date: 2006-12-13 13:29:16 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Fix for glib < 2.10.0 I'm a little confused about the final g_object_unref() - it seems like that might would the ref-count zero (I don't see anywhere where "tooltips" is being referenced). Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-12-13 18:33:15 UTC (rev 17987) +++ trunk/gtk/gtkblist.c 2006-12-13 21:29:16 UTC (rev 17988) @@ -2742,7 +2742,7 @@ gaim_notify_user_info_add_pair(user_info, _("Status"), _("Awesome")); if (!g_ascii_strcasecmp(b->name, "chipx86")) gaim_notify_user_info_add_pair(user_info, _("Status"), _("Rockin'")); - + tmp = gaim_notify_user_info_get_text_with_newline(user_info, "\n"); g_string_append(str, tmp); g_free(tmp); @@ -3825,7 +3825,7 @@ GdkEventExpose *event, gpointer user_data) { - gtk_paint_flat_box (widget->style, + gtk_paint_flat_box (widget->style, widget->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, @@ -3836,8 +3836,8 @@ widget->allocation.y + 1, widget->allocation.width - 2, widget->allocation.height - 2); - - return FALSE; + + return FALSE; } static void @@ -3846,21 +3846,26 @@ { GtkTooltips *tooltips; GtkStyle *style; - + if (gtkblist->changing_style) return; - + tooltips = gtk_tooltips_new (); +#if GLIB_CHECK_VERSION(2,10,0) g_object_ref_sink (tooltips); +#else + g_object_ref(tooltips); + gtk_object_sink(GTK_OBJECT(tooltips)); +#endif gtk_tooltips_force_window (tooltips); gtk_widget_ensure_style (tooltips->tip_window); style = gtk_widget_get_style (tooltips->tip_window); - + gtkblist->changing_style = TRUE; gtk_widget_set_style (gtkblist->headline_hbox, style); - gtkblist->changing_style = FALSE; - + gtkblist->changing_style = FALSE; + g_object_unref (tooltips); } @@ -3904,7 +3909,7 @@ gtk_box_pack_start(GTK_BOX(ret), bbox, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(bbox), button); - + label = gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(ret), label, TRUE, TRUE, 0); @@ -3995,7 +4000,7 @@ /* Translators: Please maintain the use of -> and <- to refer to menu heirarchy */ pretty = gaim_gtk_make_pretty_arrows(_("<span weight='bold' size='larger'>Welcome to Gaim!</span>\n\n" - + "You have no accounts enabled. Enable your IM accounts from the " "<b>Accounts</b> window at <b>Accounts->Add/Edit</b>. Once you " "enable accounts, you'll be able to sign on, set your status, " @@ -4043,7 +4048,7 @@ g_signal_connect(G_OBJECT(ebox), "enter-notify-event", G_CALLBACK(headline_box_enter_cb), gtkblist); g_signal_connect(G_OBJECT(ebox), "leave-notify-event", G_CALLBACK(headline_box_leave_cb), gtkblist); g_signal_connect(G_OBJECT(ebox), "button-press-event", G_CALLBACK(headline_box_press_cb), gtkblist); - + /****************************** GtkTreeView **********************************/ sw = gtk_scrolled_window_new(NULL,NULL); gtk_widget_show(sw); @@ -4053,7 +4058,7 @@ gtkblist->treemodel = gtk_tree_store_new(BLIST_COLUMNS, GDK_TYPE_PIXBUF, /* Status icon */ G_TYPE_BOOLEAN, /* Status icon visible */ - G_TYPE_STRING, /* Name */ + G_TYPE_STRING, /* Name */ G_TYPE_STRING, /* Idle */ G_TYPE_BOOLEAN, /* Idle visible */ GDK_TYPE_PIXBUF, /* Buddy icon */ @@ -4095,7 +4100,7 @@ g_signal_connect(G_OBJECT(gtkblist->treeview), "leave-notify-event", G_CALLBACK(gaim_gtk_blist_leave_cb), NULL); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(gtkblist->treeview), FALSE); - + column = gtk_tree_view_column_new(); gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), column); gtk_tree_view_column_set_visible(column, FALSE); @@ -4152,25 +4157,25 @@ rend = gtk_cell_renderer_text_new(); g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); gtk_tree_view_column_pack_start(column, rend, FALSE); - gtk_tree_view_column_set_attributes(column, rend, - "markup", IDLE_COLUMN, + gtk_tree_view_column_set_attributes(column, rend, + "markup", IDLE_COLUMN, "visible", IDLE_VISIBLE_COLUMN, #if GTK_CHECK_VERSION(2,6,0) "cell-background-gdk", BGCOLOR_COLUMN, #endif NULL); - + rend = gtk_cell_renderer_pixbuf_new(); g_object_set(rend, "xalign", 1.0, "ypad", 0, NULL); gtk_tree_view_column_pack_start(column, rend, FALSE); - gtk_tree_view_column_set_attributes(column, rend, "pixbuf", BUDDY_ICON_COLUMN, + gtk_tree_view_column_set_attributes(column, rend, "pixbuf", BUDDY_ICON_COLUMN, #if GTK_CHECK_VERSION(2,6,0) "cell-background-gdk", BGCOLOR_COLUMN, #endif "visible", BUDDY_ICON_VISIBLE_COLUMN, NULL); - + g_signal_connect(G_OBJECT(gtkblist->treeview), "row-activated", G_CALLBACK(gtk_blist_row_activated_cb), NULL); g_signal_connect(G_OBJECT(gtkblist->treeview), "row-expanded", G_CALLBACK(gtk_blist_row_expanded_cb), NULL); g_signal_connect(G_OBJECT(gtkblist->treeview), "row-collapsed", G_CALLBACK(gtk_blist_row_collapsed_cb), NULL); @@ -4190,7 +4195,7 @@ gtkblist->scrollbook = gtk_gaim_scroll_book_new(); gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->scrollbook, FALSE, FALSE, 0); - + /* Create an empty vbox used for showing connection errors */ gtkblist->error_buttons = gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->error_buttons, FALSE, FALSE, 0); @@ -4292,7 +4297,7 @@ // gtk_widget_hide(gtkblist->scrollbook); gtk_widget_hide(gtkblist->headline_hbox); - + /* emit our created signal */ gaim_signal_emit(handle, "gtkblist-created", list); } @@ -4534,7 +4539,7 @@ gboolean expanded; GdkColor bgcolor; GdkColor textcolor; - + if(!insert_node(list, gnode, &iter)) return; @@ -4560,7 +4565,7 @@ esc, group_count); g_free(esc); - + gtk_tree_store_set(gtkblist->treemodel, &iter, STATUS_ICON_VISIBLE_COLUMN, FALSE, STATUS_ICON_COLUMN, NULL, @@ -4849,7 +4854,7 @@ g_free(gtkblist); accountmenu = NULL; gtkblist = NULL; - + gdk_cursor_unref(gtkblist->hand_cursor); gdk_cursor_unref(gtkblist->arrow_cursor); gtkblist->hand_cursor = NULL; @@ -5527,7 +5532,7 @@ { gtk_label_set_markup(GTK_LABEL(gtkblist->headline_label), text); gtk_image_set_from_pixbuf(GTK_IMAGE(gtkblist->headline_image), pixbuf); - + gtkblist->headline_callback = callback; gtkblist->headline_data = user_data; gtk_widget_show_all(gtkblist->headline_hbox); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-12-13 18:33:18
|
Revision: 17987 http://svn.sourceforge.net/gaim/?rev=17987&view=rev Author: sadrul Date: 2006-12-13 10:33:15 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Run the callback just once. Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-12-13 16:57:33 UTC (rev 17986) +++ trunk/gtk/gtkblist.c 2006-12-13 18:33:15 UTC (rev 17987) @@ -3686,11 +3686,19 @@ } static gboolean +headline_click_callback(gpointer data) +{ + ((GSourceFunc)gtkblist->headline_callback)(gtkblist->headline_data); + return FALSE; +} + +static gboolean headline_box_press_cb(GtkWidget *widget, GdkEventButton *event, GaimGtkBuddyList *gtkblist) { gtk_widget_hide(gtkblist->headline_hbox); if (gtkblist->headline_callback) - g_idle_add(G_CALLBACK(gtkblist->headline_callback), gtkblist->headline_data); + g_idle_add((GSourceFunc)headline_click_callback, gtkblist->headline_data); + return TRUE; } /***********************************/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lsc...@us...> - 2006-12-13 16:57:35
|
Revision: 17986 http://svn.sourceforge.net/gaim/?rev=17986&view=rev Author: lschiere Date: 2006-12-13 08:57:33 -0800 (Wed, 13 Dec 2006) Log Message: ----------- 11:53:42) warren: http://gaim.sourceforge.net/gdb.php Can somebody correct the instructions on this page for Fedora and Red Hat? It is not accurate. (11:53:50) warren: It is -debuginfo RPM, not -debug. (11:54:08) warren: http://fedoraproject.org/wiki/StackTraces We also have an instructional page here. Modified Paths: -------------- web/htdocs/gdb.php Modified: web/htdocs/gdb.php =================================================================== --- web/htdocs/gdb.php 2006-12-13 11:10:32 UTC (rev 17985) +++ web/htdocs/gdb.php 2006-12-13 16:57:33 UTC (rev 17986) @@ -189,8 +189,8 @@ <h2>Distribution Notes</h2> <ul> <li>Debian: see <a href="http://wiki.debian.net/?HowToGetABacktrace">http://wiki.debian.net/?HowToGetABacktrace</a></li> -<li>Fedora: Install the -debug rpm first</li> -<li>Redhat: Install the -debug rpm first</li> +<li>Fedora: Install the -debuginfo rpm first. See <a href="http://fedoraproject.org/wiki/StackTraces">http://fedoraproject.org/wiki/StackTraces</a></li> +<li>Redhat: Install the -debuginfo rpm first</li> <li>Gentoo: emerge gaim with USE=debug</li> </ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-13 11:10:34
|
Revision: 17985 http://svn.sourceforge.net/gaim/?rev=17985&view=rev Author: thekingant Date: 2006-12-13 03:10:32 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Jonathan Brossard (endrazine) found some more places where we were passing normal strings to printf as format strings, which could cause problems when printing text containing the % character. Modified Paths: -------------- trunk/console/libgnt/gntwm.c trunk/gtk/win32/win_gaim.c trunk/libgaim/protocols/qq/qq_proxy.c Modified: trunk/console/libgnt/gntwm.c =================================================================== --- trunk/console/libgnt/gntwm.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/console/libgnt/gntwm.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -431,11 +431,11 @@ if (now & attr) \ { \ if (!(old & attr)) \ - fprintf(file, start); \ + fprintf(file, "%s", start); \ } \ else if (old & attr) \ { \ - fprintf(file, end); \ + fprintf(file, "%s", end); \ } \ } while (0) Modified: trunk/gtk/win32/win_gaim.c =================================================================== --- trunk/gtk/win32/win_gaim.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/gtk/win32/win_gaim.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -145,7 +145,7 @@ putenv(settingsdir); snprintf(aspelldir, sizeof(aspelldir), "GAIM_ASPELL_DIR=%s\\Aspell\\bin", path); - printf(aspelldir); + printf("%s", aspelldir); putenv(aspelldir); /* set the GTK+ path to be \\path\to\GTK\bin */ @@ -513,7 +513,7 @@ snprintf(errbuf, 512, "Error getting module filename.\nError: (%u) %s", (UINT) dw, err_msg); - printf(errbuf); + printf("%s", errbuf); MessageBox(NULL, errbuf, NULL, MB_OK | MB_TOPMOST); } @@ -542,7 +542,7 @@ (UINT) dw, err_msg, mod_not_found ? "\n" : "", mod_not_found ? "This probably means that GTK+ can't be found." : ""); - printf(errbuf); + printf("%s", errbuf); MessageBox(NULL, errbuf, TEXT("Error"), MB_OK | MB_TOPMOST); return 0; Modified: trunk/libgaim/protocols/qq/qq_proxy.c =================================================================== --- trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -65,7 +65,7 @@ strcat(buf1, buf2); } strcat(buf1, "\n"); - gaim_debug(GAIM_DEBUG_INFO, desc, buf1); + gaim_debug(GAIM_DEBUG_INFO, desc, "%s", buf1); } /* QQ 2003iii uses double MD5 for the pwkey to get the session key */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2006-12-13 10:46:45
|
Revision: 17984 http://svn.sourceforge.net/gaim/?rev=17984&view=rev Author: thekingant Date: 2006-12-13 02:46:44 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Jonathan Brossard found some minor flaws in our perl API... basically perl scripts that used the gaim_debug() functions previously had to escape '%' to get it to not behave wonkily. That should no longer be necessary after this change. Modified Paths: -------------- trunk/COPYRIGHT trunk/libgaim/plugins/perl/common/Debug.xs Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2006-12-13 10:11:31 UTC (rev 17983) +++ trunk/COPYRIGHT 2006-12-13 10:46:44 UTC (rev 17984) @@ -43,6 +43,7 @@ Derrick J Brashear Matt Brenneke Jeremy Brooks +Jonathan Brossard Philip Brown Sean Burke Thomas Butter Modified: trunk/libgaim/plugins/perl/common/Debug.xs =================================================================== --- trunk/libgaim/plugins/perl/common/Debug.xs 2006-12-13 10:11:31 UTC (rev 17983) +++ trunk/libgaim/plugins/perl/common/Debug.xs 2006-12-13 10:46:44 UTC (rev 17984) @@ -8,31 +8,43 @@ Gaim::DebugLevel level const char *category const char *string +CODE: + gaim_debug(level, category, "%s", string); void gaim_debug_misc(category, string) const char *category const char *string +CODE: + gaim_debug_misc(category, "%s", string); void gaim_debug_info(category, string) const char *category const char *string +CODE: + gaim_debug_info(category, "%s", string); void gaim_debug_warning(category, string) const char *category const char *string +CODE: + gaim_debug_warning(category, "%s", string); void gaim_debug_error(category, string) const char *category const char *string +CODE: + gaim_debug_error(category, "%s", string); void gaim_debug_fatal(category, string) const char *category const char *string +CODE: + gaim_debug_fatal(category, "%s", string); void gaim_debug_set_enabled(enabled) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |