# HG changeset patch # User Yoshiki Yazawa # Date 1267546424 -32400 # Node ID f5d753b3d01da9ad07d269806f2bada6ca42235a # Parent 08ceb05e9fe9b63d70533b392d7176d3d0f29829# Parent e3864e37e94e296ae37067119095f678f55e094f merged with im.pidgin.pidgin diff -r 08ceb05e9fe9 -r f5d753b3d01d .mtn-ignore --- a/.mtn-ignore Sun Feb 28 06:13:14 2010 +0900 +++ b/.mtn-ignore Wed Mar 03 01:13:44 2010 +0900 @@ -38,7 +38,10 @@ pidgin.spec$ pidgin-.*.tar.gz pidgin-.*.tar.bz2 +pidgin-*.*.*-dbgsym$ +pidgin-*.*.*-dbgsym.zip$ pidgin-*.*.*-win32bin$ +pidgin-*.*.*-win32-bin.zip$ pidgin/pidgin$ pidgin/pixmaps/emotes/default/24/theme pidgin/pixmaps/emotes/none/theme @@ -48,6 +51,9 @@ pidgin/plugins/perl/common/Makefile.old pidgin/win32/pidgin_dll_rc.rc$ pidgin/win32/pidgin_exe_rc.rc$ +pidgin/win32/nsis/gtk-runtime-*.*.*.*.zip +pidgin/win32/nsis/gtk_runtime_stage$ +pidgin/win32/nsis/pidgin-translations.nsh$ install-sh libpurple/dbus-bindings.c libpurple/dbus-signals.c diff -r 08ceb05e9fe9 -r f5d753b3d01d COPYRIGHT --- a/COPYRIGHT Sun Feb 28 06:13:14 2010 +0900 +++ b/COPYRIGHT Wed Mar 03 01:13:44 2010 +0900 @@ -303,6 +303,7 @@ Peter McCurdy Kurt McKee Torrey McMahon +Greg McNew Robert McQueen Mihály Mészáros Robert Mibus diff -r 08ceb05e9fe9 -r f5d753b3d01d ChangeLog --- a/ChangeLog Sun Feb 28 06:13:14 2010 +0900 +++ b/ChangeLog Wed Mar 03 01:13:44 2010 +0900 @@ -15,8 +15,11 @@ * Use GtkStatusIcon for the docklet, providing better integration in notification area. * Added UI for sending attentions (buzz, nudge) on supporting protocols. - * Make the search dialog unobtrusive in the conversation window (by making - it look and behave like the search dialog in Firefox) + * Make the search dialog unobtrusive in the conversation window (by + making it look and behave like the search dialog in Firefox) + * The Recent Log Activity sort method for the Buddy List now + distinguishes between no activity and a small amount of activity + in the distant past. (Greg McNew) Bonjour: * Added support for IPv6. (Thanks to T_X for testing) diff -r 08ceb05e9fe9 -r f5d753b3d01d ChangeLog.win32 --- a/ChangeLog.win32 Sun Feb 28 06:13:14 2010 +0900 +++ b/ChangeLog.win32 Wed Mar 03 01:13:44 2010 +0900 @@ -4,6 +4,7 @@ * Win9x no longer supported. * Crash Report files (pidgin.RPT) are now generated in the ~/.purple directory instead of the installation directory. + * NSS SSL Library upgraded to 3.12.5 (thanks to Berke Viktor) version 2.6.6 (02/18/2010): * Installer translations for: Norwegian nynorsk diff -r 08ceb05e9fe9 -r f5d753b3d01d Makefile.mingw --- a/Makefile.mingw Sun Feb 28 06:13:14 2010 +0900 +++ b/Makefile.mingw Wed Mar 03 01:13:44 2010 +0900 @@ -31,10 +31,7 @@ exit; \ }' VERSION) -GTK_INSTALL_VERSION = $(shell \ - source ../gtk_installer/version.sh; \ - echo $$gtk_version \ -) +GTK_INSTALL_VERSION = 2.14.7.0 STRIPPED_RELEASE_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-win32bin DEBUG_SYMBOLS_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-dbgsym @@ -50,13 +47,14 @@ krb5_32.dll \ libgtkspell.dll \ libmeanwhile-1.dll \ + libnspr4.dll \ + libplc4.dll \ + libplds4.dll \ libsasl.dll \ libxml2.dll \ - nspr4.dll \ nss3.dll \ nssckbi.dll \ - plc4.dll \ - plds4.dll \ + nssutil3.dll \ saslANONYMOUS.dll \ saslCRAMMD5.dll \ saslDIGESTMD5.dll \ @@ -67,12 +65,13 @@ libsilcclient-1-1-2.dll \ smime3.dll \ softokn3.dll \ + sqlite3.dll \ ssl3.dll #build an expression for `find` to use to ignore the above files EXTERNAL_DLLS_FIND_EXP = $(patsubst %,-o -name %,$(EXTERNAL_DLLS)) -.PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_translations_installer_include $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT) +.PHONY: all docs install installer installer_offline installer_zip debug_symbols_zip installers clean uninstall create_release_install_dir generate_installer_includes $(PIDGIN_REVISION_H) $(PIDGIN_REVISION_RAW_TXT) all: $(PIDGIN_CONFIG_H) $(PIDGIN_REVISION_H) $(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) @@ -90,7 +89,10 @@ $(MAKE) -C share/ca-certs -f $(MINGW_MAKEFILE) install $(MAKE) -C share/sounds -f $(MINGW_MAKEFILE) install -generate_translations_installer_include: create_release_install_dir +pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip: + pidgin/win32/nsis/generate_gtk_zip.sh `pwd` + +generate_installer_includes: create_release_install_dir pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip rm -f pidgin/win32/nsis/pidgin-translations.nsh find $(STRIPPED_RELEASE_DIR)/locale -maxdepth 1 -mindepth 1 \ -exec basename {} ';' \ @@ -104,11 +106,11 @@ -not \( -false $(EXTERNAL_DLLS_FIND_EXP) \) \ -exec $(STRIP) --strip-unneeded {} ';' -installer: create_release_install_dir generate_translations_installer_include +installer: create_release_install_dir generate_installer_includes $(MAKENSIS) $(MAKENSISOPT)V3 $(MAKENSISOPT)DPIDGIN_VERSION="$(PIDGIN_VERSION)" $(MAKENSISOPT)DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" $(MAKENSISOPT)DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" $(MAKENSISOPT)DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION).exe ./ -installer_offline: create_release_install_dir generate_translations_installer_include debug_symbols_zip +installer_offline: create_release_install_dir generate_installer_includes debug_symbols_zip $(MAKENSIS) $(MAKENSISOPT)V3 $(MAKENSISOPT)DPIDGIN_VERSION="$(PIDGIN_VERSION)" $(MAKENSISOPT)DPIDGIN_PRODUCT_VERSION="$(PIDGIN_PRODUCT_VERSION)" $(MAKENSISOPT)DOFFLINE_INSTALLER $(MAKENSISOPT)DPIDGIN_INSTALL_DIR="$(STRIPPED_RELEASE_DIR)" $(MAKENSISOPT)DGTK_INSTALL_VERSION="$(GTK_INSTALL_VERSION)" pidgin/win32/nsis/pidgin-installer.nsi mv pidgin/win32/nsis/pidgin-$(PIDGIN_VERSION)-offline.exe ./ diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/ft.c --- a/libpurple/ft.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/ft.c Wed Mar 03 01:13:44 2010 +0900 @@ -1085,7 +1085,7 @@ return; } } else if (xfer->type == PURPLE_XFER_SEND) { - size_t result; + size_t result = 0; size_t s = MIN(purple_xfer_get_bytes_remaining(xfer), xfer->current_buffer_size); PurpleXferPrivData *priv = g_hash_table_lookup(xfers_data, xfer); @@ -1130,13 +1130,24 @@ result = tmp; } else { - buffer = g_malloc0(s); - result = fread(buffer, 1, s, xfer->dest_fp); - if (result != s) { - purple_debug_error("filetransfer", "Unable to read whole buffer.\n"); - purple_xfer_cancel_local(xfer); - g_free(buffer); - return; + gboolean read = TRUE; + if (priv->buffer) { + if (priv->buffer->len < s) { + s -= priv->buffer->len; + read = TRUE; + } else { + read = FALSE; + } + } + if (read) { + buffer = g_malloc(s); + result = fread(buffer, 1, s, xfer->dest_fp); + if (result != s) { + purple_debug_error("filetransfer", "Unable to read whole buffer.\n"); + purple_xfer_cancel_local(xfer); + g_free(buffer); + return; + } } } diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/log.c --- a/libpurple/log.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/log.c Wed Mar 03 01:13:44 2010 +0900 @@ -302,7 +302,7 @@ } } - score = (gint)score_double; + score = (gint) ceil(score_double); g_hash_table_replace(logsize_users_decayed, lu, GINT_TO_POINTER(score)); } return score; diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/plugins/perl/common/module.h --- a/libpurple/plugins/perl/common/module.h Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/plugins/perl/common/module.h Wed Mar 03 01:13:44 2010 +0900 @@ -9,6 +9,7 @@ #include #ifdef _WIN32 #undef pipe +#undef STRINGIFY #endif #include #include diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/plugins/perl/perl-common.h --- a/libpurple/plugins/perl/perl-common.h Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/plugins/perl/perl-common.h Wed Mar 03 01:13:44 2010 +0900 @@ -3,6 +3,7 @@ #include #ifdef _WIN32 +#undef STRINGIFY #undef pipe #endif #include diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/plugins/ssl/Makefile.mingw --- a/libpurple/plugins/ssl/Makefile.mingw Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/plugins/ssl/Makefile.mingw Wed Mar 03 01:13:44 2010 +0900 @@ -15,14 +15,16 @@ NEEDED_DLLS = \ $(NSS_TOP)/lib/freebl3.dll \ + $(NSS_TOP)/lib/libnspr4.dll \ + $(NSS_TOP)/lib/libplc4.dll \ + $(NSS_TOP)/lib/libplds4.dll \ $(NSS_TOP)/lib/nss3.dll \ $(NSS_TOP)/lib/nssckbi.dll \ - $(NSS_TOP)/lib/softokn3.dll \ + $(NSS_TOP)/lib/nssutil3.dll \ $(NSS_TOP)/lib/smime3.dll \ - $(NSS_TOP)/lib/ssl3.dll \ - $(NSPR_TOP)/lib/nspr4.dll \ - $(NSPR_TOP)/lib/plc4.dll \ - $(NSPR_TOP)/lib/plds4.dll + $(NSS_TOP)/lib/softokn3.dll \ + $(NSS_TOP)/lib/sqlite3.dll \ + $(NSS_TOP)/lib/ssl3.dll ## ## INCLUDE PATHS @@ -34,13 +36,11 @@ -I$(PURPLE_TOP) \ -I$(PURPLE_TOP)/win32 \ -I$(PIDGIN_TREE_TOP) \ - -I$(NSS_TOP)/include \ - -I$(NSPR_TOP)/include + -I$(NSS_TOP)/include LIB_PATHS += -L$(GTK_TOP)/lib \ -L$(PURPLE_TOP) \ - -L$(NSS_TOP)/lib \ - -L$(NSPR_TOP)/lib + -L$(NSS_TOP)/lib ## ## SOURCES, OBJECTS diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/bonjour/mdns_win32.c --- a/libpurple/protocols/bonjour/mdns_win32.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/bonjour/mdns_win32.c Wed Mar 03 01:13:44 2010 +0900 @@ -251,7 +251,7 @@ static void DNSSD_API _mdns_service_resolve_callback(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, - const char *fullname, const char *hosttarget, uint16_t port, uint16_t txtLen, const char *txtRecord, void *context) + const char *fullname, const char *hosttarget, uint16_t port, uint16_t txtLen, const unsigned char *txtRecord, void *context) { ResolveCallbackArgs *args = (ResolveCallbackArgs*) context; Win32BuddyImplData *idata = args->bb->mdns_impl_data; diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/jabber/jabber.c Wed Mar 03 01:13:44 2010 +0900 @@ -2960,7 +2960,16 @@ gchar *error = NULL; if (!_jabber_send_buzz(js, username, &error)) { + PurpleAccount *account = purple_connection_get_account(gc); + PurpleConversation *conv = + purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, username, account); purple_debug_error("jabber", "jabber_send_attention: jabber_cmd_buzz failed with error: %s\n", error ? error : "(NULL)"); + + if (conv) { + purple_conversation_write(conv, username, error, PURPLE_MESSAGE_ERROR, + time(NULL)); + } + g_free(error); return FALSE; } diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/jabber/pep.c --- a/libpurple/protocols/jabber/pep.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/jabber/pep.c Wed Mar 03 01:13:44 2010 +0900 @@ -89,10 +89,11 @@ JabberIq *iq = jabber_iq_new(js, JABBER_IQ_GET); xmlnode *pubsub, *items; - xmlnode_set_attrib(iq->node,"to",to); + if (to) + xmlnode_set_attrib(iq->node, "to", to); + pubsub = xmlnode_new_child(iq->node,"pubsub"); - - xmlnode_set_namespace(pubsub,"http://jabber.org/protocol/pubsub"); + xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub"); items = xmlnode_new_child(pubsub, "items"); xmlnode_set_attrib(items,"node",node); diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/jabber/useravatar.c --- a/libpurple/protocols/jabber/useravatar.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/jabber/useravatar.c Wed Mar 03 01:13:44 2010 +0900 @@ -239,16 +239,12 @@ void jabber_avatar_fetch_mine(JabberStream *js) { - char *jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); - if (js->initial_avatar_hash) { - jabber_pep_request_item(js, jid, NS_AVATAR_0_12_METADATA, NULL, + jabber_pep_request_item(js, NULL, NS_AVATAR_0_12_METADATA, NULL, do_got_own_avatar_0_12_cb); - jabber_pep_request_item(js, jid, NS_AVATAR_1_1_METADATA, NULL, + jabber_pep_request_item(js, NULL, NS_AVATAR_1_1_METADATA, NULL, do_got_own_avatar_cb); } - - g_free(jid); } typedef struct _JabberBuddyAvatarUpdateURLInfo { diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/jabber/usernick.c --- a/libpurple/protocols/jabber/usernick.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/jabber/usernick.c Wed Mar 03 01:13:44 2010 +0900 @@ -86,14 +86,12 @@ } static void do_nick_set_nick(PurplePluginAction *action) { - PurpleConnection *gc = (PurpleConnection *) action->context; - JabberStream *js = gc->proto_data; - char *jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); + PurpleConnection *gc = action->context; + JabberStream *js = purple_connection_get_protocol_data(gc); /* since the nickname might have been changed by another resource of this account, we always have to request the old one from the server to present as the default for the new one */ - jabber_pep_request_item(js, jid, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb); - g_free(jid); + jabber_pep_request_item(js, NULL, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb); } void jabber_nick_init(void) { diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/msn/slp.c --- a/libpurple/protocols/msn/slp.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/msn/slp.c Wed Mar 03 01:13:44 2010 +0900 @@ -308,8 +308,6 @@ return NULL; } -#define MAX_FILE_NAME_LEN 0x226 - static void got_sessionreq(MsnSlpCall *slpcall, const char *branch, const char *euf_guid, const char *context) @@ -382,7 +380,7 @@ /* File Transfer */ PurpleAccount *account; PurpleXfer *xfer; - char *bin; + MsnFileContext *header; gsize bin_len; guint32 file_size; char *file_name; @@ -396,16 +394,18 @@ xfer = purple_xfer_new(account, PURPLE_XFER_RECEIVE, slpcall->slplink->remote_user); - if (xfer) - { - bin = (char *)purple_base64_decode(context, &bin_len); - file_size = GUINT32_FROM_LE(*(gsize *)(bin + 8)); - file_name = g_convert(bin + 20, MAX_FILE_NAME_LEN, "UTF-8", "UTF-16LE", + header = (MsnFileContext *)purple_base64_decode(context, &bin_len); + if (bin_len >= sizeof(MsnFileContext) - 1 && + (header->version == 2 || + (header->version == 3 && header->length == sizeof(MsnFileContext) + 63))) { + file_size = GUINT64_FROM_LE(header->file_size); + + file_name = g_convert((const gchar *)&header->file_name, + MAX_FILE_NAME_LEN * 2, + "UTF-8", "UTF-16LE", NULL, NULL, NULL); - g_free(bin); - purple_xfer_set_filename(xfer, file_name ? file_name : ""); g_free(file_name); purple_xfer_set_size(xfer, file_size); @@ -424,6 +424,7 @@ purple_xfer_request(xfer); } + g_free(header); accepted = TRUE; diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/msn/slp.h --- a/libpurple/protocols/msn/slp.h Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/msn/slp.h Wed Mar 03 01:13:44 2010 +0900 @@ -30,6 +30,25 @@ #include "session.h" #include "slpcall.h" +#define MAX_FILE_NAME_LEN 260 /* MAX_PATH in Windows */ + +/** + * The context data for a file transfer request + */ +#pragma pack(push,1) /* Couldn't they have made it the right size? */ +typedef struct +{ + guint32 length; /*< Length of header */ + guint32 version; /*< MSN version */ + guint64 file_size; /*< Size of file */ + guint32 type; /*< Transfer type */ + gunichar2 file_name[MAX_FILE_NAME_LEN]; /*< Self-explanatory */ + gchar unknown1[30]; /*< Used somehow for background sharing */ + guint32 unknown2; /*< Possibly for background sharing as well */ + gchar preview[1]; /*< File preview data, 96x96 PNG */ +} MsnFileContext; +#pragma pack(pop) + MsnSlpCall * msn_slp_sip_recv(MsnSlpLink *slplink, const char *body); diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/msn/slplink.c --- a/libpurple/protocols/msn/slplink.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/msn/slplink.c Wed Mar 03 01:13:44 2010 +0900 @@ -307,6 +307,8 @@ slpmsg->offset += msg->msnslp_header.length; + slpmsg->msgs = g_list_remove(slpmsg->msgs, msg); + if (slpmsg->offset < real_size) { if (slpmsg->slpcall->xfer && purple_xfer_get_status(slpmsg->slpcall->xfer) == PURPLE_XFER_STATUS_STARTED) @@ -331,8 +333,6 @@ } } } - - slpmsg->msgs = g_list_remove(slpmsg->msgs, msg); } /* We have received the message nak. */ @@ -658,74 +658,51 @@ } } -typedef struct -{ - guint32 length; - guint32 unk1; - guint32 file_size; - guint32 unk2; - guint32 unk3; -} MsnContextHeader; - -#define MAX_FILE_NAME_LEN 0x226 - static gchar * gen_context(PurpleXfer *xfer, const char *file_name, const char *file_path) { gsize size = 0; - MsnContextHeader header; + MsnFileContext header; gchar *u8 = NULL; - guchar *base; - guchar *n; gchar *ret; gunichar2 *uni = NULL; glong currentChar = 0; - glong uni_len = 0; - gsize len; + glong len = 0; size = purple_xfer_get_size(xfer); - if(!file_name) { + if (!file_name) { gchar *basename = g_path_get_basename(file_path); u8 = purple_utf8_try_convert(basename); g_free(basename); file_name = u8; } - uni = g_utf8_to_utf16(file_name, -1, NULL, &uni_len, NULL); + uni = g_utf8_to_utf16(file_name, -1, NULL, &len, NULL); - if(u8) { + if (u8) { g_free(u8); file_name = NULL; u8 = NULL; } - len = sizeof(MsnContextHeader) + MAX_FILE_NAME_LEN + 4; - - header.length = GUINT32_TO_LE(len); - header.unk1 = GUINT32_TO_LE(2); - header.file_size = GUINT32_TO_LE(size); - header.unk2 = GUINT32_TO_LE(0); - header.unk3 = GUINT32_TO_LE(0); - - base = g_malloc(len + 1); - n = base; + header.length = GUINT32_TO_LE(sizeof(MsnFileContext) - 1); + header.version = GUINT32_TO_LE(2); /* V.3 contains additional unnecessary data */ + header.file_size = GUINT64_TO_LE(size); + header.type = GUINT32_TO_LE(1); /* No file preview */ - memcpy(n, &header, sizeof(MsnContextHeader)); - n += sizeof(MsnContextHeader); + len = MIN(len, MAX_FILE_NAME_LEN); + for (currentChar = 0; currentChar < len; currentChar++) { + header.file_name[currentChar] = GUINT16_TO_LE(uni[currentChar]); + } + memset(&header.file_name[currentChar], 0x00, (MAX_FILE_NAME_LEN - currentChar) * 2); - memset(n, 0x00, MAX_FILE_NAME_LEN); - for(currentChar = 0; currentChar < uni_len; currentChar++) { - *((gunichar2 *)n + currentChar) = GUINT16_TO_LE(uni[currentChar]); - } - n += MAX_FILE_NAME_LEN; - - memset(n, 0xFF, 4); - n += 4; + memset(&header.unknown1, 0, sizeof(header.unknown1)); + header.unknown2 = GUINT32_TO_LE(0xffffffff); + header.preview[0] = '\0'; g_free(uni); - ret = purple_base64_encode(base, len); - g_free(base); + ret = purple_base64_encode((const guchar *)&header, sizeof(MsnFileContext)); return ret; } diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/mxit/mxit.h --- a/libpurple/protocols/mxit/mxit.h Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/mxit/mxit.h Wed Mar 03 01:13:44 2010 +0900 @@ -37,7 +37,9 @@ #endif #elif defined( _WIN32 ) /* windows architecture */ +#ifndef HOST_NAME_MAX #define HOST_NAME_MAX 512 +#endif #include "libc_interface.h" #elif defined( __linux__ ) /* linux architecture */ diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/protocols/null/nullprpl.c --- a/libpurple/protocols/null/nullprpl.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/protocols/null/nullprpl.c Wed Mar 03 01:13:44 2010 +0900 @@ -1117,9 +1117,10 @@ NULL, /* send_attention */ NULL, /* get_attention_types */ sizeof(PurplePluginProtocolInfo), /* struct_size */ - NULL, - NULL, /* initiate_media */ - NULL /* can_do_media */ + NULL, /* get_account_text_table */ + NULL, /* initiate_media */ + NULL, /* get_media_caps */ + NULL /* get_moods */ }; static void nullprpl_init(PurplePlugin *plugin) diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/win32/global.mak --- a/libpurple/win32/global.mak Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/win32/global.mak Wed Mar 03 01:13:44 2010 +0900 @@ -17,8 +17,7 @@ BONJOUR_TOP ?= $(WIN32_DEV_TOP)/Bonjour_SDK LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.7.4 MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2_daa2 -NSPR_TOP ?= $(WIN32_DEV_TOP)/nspr-4.6.4 -NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.11.4 +NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.12.5-nspr-4.8.2 PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.10.0 SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.8 TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5 @@ -103,7 +102,7 @@ ifeq "$(origin CC)" "default" CC := gcc.exe endif -GMSGFMT ?= $(GTK_BIN)/msgfmt +GMSGFMT ?= $(WIN32_DEV_TOP)/gettext-0.17/bin/msgfmt MAKENSIS ?= makensis.exe MAKENSISOPT ?= / PERL ?= /cygdrive/c/perl/bin/perl diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/win32/libc_interface.c --- a/libpurple/win32/libc_interface.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/win32/libc_interface.c Wed Mar 03 01:13:44 2010 +0900 @@ -62,7 +62,7 @@ /* helpers */ static int wpurple_is_socket( int fd ) { int optval; - unsigned int optlen = sizeof(int); + int optlen = sizeof(int); if( (getsockopt(fd, SOL_SOCKET, SO_TYPE, (void*)&optval, &optlen)) == SOCKET_ERROR ) { int error = WSAGetLastError(); @@ -973,7 +973,7 @@ memset(zonename, 0, sizeof(zonename)); namesize = sizeof(zonename); - if ((r = RegQueryValueEx(key, "Std", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS) + if ((r = RegQueryValueEx(key, "Std", NULL, NULL, (LPBYTE)zonename, &namesize)) != ERROR_SUCCESS) { purple_debug_warning("wpurple", "could not query value for 'std' to identify Windows timezone: %i\n", (int) r); RegCloseKey(key); @@ -988,7 +988,7 @@ } memset(zonename, 0, sizeof(zonename)); namesize = sizeof(zonename); - if ((r = RegQueryValueEx(key, "Dlt", NULL, NULL, zonename, &namesize)) != ERROR_SUCCESS) + if ((r = RegQueryValueEx(key, "Dlt", NULL, NULL, (LPBYTE)zonename, &namesize)) != ERROR_SUCCESS) { purple_debug_warning("wpurple", "could not query value for 'dlt' to identify Windows timezone: %i\n", (int) r); RegCloseKey(key); diff -r 08ceb05e9fe9 -r f5d753b3d01d libpurple/win32/win32dep.c --- a/libpurple/win32/win32dep.c Sun Feb 28 06:13:14 2010 +0900 +++ b/libpurple/win32/win32dep.c Wed Mar 03 01:13:44 2010 +0900 @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ -#define _WIN32_IE 0x500 +#define _WIN32_IE 0x501 #include "internal.h" #include diff -r 08ceb05e9fe9 -r f5d753b3d01d pidgin/Makefile.am --- a/pidgin/Makefile.am Sun Feb 28 06:13:14 2010 +0900 +++ b/pidgin/Makefile.am Wed Mar 03 01:13:44 2010 +0900 @@ -21,6 +21,7 @@ win32/winpidgin.c \ win32/wspell.c \ win32/wspell.h \ + win32/nsis/generate_gtk_zip.sh \ win32/nsis/pixmaps/pidgin-header.bmp \ win32/nsis/pixmaps/pidgin-intro.bmp \ win32/nsis/pixmaps/pidgin-install.ico \ diff -r 08ceb05e9fe9 -r f5d753b3d01d pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sun Feb 28 06:13:14 2010 +0900 +++ b/pidgin/gtkblist.c Wed Mar 03 01:13:44 2010 +0900 @@ -7853,7 +7853,6 @@ PurpleRequestFields *fields; PurpleRequestFieldGroup *g; PurpleRequestField *f; - char* na_fn; PurpleConnection *gc = purple_account_get_connection(account); PurplePluginProtocolInfo *prpl_info; PurpleMood *mood; @@ -7867,19 +7866,10 @@ g = purple_request_field_group_new(NULL); f = purple_request_field_list_new("mood", _("Please select your mood from the list")); - na_fn = g_build_filename("pixmaps", "pidgin", "emblems", "16", "not-authorized.png", NULL); - - purple_request_field_list_add_icon(f, _("None"), na_fn, NULL); + purple_request_field_list_add(f, _("None"), ""); if (current_mood == NULL) purple_request_field_list_add_selected(f, _("None")); - g_free(na_fn); - - /* first item is an empty one for unsetting the mood */ - purple_request_field_list_add(f, "", ""); - if (purple_strequal(current_mood, "")) - purple_request_field_list_add_selected(f, ""); - /* TODO: rlaager wants this sorted. */ for (mood = prpl_info->get_moods(account); mood->mood != NULL ; mood++) { diff -r 08ceb05e9fe9 -r f5d753b3d01d pidgin/gtkft.c --- a/pidgin/gtkft.c Sun Feb 28 06:13:14 2010 +0900 +++ b/pidgin/gtkft.c Wed Mar 03 01:13:44 2010 +0900 @@ -575,7 +575,7 @@ /* Build the tree model */ /* Transfer type, Progress Bar, Filename, Size, Remaining */ - model = gtk_list_store_new(NUM_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_DOUBLE, + model = gtk_list_store_new(NUM_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); dialog->model = model; @@ -609,7 +609,7 @@ /* Progress bar column */ renderer = gtk_cell_renderer_progress_new(); column = gtk_tree_view_column_new_with_attributes(_("Progress"), renderer, - "percentage", COLUMN_PROGRESS, NULL); + "value", COLUMN_PROGRESS, NULL); gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); @@ -906,7 +906,7 @@ lfilename = utf8; gtk_list_store_set(dialog->model, &data->iter, COLUMN_STATUS, pixbuf, - COLUMN_PROGRESS, 0.0, + COLUMN_PROGRESS, 0, COLUMN_FILENAME, (type == PURPLE_XFER_RECEIVE) ? purple_xfer_get_filename(xfer) : lfilename, @@ -1039,7 +1039,7 @@ remaining_str = purple_str_size_to_units(purple_xfer_get_bytes_remaining(xfer)); gtk_list_store_set(xfer_dialog->model, &data->iter, - COLUMN_PROGRESS, purple_xfer_get_progress(xfer), + COLUMN_PROGRESS, (gint)(purple_xfer_get_progress(xfer) * 100), COLUMN_SIZE, size_str, COLUMN_REMAINING, remaining_str, -1); diff -r 08ceb05e9fe9 -r f5d753b3d01d pidgin/plugins/xmppconsole.c --- a/pidgin/plugins/xmppconsole.c Sun Feb 28 06:13:14 2010 +0900 +++ b/pidgin/plugins/xmppconsole.c Wed Mar 03 01:13:44 2010 +0900 @@ -621,7 +621,7 @@ } static void -signed_on_cb(PurpleConnection *gc) +signing_on_cb(PurpleConnection *gc) { if (!console) return; @@ -630,7 +630,9 @@ console->accounts = g_list_append(console->accounts, gc); console->count++; - if (console->count > 1) + if (console->count == 1) + console->gc = gc; + else gtk_widget_show_all(console->hbox); } @@ -680,8 +682,8 @@ PURPLE_CALLBACK(xmlnode_received_cb), NULL); purple_signal_connect(jabber, "jabber-sending-text", xmpp_console_handle, PURPLE_CALLBACK(xmlnode_sent_cb), NULL); - purple_signal_connect(purple_connections_get_handle(), "signed-on", - plugin, PURPLE_CALLBACK(signed_on_cb), NULL); + purple_signal_connect(purple_connections_get_handle(), "signing-on", + plugin, PURPLE_CALLBACK(signing_on_cb), NULL); purple_signal_connect(purple_connections_get_handle(), "signed-off", plugin, PURPLE_CALLBACK(signed_off_cb), NULL); diff -r 08ceb05e9fe9 -r f5d753b3d01d pidgin/win32/nsis/generate_gtk_zip.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/win32/nsis/generate_gtk_zip.sh Wed Mar 03 01:13:44 2010 +0900 @@ -0,0 +1,83 @@ +#!/bin/bash +# Script to generate zip file for GTK+ runtime to be included in Pidgin installer + +PIDGIN_BASE=$1 + +if [ ! -e $PIDGIN_BASE/ChangeLog.win32 ]; then + echo `basename $0` must must have the pidgin base dir specified as a parameter. + exit 1 +fi + +STAGE_DIR=$PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage +#Subdirectory of $STAGE_DIR +INSTALL_DIR=Gtk +CONTENTS_FILE=$INSTALL_DIR/CONTENTS + +#This needs to be changed every time there is any sort of change. +BUNDLE_VERSION=2.14.7.0 + +ATK="http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.24/atk_1.24.0-1_win32.zip ATK 1.24.0-1" +CAIRO="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-1_win32.zip Cairo 1.8.10-1" +EXPAT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip Expat 2.0.1-1" +FONTCONFIG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip Fontconfig 2.8.0-2" +FREETYPE="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.3.11-2_win32.zip Freetype 2.3.11-2" +GETTEXT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip Gettext 0.17-1" +GLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip Glib 2.20.5-1" +GTK="http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.14/gtk+_2.14.7-1_win32.zip GTK+ 2.14.7-1" +LIBJPEG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/jpeg_7-1_win32.zip libjpeg 7-1" +#Used by GTK+ +LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.39-1_win32.zip libpng 1.2.39-1" +#Used by Cairo +LIBPNG2="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.0-1_win32.zip libpng 1.4.0-1" +LIBTIFF="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libtiff_3.9.1-1_win32.zip libtiff 3.9.1-1" +#PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango_1.22.4-1_win32.zip Pango 1.22.4-1" +PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.26/pango_1.26.2-1_win32.zip Pango 1.26.2-1" +ZLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip zlib 1.2.3" + +ALL="ATK CAIRO EXPAT FONTCONFIG FREETYPE GETTEXT GLIB GTK LIBJPEG LIBPNG LIBPNG2 LIBTIFF PANGO ZLIB" + +if [ ! -e $STAGE_DIR ]; then + mkdir $STAGE_DIR +fi +cd $STAGE_DIR + +rm -rf $INSTALL_DIR +mkdir $INSTALL_DIR + +#new CONTENTS file +echo Bundle Version $BUNDLE_VERSION > $CONTENTS_FILE + +function download_and_extract { + URL=${1%%\ *} + NAME=${1#*\ } + FILE=`basename $URL` + if [ ! -e $FILE ]; then + echo Downloading $NAME + wget $URL + fi + unzip -q $FILE -d $INSTALL_DIR + echo "$NAME" >> $CONTENTS_FILE +} + +for VAL in $ALL +do + VAR=${!VAL} + download_and_extract "$VAR" +done + +#Default GTK+ Theme to MS-Windows +echo gtk-theme-name = \"MS-Windows\" > $INSTALL_DIR/etc/gtk-2.0/gtkrc + +#Blow away translations that we don't have in Pidgin +for LOCALE_DIR in $INSTALL_DIR/share/locale/* +do + LOCALE=`basename $LOCALE_DIR` + if [ ! -e $PIDGIN_BASE/po/$LOCALE.po ]; then + echo Remove $LOCALE translation as it is missing from Pidgin + rm -r $LOCALE_DIR + fi +done + +#Generate zip file to be included in installer +zip -9 -r ../gtk-runtime-$BUNDLE_VERSION.zip Gtk + diff -r 08ceb05e9fe9 -r f5d753b3d01d pidgin/win32/nsis/pidgin-installer.nsi --- a/pidgin/win32/nsis/pidgin-installer.nsi Sun Feb 28 06:13:14 2010 +0900 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Wed Mar 03 01:13:44 2010 +0900 @@ -28,6 +28,7 @@ ShowInstDetails show ShowUninstDetails show SetDateSave on +RequestExecutionLevel highest ; $name and $INSTDIR are set in .onInit function.. @@ -340,7 +341,7 @@ !ifdef OFFLINE_INSTALLER SetOutPath $PLUGINSDIR - File /oname=gtk.zip "..\..\..\..\gtk_installer\gtk-runtime-${GTK_INSTALL_VERSION}.zip" + File /oname=gtk.zip ".\gtk-runtime-${GTK_INSTALL_VERSION}.zip" !else @@ -356,6 +357,9 @@ !endif + ;Delete the old Gtk directory + RMDir /r "$INSTDIR\Gtk" + SetOutPath "$INSTDIR" nsisunz::UnzipToLog $R1 "$INSTDIR" Pop $R0 @@ -773,23 +777,25 @@ Delete "$INSTDIR\idletrack.dll" Delete "$INSTDIR\libgtkspell.dll" Delete "$INSTDIR\libjabber.dll" + Delete "$INSTDIR\libnspr4.dll" Delete "$INSTDIR\libmeanwhile-1.dll" Delete "$INSTDIR\liboscar.dll" + Delete "$INSTDIR\libplc4.dll" + Delete "$INSTDIR\libplds4.dll" Delete "$INSTDIR\libpurple.dll" Delete "$INSTDIR\libsasl.dll" Delete "$INSTDIR\libsilc-1-1-2.dll" Delete "$INSTDIR\libsilcclient-1-1-2.dll" Delete "$INSTDIR\libxml2-2.dll" Delete "$INSTDIR\libymsg.dll" - Delete "$INSTDIR\nspr4.dll" Delete "$INSTDIR\nss3.dll" + Delete "$INSTDIR\nssutil3.dll" Delete "$INSTDIR\nssckbi.dll" Delete "$INSTDIR\pidgin.dll" Delete "$INSTDIR\pidgin.exe" - Delete "$INSTDIR\plc4.dll" - Delete "$INSTDIR\plds4.dll" Delete "$INSTDIR\smime3.dll" Delete "$INSTDIR\softokn3.dll" + Delete "$INSTDIR\sqlite3.dll" Delete "$INSTDIR\ssl3.dll" Delete "$INSTDIR\${PIDGIN_UNINST_EXE}" Delete "$INSTDIR\exchndl.dll"