Mercurial > pidgin
changeset 21113:0d6e582f2679
propagate from branch 'im.pidgin.cpw.khc.msnp14.soap' (head c3fe9bf88d02997989374e7ecc80a3f2462ee462)
to branch 'im.pidgin.pidgin' (head 18ccd2ba2c1c9b7fa3dfedf72b48b3bd01c3a7c4)
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sat, 03 Nov 2007 05:12:43 +0000 |
parents | 9838af97586b (diff) 13279824fe64 (current diff) |
children | 598fb854c1f5 |
files | libpurple/protocols/jabber/buddy.c libpurple/protocols/msn/msn.c pidgin/gtkaccount.c pidgin/gtkdialogs.c pidgin/gtksavedstatuses.c pidgin/gtkutils.c |
diffstat | 129 files changed, 916 insertions(+), 610 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.win32 Tue Oct 30 06:45:24 2007 +0000 +++ b/ChangeLog.win32 Sat Nov 03 05:12:43 2007 +0000 @@ -1,3 +1,6 @@ +version 2.2.3: + * No changes + version 2.2.2 (10/23/2007): * Updated gtkspell to include a patch to share Aspell dictionaries among all the input fields to avoid excessive memory usage. @@ -9,6 +12,9 @@ directory (e.g. \Documents and Settings\All Users\Application Data\purple\prefs.xml) similarly to how this is done on other platforms. +version 2.2.1 (09/29/2007): + * No changes + version 2.2.0 (09/13/2007): * Updated gtkspell to 2.0.11 * Upgrade SILC to use the 1.1.2 toolkit
--- a/config.h.mingw Tue Oct 30 06:45:24 2007 +0000 +++ b/config.h.mingw Sat Nov 03 05:12:43 2007 +0000 @@ -377,7 +377,8 @@ /* #define USE_SM 1 */ /* Version number of package */ -/* #define VERSION "2.0.0dev" */ +#define VERSION "@VERSION@" +#define DISPLAY_VERSION "@VERSION@" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
--- a/configure.ac Tue Oct 30 06:45:24 2007 +0000 +++ b/configure.ac Sat Nov 03 05:12:43 2007 +0000 @@ -283,6 +283,17 @@ AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +AC_ARG_WITH([extraversion], + AC_HELP_STRING([--with-extraversion=STRING], + [extra version number to be displayed in Help->About and --help (for packagers)]), + EXTRA_VERSION=$withval) + +if test x"$EXTRA_VERSION" != "x" ; then + AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info]) +else + AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info]) +fi + AC_ARG_WITH(x, [], with_x="$withval", with_x="yes") AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
--- a/finch/finch.c Tue Oct 30 06:45:24 2007 +0000 +++ b/finch/finch.c Sat Nov 03 05:12:43 2007 +0000 @@ -203,7 +203,7 @@ char *text; if (terse) { - text = g_strdup_printf(_("%s. Try `%s -h' for more information.\n"), VERSION, name); + text = g_strdup_printf(_("%s. Try `%s -h' for more information.\n"), DISPLAY_VERSION, name); } else { text = g_strdup_printf(_("%s\n" "Usage: %s [OPTION]...\n\n" @@ -211,7 +211,7 @@ " -d, --debug print debugging messages to stdout\n" " -h, --help display this help and exit\n" " -n, --nologin don't automatically login\n" - " -v, --version display the current version and exit\n"), VERSION, name); + " -v, --version display the current version and exit\n"), DISPLAY_VERSION, name); } purple_print_utf8_to_console(stdout, text); @@ -298,7 +298,7 @@ /* Translators may want to transliterate the name. It is not to be translated. */ gnt_quit(); - printf("%s %s\n", _("Finch"), VERSION); + printf("%s %s\n", _("Finch"), DISPLAY_VERSION); return 0; }
--- a/finch/gntconv.c Tue Oct 30 06:45:24 2007 +0000 +++ b/finch/gntconv.c Sat Nov 03 05:12:43 2007 +0000 @@ -1039,7 +1039,7 @@ PurpleCmdStatus status; if (!g_ascii_strcasecmp(args[0], "version")) { - tmp = g_strdup_printf("me is using Finch v%s.", VERSION); + tmp = g_strdup_printf("me is using Finch v%s.", DISPLAY_VERSION); markup = g_markup_escape_text(tmp, -1); status = purple_cmd_do_command(conv, tmp, markup, error);
--- a/finch/plugins/gntclipboard.c Tue Oct 30 06:45:24 2007 +0000 +++ b/finch/plugins/gntclipboard.c Sat Nov 03 05:12:43 2007 +0000 @@ -156,7 +156,7 @@ PURPLE_PRIORITY_DEFAULT, "gntclipboard", N_("GntClipboard"), - VERSION, + DISPLAY_VERSION, N_("Clipboard plugin"), N_("When the gnt clipboard contents change, " "the contents are made available to X, if possible."),
--- a/finch/plugins/gntgf.c Tue Oct 30 06:45:24 2007 +0000 +++ b/finch/plugins/gntgf.c Sat Nov 03 05:12:43 2007 +0000 @@ -375,7 +375,7 @@ PURPLE_PRIORITY_DEFAULT, "gntgf", N_("GntGf"), - VERSION, + DISPLAY_VERSION, N_("Toaster plugin"), N_("Toaster plugin"), "Sadrul H Chowdhury <sadrul@users.sourceforge.net>",
--- a/finch/plugins/gnthistory.c Tue Oct 30 06:45:24 2007 +0000 +++ b/finch/plugins/gnthistory.c Sat Nov 03 05:12:43 2007 +0000 @@ -177,7 +177,7 @@ PURPLE_PRIORITY_DEFAULT, HISTORY_PLUGIN_ID, N_("GntHistory"), - VERSION, + DISPLAY_VERSION, N_("Shows recently logged conversations in new conversations."), N_("When a new conversation is opened this plugin will insert " "the last conversation into the current conversation."),
--- a/finch/plugins/lastlog.c Tue Oct 30 06:45:24 2007 +0000 +++ b/finch/plugins/lastlog.c Sat Nov 03 05:12:43 2007 +0000 @@ -120,7 +120,7 @@ PURPLE_PRIORITY_DEFAULT, "gntlastlog", N_("GntLastlog"), - VERSION, + DISPLAY_VERSION, N_("Lastlog plugin."), N_("Lastlog plugin."), "Sadrul H Chowdhury <sadrul@users.sourceforge.net>",
--- a/libpurple/cipher.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/cipher.c Sat Nov 03 05:12:43 2007 +0000 @@ -616,7 +616,7 @@ /* * The s-box values are permuted according to the 'primitive function P' */ -static guint32 sbox1[64] = +static const guint32 sbox1[64] = { 0x00808200, 0x00000000, 0x00008000, 0x00808202, 0x00808002, 0x00008202, 0x00000002, 0x00008000, 0x00000200, 0x00808200, 0x00808202, 0x00000200, 0x00800202, 0x00808002, 0x00800000, 0x00000002, @@ -628,7 +628,7 @@ 0x00000202, 0x00800200, 0x00800200, 0x00000000, 0x00008002, 0x00008200, 0x00000000, 0x00808002 }; -static guint32 sbox2[64] = +static const guint32 sbox2[64] = { 0x40084010, 0x40004000, 0x00004000, 0x00084010, 0x00080000, 0x00000010, 0x40080010, 0x40004010, 0x40000010, 0x40084010, 0x40084000, 0x40000000, 0x40004000, 0x00080000, 0x00000010, 0x40080010, @@ -640,7 +640,7 @@ 0x00084000, 0x00000000, 0x40004000, 0x00004010, 0x40000000, 0x40080010, 0x40084010, 0x00084000 }; -static guint32 sbox3[64] = +static const guint32 sbox3[64] = { 0x00000104, 0x04010100, 0x00000000, 0x04010004, 0x04000100, 0x00000000, 0x00010104, 0x04000100, 0x00010004, 0x04000004, 0x04000004, 0x00010000, 0x04010104, 0x00010004, 0x04010000, 0x00000104, @@ -652,7 +652,7 @@ 0x04010000, 0x04000104, 0x00000104, 0x04010000, 0x00010104, 0x00000004, 0x04010004, 0x00010100 }; -static guint32 sbox4[64] = +static const guint32 sbox4[64] = { 0x80401000, 0x80001040, 0x80001040, 0x00000040, 0x00401040, 0x80400040, 0x80400000, 0x80001000, 0x00000000, 0x00401000, 0x00401000, 0x80401040, 0x80000040, 0x00000000, 0x00400040, 0x80400000, @@ -664,7 +664,7 @@ 0x80001000, 0x00001040, 0x00400000, 0x80401000, 0x00000040, 0x00400000, 0x00001000, 0x00401040 }; -static guint32 sbox5[64] = +static const guint32 sbox5[64] = { 0x00000080, 0x01040080, 0x01040000, 0x21000080, 0x00040000, 0x00000080, 0x20000000, 0x01040000, 0x20040080, 0x00040000, 0x01000080, 0x20040080, 0x21000080, 0x21040000, 0x00040080, 0x20000000, @@ -676,7 +676,7 @@ 0x00040080, 0x01000080, 0x20000080, 0x00040000, 0x00000000, 0x20040000, 0x01040080, 0x20000080 }; -static guint32 sbox6[64] = +static const guint32 sbox6[64] = { 0x10000008, 0x10200000, 0x00002000, 0x10202008, 0x10200000, 0x00000008, 0x10202008, 0x00200000, 0x10002000, 0x00202008, 0x00200000, 0x10000008, 0x00200008, 0x10002000, 0x10000000, 0x00002008, @@ -688,7 +688,7 @@ 0x00002000, 0x00200008, 0x10002008, 0x00000000, 0x10202000, 0x10000000, 0x00200008, 0x10002008 }; -static guint32 sbox7[64] = +static const guint32 sbox7[64] = { 0x00100000, 0x02100001, 0x02000401, 0x00000000, 0x00000400, 0x02000401, 0x00100401, 0x02100400, 0x02100401, 0x00100000, 0x00000000, 0x02000001, 0x00000001, 0x02000000, 0x02100001, 0x00000401, @@ -700,7 +700,7 @@ 0x00000000, 0x00100401, 0x02100000, 0x00000400, 0x02000001, 0x02000400, 0x00000400, 0x00100001 }; -static guint32 sbox8[64] = +static const guint32 sbox8[64] = { 0x08000820, 0x00000800, 0x00020000, 0x08020820, 0x08000000, 0x08000820, 0x00000020, 0x08000000, 0x00020020, 0x08020000, 0x08020820, 0x00020800, 0x08020800, 0x00020820, 0x00000800, 0x00000020, @@ -718,7 +718,7 @@ * * These two tables are part of the 'permuted choice 1' function. * * In this implementation several speed improvements are done. * */ -static guint32 leftkey_swap[16] = +static const guint32 leftkey_swap[16] = { 0x00000000, 0x00000001, 0x00000100, 0x00000101, 0x00010000, 0x00010001, 0x00010100, 0x00010101, @@ -726,7 +726,7 @@ 0x01010000, 0x01010001, 0x01010100, 0x01010101 }; -static guint32 rightkey_swap[16] = +static const guint32 rightkey_swap[16] = { 0x00000000, 0x01000000, 0x00010000, 0x01010000, 0x00000100, 0x01000100, 0x00010100, 0x01010100, @@ -742,7 +742,7 @@ * ordering of the subkeys so we can omit the table for decryption * subkey schedule. */ -static guint8 encrypt_rotate_tab[16] = +static const guint8 encrypt_rotate_tab[16] = { 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 };
--- a/libpurple/conversation.h Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/conversation.h Sat Nov 03 05:12:43 2007 +0000 @@ -171,9 +171,12 @@ void (*write_im)(PurpleConversation *conv, const char *who, const char *message, PurpleMessageFlags flags, time_t mtime); - /** Write a message to a conversation. This is used rather than - * the chat- or im-specific ops for generic messages, such as system - * messages like "x is now know as y". + /** Write a message to a conversation. This is used rather than the + * chat- or im-specific ops for errors, system messages (such as "x is + * now know as y"), and as the fallback if #write_im and #write_chat + * are not implemented. It should be implemented, or the UI will miss + * conversation error messages and your users will hate you. + * * @see purple_conversation_write() */ void (*write_conv)(PurpleConversation *conv,
--- a/libpurple/dbus-analyze-functions.py Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/dbus-analyze-functions.py Sat Nov 03 05:12:43 2007 +0000 @@ -75,7 +75,11 @@ ] pointer = "#pointer#" -myexception = "My Exception" + +class MyException(Exception): + pass + +myexception = MyException() def ctopascal(name): newname = "" @@ -520,7 +524,7 @@ try: self.processfunction(functiontext, paramtexts) - except myexception: + except MyException: sys.stderr.write(myline + "\n") except: sys.stderr.write(myline + "\n")
--- a/libpurple/example/nullclient.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/example/nullclient.c Sat Nov 03 05:12:43 2007 +0000 @@ -269,6 +269,13 @@ PurpleAccount *account; PurpleSavedStatus *status; + /* libpurple's built-in DNS resolution forks processes to perform + * blocking lookups without blocking the main process. It does not + * handle SIGCHLD itself, so if the UI does not you quickly get an army + * of zombie subprocesses marching around. + */ + signal(SIGCHLD, SIG_IGN); + init_libpurple(); printf("libpurple initialized.\n");
--- a/libpurple/plugins/autoaccept.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/autoaccept.c Sat Nov 03 05:12:43 2007 +0000 @@ -252,7 +252,7 @@ PLUGIN_ID, /* plugin id */ PLUGIN_NAME, /* name */ - VERSION, /* version */ + DISPLAY_VERSION, /* version */ PLUGIN_SUMMARY, /* summary */ PLUGIN_DESCRIPTION, /* description */ PLUGIN_AUTHOR, /* author */
--- a/libpurple/plugins/buddynote.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/buddynote.c Sat Nov 03 05:12:43 2007 +0000 @@ -88,7 +88,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ "core-plugin_pack-buddynote", /**< id */ N_("Buddy Notes"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Store notes on particular buddies."), /**< summary */ N_("Adds the option to store notes for buddies " "on your buddy list."), /**< description */
--- a/libpurple/plugins/ciphertest.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/ciphertest.c Sat Nov 03 05:12:43 2007 +0000 @@ -262,7 +262,7 @@ "core-cipher-test", /**< id */ N_("Cipher Test"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Tests the ciphers that ship with libpurple."), /** description */
--- a/libpurple/plugins/dbus-example.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/dbus-example.c Sat Nov 03 05:12:43 2007 +0000 @@ -153,7 +153,7 @@ "dbus-example", /**< id */ N_("DBus Example"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("DBus Plugin Example"), /** description */
--- a/libpurple/plugins/debug_example.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/debug_example.c Sat Nov 03 05:12:43 2007 +0000 @@ -109,7 +109,7 @@ PLUGIN_ID, /* id */ "Debug API Example", /* name */ - VERSION, /* version */ + DISPLAY_VERSION, /* version */ "Debug API Example", /* summary */ "Debug API Example", /* description */ PLUGIN_AUTHOR, /* author */
--- a/libpurple/plugins/filectl.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/filectl.c Sat Nov 03 05:12:43 2007 +0000 @@ -246,7 +246,7 @@ FILECTL_PLUGIN_ID, /**< id */ N_("File Control"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Allows control by entering commands in a file."), /** description */
--- a/libpurple/plugins/helloworld.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/helloworld.c Sat Nov 03 05:12:43 2007 +0000 @@ -114,8 +114,8 @@ "core-hello_world", "Hello World!", - VERSION, /* This constant is defined in version.h, but you shouldn't use it for - your own plugins. We use it here because it's our plugin. */ + DISPLAY_VERSION, /* This constant is defined in config.h, but you shouldn't use it for + your own plugins. We use it here because it's our plugin. And we're lazy. */ "Hello World Plugin", "Hello World Plugin",
--- a/libpurple/plugins/idle.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/idle.c Sat Nov 03 05:12:43 2007 +0000 @@ -316,7 +316,7 @@ /* This is a cultural reference. Dy'er Mak'er is a song by Led Zeppelin. If that doesn't translate well into your language, drop the 's before translating. */ N_("I'dle Mak'er"), - VERSION, + DISPLAY_VERSION, N_("Allows you to hand-configure how long you've been idle"), N_("Allows you to hand-configure how long you've been idle"), "Eric Warmenhoven <eric@warmenhoven.org>",
--- a/libpurple/plugins/ipc-test-client.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/ipc-test-client.c Sat Nov 03 05:12:43 2007 +0000 @@ -85,7 +85,7 @@ IPC_TEST_CLIENT_PLUGIN_ID, /**< id */ N_("IPC Test Client"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Test plugin IPC support, as a client."), /** description */
--- a/libpurple/plugins/ipc-test-server.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/ipc-test-server.c Sat Nov 03 05:12:43 2007 +0000 @@ -72,7 +72,7 @@ IPC_TEST_SERVER_PLUGIN_ID, /**< id */ N_("IPC Test Server"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Test plugin IPC support, as a server."), /** description */
--- a/libpurple/plugins/joinpart.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/joinpart.c Sat Nov 03 05:12:43 2007 +0000 @@ -268,7 +268,7 @@ JOINPART_PLUGIN_ID, /**< id */ N_("Join/Part Hiding"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Hides extraneous join/part messages."), /** description */
--- a/libpurple/plugins/log_reader.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/log_reader.c Sat Nov 03 05:12:43 2007 +0000 @@ -2888,7 +2888,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ "core-log_reader", /**< id */ N_("Log Reader"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Includes other IM clients' logs in the "
--- a/libpurple/plugins/mono/loader/mono.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/mono/loader/mono.c Sat Nov 03 05:12:43 2007 +0000 @@ -215,7 +215,7 @@ PURPLE_PRIORITY_DEFAULT, MONO_PLUGIN_ID, N_("Mono Plugin Loader"), - VERSION, + DISPLAY_VERSION, N_("Loads .NET plugins with Mono."), N_("Loads .NET plugins with Mono."), "Eoin Coffey <ecoffey@simla.colostate.edu>",
--- a/libpurple/plugins/newline.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/newline.c Sat Nov 03 05:12:43 2007 +0000 @@ -66,7 +66,7 @@ "core-plugin_pack-newline", /**< id */ N_("New Line"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Prepends a newline to displayed message."), /**< summary */ N_("Prepends a newline to messages so that the " "rest of the message appears below the "
--- a/libpurple/plugins/notify_example.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/notify_example.c Sat Nov 03 05:12:43 2007 +0000 @@ -135,7 +135,7 @@ PLUGIN_ID, /* id */ "Notify API Example", /* name */ - VERSION, /* version */ + DISPLAY_VERSION, /* version */ "Notify API Example", /* summary */ "Notify API Example", /* description */ PLUGIN_AUTHOR, /* author */
--- a/libpurple/plugins/offlinemsg.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/offlinemsg.c Sat Nov 03 05:12:43 2007 +0000 @@ -225,7 +225,7 @@ PLUGIN_ID, /* plugin id */ PLUGIN_NAME, /* name */ - VERSION, /* version */ + DISPLAY_VERSION, /* version */ PLUGIN_SUMMARY, /* summary */ PLUGIN_DESCRIPTION, /* description */ PLUGIN_AUTHOR, /* author */
--- a/libpurple/plugins/perl/perl.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/perl/perl.c Sat Nov 03 05:12:43 2007 +0000 @@ -599,7 +599,7 @@ PERL_PLUGIN_ID, /**< id */ N_("Perl Plugin Loader"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Provides support for loading perl plugins."), /**< summary */ N_("Provides support for loading perl plugins."), /**< description */ "Christian Hammond <chipx86@gnupdate.org>", /**< author */
--- a/libpurple/plugins/pluginpref_example.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/pluginpref_example.c Sat Nov 03 05:12:43 2007 +0000 @@ -131,7 +131,7 @@ "core-pluginpref_example", /**< id */ "Pluginpref Example", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ "An example of how to use pluginprefs", /** description */
--- a/libpurple/plugins/psychic.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/psychic.c Sat Nov 03 05:12:43 2007 +0000 @@ -147,7 +147,7 @@ PLUGIN_ID, /**< id */ PLUGIN_NAME, /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ PLUGIN_SUMMARY, /**< summary */ PLUGIN_DESC, /**< description */ PLUGIN_AUTHOR, /**< author */
--- a/libpurple/plugins/signals-test.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/signals-test.c Sat Nov 03 05:12:43 2007 +0000 @@ -709,7 +709,7 @@ SIGNAL_TEST_PLUGIN_ID, /**< id */ N_("Signals Test"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Test to see that all signals are working properly."), /** description */
--- a/libpurple/plugins/simple.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/simple.c Sat Nov 03 05:12:43 2007 +0000 @@ -35,7 +35,7 @@ SIMPLE_PLUGIN_ID, /**< id */ N_("Simple Plugin"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Tests to see that most things are working."), /** description */
--- a/libpurple/plugins/ssl/ssl-gnutls.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-gnutls.c Sat Nov 03 05:12:43 2007 +0000 @@ -993,7 +993,7 @@ SSL_GNUTLS_PLUGIN_ID, /**< id */ N_("GNUTLS"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Provides SSL support through GNUTLS."), /** description */
--- a/libpurple/plugins/ssl/ssl-nss.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-nss.c Sat Nov 03 05:12:43 2007 +0000 @@ -814,7 +814,7 @@ SSL_NSS_PLUGIN_ID, /**< id */ N_("NSS"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Provides SSL support through Mozilla NSS."), /** description */
--- a/libpurple/plugins/ssl/ssl.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/ssl/ssl.c Sat Nov 03 05:12:43 2007 +0000 @@ -92,7 +92,7 @@ SSL_PLUGIN_ID, /**< id */ N_("SSL"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Provides a wrapper around SSL support libraries."), /** description */
--- a/libpurple/plugins/statenotify.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/statenotify.c Sat Nov 03 05:12:43 2007 +0000 @@ -146,7 +146,7 @@ STATENOTIFY_PLUGIN_ID, /**< id */ N_("Buddy State Notification"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Notifies in a conversation window when a buddy goes or returns from " "away or idle."),
--- a/libpurple/plugins/tcl/tcl.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/plugins/tcl/tcl.c Sat Nov 03 05:12:43 2007 +0000 @@ -421,7 +421,7 @@ PURPLE_PRIORITY_DEFAULT, "core-tcl", N_("Tcl Plugin Loader"), - VERSION, + DISPLAY_VERSION, N_("Provides support for loading Tcl plugins"), N_("Provides support for loading Tcl plugins"), "Ethan Blanton <eblanton@cs.purdue.edu>",
--- a/libpurple/protocols/bonjour/bonjour.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Sat Nov 03 05:12:43 2007 +0000 @@ -476,7 +476,7 @@ "prpl-bonjour", /**< id */ "Bonjour", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Bonjour Protocol Plugin"), /** description */
--- a/libpurple/protocols/bonjour/jabber.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Sat Nov 03 05:12:43 2007 +0000 @@ -367,7 +367,6 @@ void bonjour_jabber_stream_ended(PurpleBuddy *pb) { BonjourBuddy *bb = pb->proto_data; - PurpleConversation *conv; purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", pb->name); @@ -375,12 +374,15 @@ /* Inform the user that the conversation has been closed */ if (bb->conversation != NULL) { +#if 0 + PurpleConversation *conv; conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, pb->name, pb->account); if (conv != NULL) { char *tmp = g_strdup_printf(_("%s has closed the conversation."), pb->name); purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL)); g_free(tmp); } +#endif /* Close the socket, clear the watcher and free memory */ bonjour_jabber_close_conversation(bb->conversation); bb->conversation = NULL;
--- a/libpurple/protocols/bonjour/mdns_win32.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/bonjour/mdns_win32.c Sat Nov 03 05:12:43 2007 +0000 @@ -147,10 +147,13 @@ } /* free the hosts list*/ - g_slist_free(hosts); + while (hosts != NULL) { + hosts = g_slist_remove(hosts, hosts->data); + g_free(hosts->data); + hosts = g_slist_remove(hosts, hosts->data); + } /* free the remaining args memory */ - purple_dnsquery_destroy(args->query); g_free(args->full_service_name); g_free(args); }
--- a/libpurple/protocols/gg/gg.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/gg/gg.c Sat Nov 03 05:12:43 2007 +0000 @@ -2148,7 +2148,7 @@ "prpl-gg", /* id */ "Gadu-Gadu", /* name */ - VERSION, /* version */ + DISPLAY_VERSION, /* version */ N_("Gadu-Gadu Protocol Plugin"), /* summary */ N_("Polish popular IM"), /* description */
--- a/libpurple/protocols/irc/irc.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/irc/irc.c Sat Nov 03 05:12:43 2007 +0000 @@ -910,7 +910,7 @@ "prpl-irc", /**< id */ "IRC", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("IRC Protocol Plugin"), /** summary */ N_("The IRC Protocol Plugin that Sucks Less"), /** description */ NULL, /**< author */
--- a/libpurple/protocols/jabber/buddy.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/jabber/buddy.c Sat Nov 03 05:12:43 2007 +0000 @@ -279,7 +279,7 @@ char *tag; /* tag text */ char *ptag; /* parent tag "path" text */ char *url; /* vCard display format if URL */ -} vcard_template_data[] = { +} const vcard_template_data[] = { {N_("Full Name"), NULL, TRUE, TRUE, "FN", NULL, NULL}, {N_("Family Name"), NULL, TRUE, TRUE, "FAMILY", "N", NULL}, {N_("Given Name"), NULL, TRUE, TRUE, "GIVEN", "N", NULL}, @@ -311,7 +311,7 @@ struct tag_attr { char *attr; char *value; -} vcard_tag_attr_list[] = { +} const vcard_tag_attr_list[] = { {"prodid", "-//HandGen//NONSGML vGen v1.0//EN"}, {"version", "2.0", }, {"xmlns", "vcard-temp", }, @@ -337,7 +337,7 @@ * from the vCard template struct. */ if(parent_tag == NULL) { - struct vcard_template *vc_tp = vcard_template_data; + const struct vcard_template *vc_tp = vcard_template_data; while(vc_tp->label != NULL) { if(strcmp(vc_tp->tag, new_tag) == 0) { @@ -395,7 +395,7 @@ JabberIq *iq; JabberStream *js = gc->proto_data; xmlnode *vc_node; - struct tag_attr *tag_attr; + const struct tag_attr *tag_attr; /* if we have't grabbed the remote vcard yet, we can't * assume that what we have here is correct */ @@ -614,7 +614,7 @@ const char *text; char *p; const struct vcard_template *vc_tp; - struct tag_attr *tag_attr; + const struct tag_attr *tag_attr; vc_node = xmlnode_new("vCard");
--- a/libpurple/protocols/jabber/jabber.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sat Nov 03 05:12:43 2007 +0000 @@ -1664,6 +1664,8 @@ if(type && !strcmp(type, "result")) { purple_notify_info(js->gc, _("Password Changed"), _("Password Changed"), _("Your password has been changed.")); + + purple_account_set_password(js->gc->account, (char *)data); } else { char *msg = jabber_parse_error(js, packet); @@ -1671,6 +1673,8 @@ _("Error changing password"), msg); g_free(msg); } + + g_free(data); } static void jabber_password_change_cb(JabberStream *js, @@ -1699,11 +1703,9 @@ y = xmlnode_new_child(query, "password"); xmlnode_insert_data(y, p1, -1); - jabber_iq_set_callback(iq, jabber_password_change_result_cb, NULL); + jabber_iq_set_callback(iq, jabber_password_change_result_cb, g_strdup(p1)); jabber_iq_send(iq); - - purple_account_set_password(js->gc->account, p1); } static void jabber_password_change(PurplePluginAction *action)
--- a/libpurple/protocols/jabber/libxmpp.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Sat Nov 03 05:12:43 2007 +0000 @@ -165,7 +165,7 @@ "prpl-jabber", /**< id */ "XMPP", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("XMPP Protocol Plugin"), /** description */
--- a/libpurple/protocols/jabber/usermood.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/jabber/usermood.c Sat Nov 03 05:12:43 2007 +0000 @@ -28,7 +28,7 @@ #include "request.h" #include "debug.h" -static const char *moodstrings[] = { +static const char * const moodstrings[] = { "afraid", "amazed", "angry",
--- a/libpurple/protocols/msn/msn.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/msn/msn.c Sat Nov 03 05:12:43 2007 +0000 @@ -617,7 +617,12 @@ * XXX: blocked icon overlay isn't always accurate for MSN. * XXX: This can die as soon as purple_privacy_check() knows that * XXX: this prpl always honors both the allow and deny lists. */ - if (user) + /* While the above comment may be strictly correct (the privacy API needs + * rewriteing), purple_privacy_check() is going to be more accurate at + * indicating whether a particular buddy is going to be able to message + * you, which is the important information that this is trying to convey. + */ + if (full && user) { purple_notify_user_info_add_pair(user_info, _("Blocked"), ((user->list_op & (1 << MSN_LIST_BL)) ? _("Yes") : _("No"))); @@ -2256,7 +2261,7 @@ "prpl-msn", /**< id */ "MSN", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Windows Live Messenger Protocol Plugin"), /** description */
--- a/libpurple/protocols/myspace/user.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/myspace/user.c Sat Nov 03 05:12:43 2007 +0000 @@ -203,14 +203,6 @@ /* Ignore because PurpleBuddy knows this already */ g_free(value_str); } else if (g_str_equal(key_str, "ImageURL") || g_str_equal(key_str, "AvatarURL")) { - if (user->temporary_user) { - /* This user will be destroyed soon; don't try to look up its image or avatar, - * since that won't return immediately and we will end up accessing freed data. - */ - g_free(value_str); - return; - } - const gchar *previous_url; if (user->temporary_user) { @@ -220,7 +212,15 @@ g_free(value_str); return; } - + + if (user->temporary_user) { + /* This user will be destroyed soon; don't try to look up its image or avatar, + * since that won't return immediately and we will end up accessing freed data. + */ + g_free(value_str); + return; + } + g_free(user->image_url); user->image_url = value_str; @@ -233,7 +233,7 @@ NULL, 0, NULL); return; } - + /* TODO: use ETag for checksum */ previous_url = purple_buddy_icons_get_checksum_for_user(user->buddy);
--- a/libpurple/protocols/novell/novell.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/novell/novell.c Sat Nov 03 05:12:43 2007 +0000 @@ -3518,7 +3518,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ "prpl-novell", /**< id */ "GroupWise", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Novell GroupWise Messenger Protocol Plugin"), /** description */
--- a/libpurple/protocols/oscar/libaim.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/oscar/libaim.c Sat Nov 03 05:12:43 2007 +0000 @@ -113,7 +113,7 @@ "prpl-aim", /**< id */ "AIM", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("AIM Protocol Plugin"), /** description */
--- a/libpurple/protocols/oscar/libicq.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/oscar/libicq.c Sat Nov 03 05:12:43 2007 +0000 @@ -113,7 +113,7 @@ "prpl-icq", /**< id */ "ICQ", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("ICQ Protocol Plugin"), /** description */
--- a/libpurple/protocols/oscar/oscar.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sat Nov 03 05:12:43 2007 +0000 @@ -112,7 +112,7 @@ gchar *nick; }; -static char *msgerrreason[] = { +static const char * const msgerrreason[] = { N_("Invalid error"), N_("Invalid SNAC"), N_("Rate to host"), @@ -139,7 +139,7 @@ N_("Queue full"), N_("Not while on AOL") }; -static int msgerrreasonlen = 25; +static const int msgerrreasonlen = G_N_ELEMENTS(msgerrreason); /* All the libfaim->purple callback functions */ static int purple_parse_auth_resp (OscarData *, FlapConnection *, FlapFrame *, ...); @@ -4766,10 +4766,11 @@ if (reason == 0x0005) { purple_notify_error(gc, NULL, _("Unable To Retrieve Buddy List"), - _("The AIM servers were temporarily unable to send your buddy list. Your buddy list is not lost, and will probably become available in a few hours.")); + _("The AIM servers were temporarily unable to send your buddy list. Your buddy list is not lost, and will probably become available in a few minutes.")); if (od->getblisttimer > 0) purple_timeout_remove(od->getblisttimer); od->getblisttimer = purple_timeout_add(30000, purple_ssi_rerequestdata, od); + return 1; } oscar_set_extendedstatus(gc);
--- a/libpurple/protocols/qq/qq.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/qq/qq.c Sat Nov 03 05:12:43 2007 +0000 @@ -720,7 +720,7 @@ "prpl-qq", /**< id */ "QQ", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("QQ Protocol Plugin"), /** description */
--- a/libpurple/protocols/sametime/sametime.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/sametime/sametime.c Sat Nov 03 05:12:43 2007 +0000 @@ -5667,7 +5667,7 @@ PLUGIN_ID, /**< id */ PLUGIN_NAME, /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ PLUGIN_SUMMARY, /**< summary */ PLUGIN_DESC, /**< description */ PLUGIN_AUTHOR, /**< author */
--- a/libpurple/protocols/silc/buddy.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/buddy.c Sat Nov 03 05:12:43 2007 +0000 @@ -934,8 +934,11 @@ /* Create dir if it doesn't exist */ if ((g_stat(filename, &st)) == -1) { if (errno == ENOENT) { - if (pw->pw_uid == geteuid()) - g_mkdir(filename, 0755); + if (pw->pw_uid == geteuid()) { + int ret = g_mkdir(filename, 0755); + if (ret < 0) + return; + } } }
--- a/libpurple/protocols/silc/chat.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/chat.c Sat Nov 03 05:12:43 2007 +0000 @@ -160,15 +160,17 @@ unsigned char *pk; SilcUInt32 pk_len; pk = silc_pkcs_public_key_encode(channel->founder_key, &pk_len); - fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); - babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); + if (pk) { + fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); + babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); - g_string_append_printf(s, _("<br><b>Founder Key Fingerprint:</b><br>%s"), fingerprint); - g_string_append_printf(s, _("<br><b>Founder Key Babbleprint:</b><br>%s"), babbleprint); + g_string_append_printf(s, _("<br><b>Founder Key Fingerprint:</b><br>%s"), fingerprint); + g_string_append_printf(s, _("<br><b>Founder Key Babbleprint:</b><br>%s"), babbleprint); - silc_free(fingerprint); - silc_free(babbleprint); - silc_free(pk); + silc_free(fingerprint); + silc_free(babbleprint); + silc_free(pk); + } } buf = g_string_free(s, FALSE); @@ -460,6 +462,8 @@ silc_dlist_start(channel_pubkeys); while ((public_key = silc_dlist_get(channel_pubkeys))) { pk = silc_pkcs_public_key_encode(public_key, &pk_len); + if (!pk) + continue; fingerprint = silc_hash_fingerprint(NULL, pk + 4, pk_len - 4); babbleprint = silc_hash_babbleprint(NULL, pk + 4, pk_len - 4); @@ -1013,9 +1017,6 @@ SilcClient client = sg->client; SilcClientConnection conn = sg->conn; const char *channel, *passphrase, *parentch; -#if 0 - PurpleChat *chat; -#endif if (!conn) return; @@ -1071,22 +1072,6 @@ return; } -#if 0 - /* If the channel is not on buddy list, automatically add it there. */ - chat = purple_blist_find_chat(sg->account, channel); - if (!chat) { - data = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, g_free); - g_hash_table_replace(data, g_strdup("channel"), - g_strdup(channel)); - if (passphrase) - g_hash_table_replace(data, g_strdup("passphrase"), - g_strdup(passphrase)); - chat = purple_chat_new(sg->account, NULL, data); - purple_blist_add_chat(chat, NULL, NULL); - } -#endif - /* XXX We should have other properties here as well: 1. whether to try to authenticate to the channel 1a. with default key, @@ -1320,7 +1305,7 @@ ret = silc_client_send_channel_message(client, conn, channel, key, - flags, NULL, + flags, sg->sha1hash, buf->data, silc_buffer_len(buf)); silc_mime_partial_free(list); @@ -1334,7 +1319,8 @@ /* Send channel message */ ret = silc_client_send_channel_message(client, conn, channel, key, - flags, NULL, (unsigned char *)msg2, + flags, sg->sha1hash, + (unsigned char *)msg2, strlen(msg2)); if (ret) { serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), 0, msg,
--- a/libpurple/protocols/silc/ops.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/ops.c Sat Nov 03 05:12:43 2007 +0000 @@ -1274,13 +1274,15 @@ unsigned char *pk; SilcUInt32 pk_len; pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len); - fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); - babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); - purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); - purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); - silc_free(fingerprint); - silc_free(babbleprint); - silc_free(pk); + if (pk) { + fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); + babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); + purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); + purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); + silc_free(fingerprint); + silc_free(babbleprint); + silc_free(pk); + } } #if 0 /* XXX for now, let's not show attrs here */ @@ -1346,13 +1348,15 @@ unsigned char *pk; SilcUInt32 pk_len; pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len); - fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); - babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); - purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); - purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); - silc_free(fingerprint); - silc_free(babbleprint); - silc_free(pk); + if (pk) { + fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); + babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); + purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); + purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); + silc_free(fingerprint); + silc_free(babbleprint); + silc_free(pk); + } } purple_notify_userinfo(gc, nickname, user_info, NULL, NULL);
--- a/libpurple/protocols/silc/pk.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/pk.c Sat Nov 03 05:12:43 2007 +0000 @@ -158,6 +158,11 @@ NULL, &hostname, &ip, &port); pk = silc_pkcs_public_key_encode(public_key, &pk_len); + if (!pk) { + if (completion) + completion(FALSE, context); + return; + } if (conn_type == SILC_CONN_SERVER || conn_type == SILC_CONN_ROUTER) {
--- a/libpurple/protocols/silc/silc.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/silc.c Sat Nov 03 05:12:43 2007 +0000 @@ -128,6 +128,7 @@ NULL, 0); } +#if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1) static gboolean silcpurple_scheduler(gpointer *context) { @@ -135,6 +136,105 @@ silc_client_run_one(client); return TRUE; } +#else +typedef struct { + SilcPurple sg; + SilcUInt32 fd; + guint tag; +} *SilcPurpleTask; + +/* A timeout occurred. Call SILC scheduler. */ + +static gboolean +silcpurple_scheduler_timeout(gpointer context) +{ + SilcPurpleTask task = (SilcPurpleTask)context; + silc_client_run_one(task->sg->client); + silc_dlist_del(task->sg->tasks, task); + silc_free(task); + return FALSE; +} + +/* An fd task event occurred. Call SILC scheduler. */ + +static void +silcpurple_scheduler_fd(gpointer data, gint fd, PurpleInputCondition cond) +{ + SilcClient client = (SilcClient)data; + silc_client_run_one(client); +} + +/* SILC Scheduler notify callback. This is called whenever task is added to + or deleted from SILC scheduler. It's also called when fd task events + change. Here we add same tasks to glib's main loop. */ + +static void +silcpurple_scheduler(SilcSchedule schedule, + SilcBool added, SilcTask task, + SilcBool fd_task, SilcUInt32 fd, + SilcTaskEvent event, + long seconds, long useconds, + void *context) +{ + SilcClient client = (SilcClient)context; + PurpleConnection *gc = client->application; + SilcPurple sg = gc->proto_data; + SilcPurpleTask ptask = NULL; + + if (added) { + if (fd_task) { + /* Add fd or change fd events */ + PurpleInputCondition e = 0; + + silc_dlist_start(sg->tasks); + while ((ptask = silc_dlist_get(sg->tasks))) + if (ptask->fd == fd) { + purple_input_remove(ptask->tag); + break; + } + + if (event & SILC_TASK_READ) + e |= PURPLE_INPUT_READ; + if (event & SILC_TASK_WRITE) + e |= PURPLE_INPUT_WRITE; + + if (e) { + if (!ptask) { + ptask = silc_calloc(1, sizeof(*ptask)); + ptask->fd = fd; + silc_dlist_add(sg->tasks, ptask); + } + ptask->tag = purple_input_add(fd, e, silcpurple_scheduler_fd, + client); + } else if (ptask) { + silc_dlist_del(sg->tasks, ptask); + silc_free(ptask); + } + } else { + /* Add timeout */ + ptask = silc_calloc(1, sizeof(*ptask)); + ptask->sg = sg; + ptask->tag = purple_timeout_add((seconds * 1000) + + (useconds / 1000), + silcpurple_scheduler_timeout, + ptask); + silc_dlist_add(sg->tasks, ptask); + } + } else { + if (fd_task) { + /* Remove fd */ + silc_dlist_start(sg->tasks); + while ((ptask = silc_dlist_get(sg->tasks))) + if (ptask->fd == fd) { + purple_input_remove(ptask->tag); + silc_dlist_del(sg->tasks, ptask); + silc_free(ptask); + break; + } + } + } +} +#endif /* __SILC_TOOLKIT_VERSION */ static void silcpurple_connect_cb(SilcClient client, SilcClientConnection conn, @@ -316,6 +416,8 @@ return; } + silc_hash_alloc("sha1", &sg->sha1hash); + /* Wrap socket to TCP stream */ silc_socket_tcp_stream_create(source, TRUE, FALSE, sg->client->schedule, @@ -324,21 +426,11 @@ static void silcpurple_running(SilcClient client, void *context) { - PurpleAccount *account = context; - PurpleConnection *gc = account->gc; - SilcPurple sg; + SilcPurple sg = context; + PurpleConnection *gc = sg->gc; + PurpleAccount *account = purple_connection_get_account(gc); char pkd[256], prd[256]; - sg = silc_calloc(1, sizeof(*sg)); - if (!sg) - return; - memset(sg, 0, sizeof(*sg)); - sg->client = client; - sg->gc = gc; - sg->account = account; - sg->scheduler = SILC_PTR_TO_32(gc->proto_data); - gc->proto_data = sg; - /* Progress */ purple_connection_update_progress(gc, _("Connecting to SILC Server"), 1, 5); @@ -375,10 +467,10 @@ { SilcClient client; PurpleConnection *gc; + SilcPurple sg; SilcClientParams params; const char *cipher, *hmac; char *username, *hostname, *realname, **up; - guint scheduler; int i; gc = account->gc; @@ -431,11 +523,21 @@ break; } + sg = silc_calloc(1, sizeof(*sg)); + if (!sg) + return; + sg->client = client; + sg->gc = gc; + sg->account = account; + gc->proto_data = sg; + /* Init SILC client */ if (!silc_client_init(client, username, hostname, realname, - silcpurple_running, account)) { + silcpurple_running, sg)) { gc->wants_to_die = TRUE; purple_connection_error(gc, _("Cannot initialize SILC protocol")); + gc->proto_data = NULL; + silc_free(sg); return; } @@ -443,20 +545,32 @@ if (!silcpurple_check_silc_dir(gc)) { gc->wants_to_die = TRUE; purple_connection_error(gc, _("Error loading SILC key pair")); + gc->proto_data = NULL; + silc_free(sg); return; } +#if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1) /* Schedule SILC using Glib's event loop */ - scheduler = purple_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client); - gc->proto_data = SILC_32_TO_PTR(scheduler); + sg->scheduler = purple_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client); +#else + /* Run SILC scheduler */ + sg->tasks = silc_dlist_init(); + silc_schedule_set_notify(client->schedule, silcpurple_scheduler, + client); + silc_client_run_one(client); +#endif /* __SILC_TOOLKIT_VERSION */ } static int silcpurple_close_final(gpointer *context) { SilcPurple sg = (SilcPurple)context; + silc_client_stop(sg->client, NULL, NULL); silc_client_free(sg->client); + if (sg->sha1hash) + silc_hash_free(sg->sha1hash); if (sg->mimeass) silc_mime_assembler_free(sg->mimeass); silc_free(sg); @@ -467,16 +581,33 @@ silcpurple_close(PurpleConnection *gc) { SilcPurple sg = gc->proto_data; +#if __SILC_TOOLKIT_VERSION >= SILC_VERSION(1,1,1) + SilcPurpleTask task; +#endif /* __SILC_TOOLKIT_VERSION */ g_return_if_fail(sg != NULL); /* Send QUIT */ silc_client_command_call(sg->client, sg->conn, NULL, - "QUIT", "Download Pidgin: " PURPLE_WEBSITE, NULL); + "QUIT", "Download Pidgin: " PURPLE_WEBSITE, + NULL); if (sg->conn) silc_client_close_connection(sg->client, sg->conn); +#if __SILC_TOOLKIT_VERSION >= SILC_VERSION(1,1,1) + if (sg->conn) + silc_client_run_one(sg->client); + silc_schedule_set_notify(sg->client->schedule, NULL, NULL); + + silc_dlist_start(sg->tasks); + while ((task = silc_dlist_get(sg->tasks))) { + purple_input_remove(task->tag); + silc_free(task); + } + silc_dlist_uninit(sg->tasks); +#endif /* __SILC_TOOLKIT_VERSION */ + purple_timeout_remove(sg->scheduler); purple_timeout_add(1, (GSourceFunc)silcpurple_close_final, sg); } @@ -1155,7 +1286,7 @@ silc_dlist_start(list); while ((buf = silc_dlist_get(list)) != SILC_LIST_END) silc_client_send_private_message(client, conn, - client_entry, im->flags, NULL, + client_entry, im->flags, sg->sha1hash, buf->data, silc_buffer_len(buf)); silc_mime_partial_free(list); @@ -1167,7 +1298,7 @@ /* Send the message */ silc_client_send_private_message(client, conn, client_entry, im->flags, - NULL, (unsigned char *)im->message, im->message_len); + sg->sha1hash, (unsigned char *)im->message, im->message_len); purple_conv_im_write(PURPLE_CONV_IM(convo), conn->local_entry->nickname, im->message, 0, time(NULL)); goto out; @@ -1259,7 +1390,7 @@ while ((buf = silc_dlist_get(list)) != SILC_LIST_END) ret = silc_client_send_private_message(client, conn, - client_entry, mflags, NULL, + client_entry, mflags, sg->sha1hash, buf->data, silc_buffer_len(buf)); silc_mime_partial_free(list); @@ -1271,7 +1402,7 @@ /* Send private message directly */ ret = silc_client_send_private_message(client, conn, client_entry, - mflags, NULL, + mflags, sg->sha1hash, (unsigned char *)msg, strlen(msg));
--- a/libpurple/protocols/silc/silcpurple.h Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/silcpurple.h Sat Nov 03 05:12:43 2007 +0000 @@ -35,6 +35,9 @@ #include "server.h" #include "util.h" +#undef SILC_VERSION +#define SILC_VERSION(a, b, c) (((a) << 24) + ((b) << 16) + ((c) << 8)) + /* Default public and private key file names */ #define SILCPURPLE_PUBLIC_KEY_NAME "public_key.pub" #define SILCPURPLE_PRIVATE_KEY_NAME "private_key.prv" @@ -68,7 +71,9 @@ SilcClientConnection conn; SilcPublicKey public_key; SilcPrivateKey private_key; + SilcHash sha1hash; + SilcDList tasks; guint scheduler; PurpleConnection *gc; PurpleAccount *account;
--- a/libpurple/protocols/silc/util.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/util.c Sat Nov 03 05:12:43 2007 +0000 @@ -347,8 +347,12 @@ key_len = silc_pkcs_public_key_get_len(public_key); pk = silc_pkcs_public_key_encode(public_key, &pk_len); + if (!pk) + return; fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); + if (!fingerprint || !babbleprint) + return; s = g_string_new(""); if (ident->realname)
--- a/libpurple/protocols/silc/wb.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc/wb.c Sat Nov 03 05:12:43 2007 +0000 @@ -254,10 +254,10 @@ static void silcpurple_wb_request(SilcClient client, const unsigned char *message, - SilcUInt32 message_len, SilcClientEntry sender, - SilcChannelEntry channel) + SilcUInt32 message_len, SilcClientEntry sender, + SilcChannelEntry channel) { - char tmp[128]; + char tmp[256]; SilcPurpleWbRequest req; PurpleConnection *gc; SilcPurple sg; @@ -274,20 +274,24 @@ else wb = silcpurple_wb_init_ch(sg, channel); - silcpurple_wb_parse(wb->proto_data, wb, (unsigned char *)message, - message_len); + silcpurple_wb_parse(wb->proto_data, wb, + (unsigned char *)message, + message_len); return; } + /* Close any previous unaccepted requests */ + purple_request_close_with_handle(sender); + if (!channel) { g_snprintf(tmp, sizeof(tmp), - _("%s sent message to whiteboard. Would you like " - "to open the whiteboard?"), sender->nickname); + _("%s sent message to whiteboard. Would you like " + "to open the whiteboard?"), sender->nickname); } else { g_snprintf(tmp, sizeof(tmp), - _("%s sent message to whiteboard on %s channel. " - "Would you like to open the whiteboard?"), - sender->nickname, channel->channel_name); + _("%s sent message to whiteboard on %s channel. " + "Would you like to open the whiteboard?"), + sender->nickname, channel->channel_name); } req = silc_calloc(1, sizeof(*req)); @@ -299,10 +303,10 @@ req->channel = channel; req->sg = sg; - purple_request_action(gc, _("Whiteboard"), tmp, NULL, 1, - sg->account, sender->nickname, NULL, req, 2, - _("Yes"), G_CALLBACK(silcpurple_wb_request_cb), - _("No"), G_CALLBACK(silcpurple_wb_request_cb)); + purple_request_action(sender, _("Whiteboard"), tmp, NULL, 1, + sg->account, sender->nickname, NULL, req, 2, + _("Yes"), G_CALLBACK(silcpurple_wb_request_cb), + _("No"), G_CALLBACK(silcpurple_wb_request_cb)); } /* Process incoming whiteboard message */
--- a/libpurple/protocols/silc10/buddy.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc10/buddy.c Sat Nov 03 05:12:43 2007 +0000 @@ -939,8 +939,11 @@ /* Create dir if it doesn't exist */ if ((g_stat(filename, &st)) == -1) { if (errno == ENOENT) { - if (pw->pw_uid == geteuid()) - g_mkdir(filename, 0755); + if (pw->pw_uid == geteuid()) { + int ret = g_mkdir(filename, 0755); + if (ret < 0) + return; + } } }
--- a/libpurple/protocols/silc10/wb.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/silc10/wb.c Sat Nov 03 05:12:43 2007 +0000 @@ -279,6 +279,9 @@ return; } + /* Close any previous unaccepted requests */ + purple_request_close_with_handle(sender); + if (!channel) { g_snprintf(tmp, sizeof(tmp), _("%s sent message to whiteboard. Would you like " @@ -299,7 +302,7 @@ req->channel = channel; req->sg = sg; - purple_request_action(gc, _("Whiteboard"), tmp, NULL, 1, + purple_request_action(sender, _("Whiteboard"), tmp, NULL, 1, sg->account, sender->nickname, NULL, req, 2, _("Yes"), G_CALLBACK(silcpurple_wb_request_cb), _("No"), G_CALLBACK(silcpurple_wb_request_cb));
--- a/libpurple/protocols/simple/simple.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/simple/simple.c Sat Nov 03 05:12:43 2007 +0000 @@ -321,7 +321,7 @@ return retval; } -static void fill_auth(struct simple_account_data *sip, gchar *hdr, struct sip_auth *auth) { +static void fill_auth(struct simple_account_data *sip, const gchar *hdr, struct sip_auth *auth) { int i = 0; const char *authuser; char *tmp; @@ -592,7 +592,7 @@ static struct transaction *transactions_find(struct simple_account_data *sip, struct sipmsg *msg) { struct transaction *trans; GSList *transactions = sip->transactions; - gchar *cseq = sipmsg_find_header(msg, "CSeq"); + const gchar *cseq = sipmsg_find_header(msg, "CSeq"); if (cseq) { while(transactions) { @@ -800,7 +800,7 @@ } static gboolean simple_add_lcs_contacts(struct simple_account_data *sip, struct sipmsg *msg, struct transaction *tc) { - gchar *tmp; + const gchar *tmp; xmlnode *item, *group, *isc; const char *name_group; PurpleBuddy *b; @@ -960,7 +960,7 @@ static void process_incoming_message(struct simple_account_data *sip, struct sipmsg *msg) { gchar *from; - gchar *contenttype; + const gchar *contenttype; gboolean found = FALSE; from = parse_from(sipmsg_find_header(msg, "From")); @@ -1015,7 +1015,7 @@ gboolean process_register_response(struct simple_account_data *sip, struct sipmsg *msg, struct transaction *tc) { - gchar *tmp; + const gchar *tmp; purple_debug(PURPLE_DEBUG_MISC, "simple", "in process register response response: %d\n", msg->response); switch (msg->response) { case 200: @@ -1072,7 +1072,7 @@ static void process_incoming_notify(struct simple_account_data *sip, struct sipmsg *msg) { gchar *from; - gchar *fromhdr; + const gchar *fromhdr; gchar *basicstatus_data; xmlnode *pidf; xmlnode *basicstatus = NULL, *tuple, *status; @@ -1255,8 +1255,8 @@ gchar *theirtag = find_tag(from_hdr); gchar *ourtag = find_tag(sipmsg_find_header(msg, "To")); gboolean tagadded = FALSE; - gchar *callid = sipmsg_find_header(msg, "Call-ID"); - gchar *expire = sipmsg_find_header(msg, "Expire"); + const gchar *callid = sipmsg_find_header(msg, "Call-ID"); + const gchar *expire = sipmsg_find_header(msg, "Expire"); gchar *tmp; struct simple_watcher *watcher = watcher_find(sip, from); if(!ourtag) { @@ -1264,14 +1264,14 @@ ourtag = gentag(); } if(!watcher) { /* new subscription */ - gchar *acceptheader = sipmsg_find_header(msg, "Accept"); + const gchar *acceptheader = sipmsg_find_header(msg, "Accept"); gboolean needsxpidf = FALSE; if(!purple_privacy_check(sip->account, from)) { send_sip_response(sip->gc, msg, 202, "Ok", NULL); goto privend; } if(acceptheader) { - gchar *tmp = acceptheader; + const gchar *tmp = acceptheader; gboolean foundpidf = FALSE; gboolean foundxpidf = FALSE; while(tmp && tmp < acceptheader + strlen(acceptheader)) { @@ -1289,7 +1289,6 @@ tmp = 0; } if(!foundpidf && foundxpidf) needsxpidf = TRUE; - g_free(acceptheader); } watcher = watcher_create(sip, from, callid, ourtag, theirtag, needsxpidf); } @@ -1314,8 +1313,6 @@ g_free(from); g_free(theirtag); g_free(ourtag); - g_free(callid); - g_free(expire); } static void process_input_message(struct simple_account_data *sip, struct sipmsg *msg) { @@ -1337,7 +1334,8 @@ struct transaction *trans = transactions_find(sip, msg); if(trans) { if(msg->response == 407) { - gchar *resend, *auth, *ptmp; + gchar *resend, *auth; + const gchar *ptmp; if(sip->proxy.retries > 3) return; sip->proxy.retries++; @@ -1381,7 +1379,8 @@ /* This is encountered when a generic (MESSAGE, NOTIFY, etc) * was denied until further authorization is provided. */ - gchar *resend, *auth, *ptmp; + gchar *resend, *auth; + const gchar *ptmp; if(sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) return; sip->registrar.retries++; @@ -1889,7 +1888,7 @@ "prpl-simple", /**< id */ "SIMPLE", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("SIP/SIMPLE Protocol Plugin"), /** summary */ N_("The SIP/SIMPLE Protocol Plugin"), /** description */ "Thomas Butter <butter@uni-mannheim.de>", /**< author */
--- a/libpurple/protocols/simple/simple.h Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/simple/simple.h Sat Nov 03 05:12:43 2007 +0000 @@ -127,7 +127,7 @@ int retries; int transport; /* 0 = tcp, 1 = udp */ int fd; - gchar *cseq; + const gchar *cseq; struct sipmsg *msg; TransCallback callback; };
--- a/libpurple/protocols/simple/sipmsg.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/simple/sipmsg.c Sat Nov 03 05:12:43 2007 +0000 @@ -58,6 +58,7 @@ gchar *dummy; gchar *dummy2; gchar *tmp; + const gchar *tmp2; int i=1; if(!lines[0]) return NULL; parts = g_strsplit(lines[0], " ", 3); @@ -100,14 +101,16 @@ g_strfreev(parts); } g_strfreev(lines); - msg->bodylen = strtol(sipmsg_find_header(msg, "Content-Length"),NULL,10); + tmp2 = sipmsg_find_header(msg, "Content-Length"); + if (tmp2 != NULL) + msg->bodylen = strtol(tmp2, NULL, 10); if(msg->response) { - tmp = sipmsg_find_header(msg, "CSeq"); - if(!tmp) { + tmp2 = sipmsg_find_header(msg, "CSeq"); + if(!tmp2) { /* SHOULD NOT HAPPEN */ msg->method = 0; } else { - parts = g_strsplit(tmp, " ", 2); + parts = g_strsplit(tmp2, " ", 2); msg->method = g_strdup(parts[1]); g_strfreev(parts); } @@ -192,7 +195,7 @@ return; } -gchar *sipmsg_find_header(struct sipmsg *msg, const gchar *name) { +const gchar *sipmsg_find_header(struct sipmsg *msg, const gchar *name) { GSList *tmp; struct siphdrelement *elem; tmp = msg->headers;
--- a/libpurple/protocols/simple/sipmsg.h Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/simple/sipmsg.h Sat Nov 03 05:12:43 2007 +0000 @@ -43,7 +43,7 @@ struct sipmsg *sipmsg_parse_header(const gchar *header); void sipmsg_add_header(struct sipmsg *msg, const gchar *name, const gchar *value); void sipmsg_free(struct sipmsg *msg); -gchar *sipmsg_find_header(struct sipmsg *msg, const gchar *name); +const gchar *sipmsg_find_header(struct sipmsg *msg, const gchar *name); void sipmsg_remove_header(struct sipmsg *msg, const gchar *name); void sipmsg_print(const struct sipmsg *msg); char *sipmsg_to_string(const struct sipmsg *msg);
--- a/libpurple/protocols/toc/toc.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/toc/toc.c Sat Nov 03 05:12:43 2007 +0000 @@ -2301,7 +2301,7 @@ "prpl-toc", /**< id */ "TOC", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("TOC Protocol Plugin"), /** description */
--- a/libpurple/protocols/yahoo/yahoo.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sat Nov 03 05:12:43 2007 +0000 @@ -4355,7 +4355,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ "prpl-yahoo", /**< id */ "Yahoo", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Yahoo Protocol Plugin"), /** description */
--- a/libpurple/protocols/yahoo/yahoo_aliases.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_aliases.c Sat Nov 03 05:12:43 2007 +0000 @@ -1,271 +1,277 @@ -/* - * purple - * - * Purple is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - * - */ - - -#include "internal.h" - -#include "account.h" -#include "accountopt.h" -#include "blist.h" -#include "debug.h" -#include "util.h" -#include "version.h" -#include "yahoo.h" -#include "yahoo_aliases.h" -#include "yahoo_packet.h" - -/* I hate hardcoding this stuff, but Yahoo never sends us anything to use. Someone in the know may be able to tweak this URL */ -#define YAHOO_ALIAS_FETCH_URL "http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=0&tags=short&rt=0&prog-ver=8.1.0.249&useutf8=1&legenc=codepage-1252" -#define YAHOO_ALIAS_UPDATE_URL "http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1&useutf8=1&legenc=codepage-1252" - -void yahoo_update_alias(PurpleConnection *gc, const char *who, const char *alias); - -/** - * Stuff we want passed to the callback function - */ -struct callback_data { - PurpleConnection *gc; - char *id; -}; - - -/************************************************************************** - * Alias Fetch Functions - **************************************************************************/ - -static void -yahoo_fetch_aliases_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data,const gchar *url_text, size_t len, const gchar *error_message) -{ - struct callback_data *cb = user_data; - PurpleConnection *gc = cb->gc; - struct yahoo_data *yd = gc->proto_data; - - yd->url_datas = g_slist_remove(yd->url_datas, url_data); - - if (len == 0) { - purple_debug_info("yahoo","No Aliases to process\n"); - } else { - const char *yid, *full_name, *nick_name, *alias, *id, *fn, *ln, *nn; - PurpleBuddy *b = NULL; - xmlnode *item, *contacts; - - /* Put our web response into a xmlnode for easy management */ - contacts = xmlnode_from_str(url_text, -1); - - if (contacts == NULL) { - purple_debug_error("yahoo_aliases","Badly formed XML\n"); - return; - } - purple_debug_info("yahoo", "Fetched %i bytes of alias data\n", len); - - /* Loop around and around and around until we have gone through all the received aliases */ - for(item = xmlnode_get_child(contacts, "ct"); item; item = xmlnode_get_next_twin(item)) { - /* Yahoo replies with two types of contact (ct) record, we are only interested in the alias ones */ - if ((yid = xmlnode_get_attrib(item, "yi"))) { - /* Grab all the bits of information we can */ - fn = xmlnode_get_attrib(item,"fn"); - ln = xmlnode_get_attrib(item,"ln"); - nn = xmlnode_get_attrib(item,"nn"); - id = xmlnode_get_attrib(item,"id"); - - /* Yahoo stores first and last names separately, lets put them together into a full name */ - full_name = g_strstrip(g_strdup_printf("%s %s", (fn != NULL ? fn : "") , (ln != NULL ? ln : ""))); - nick_name = (nn != NULL ? g_strstrip(g_strdup_printf("%s", nn)) : NULL); - - if (nick_name != NULL) - alias = nick_name; /* If we have a nickname from Yahoo, let's use it */ - else if (strlen(full_name) != 0) - alias = full_name; /* If no Yahoo nickname, we can use the full_name created above */ - else - alias = NULL; /* No nickname, first name or last name, then you get no alias !! */ - - /* Find the local buddy that matches */ - b = purple_find_buddy(cb->gc->account, yid); - - /* If we don't find a matching buddy, ignore the alias !! */ - if (b != NULL) { - /* Create an object that we can attach to the buddies proto_data pointer */ - struct YahooUser *yu; - yu = g_new0(struct YahooUser, 1); - yu->id = g_strdup(id); - yu->firstname = g_strdup(fn); - yu->lastname = g_strdup(ln); - yu->nickname = g_strdup(nn); - b->proto_data=yu; - - /* Finally, if we received an alias, we better update the buddy list */ - if (alias != NULL) { - serv_got_alias(cb->gc, yid, alias); - purple_debug_info("yahoo","Fetched alias '%s' (%s)\n",alias,id); - } else if (b->alias != alias && strcmp(b->alias, "") != 0) { - /* Or if we have an alias that Yahoo doesn't, send it up */ - yahoo_update_alias(cb->gc, yid, b->alias); - purple_debug_info("yahoo","Sent alias '%s'\n", b->alias); - } - } else { - purple_debug_info("yahoo", "Bizarre, received alias for %s, but they are not on your list...\n", yid); - } - } - } - xmlnode_free(contacts); - } - g_free(cb->id); - g_free(cb); -} - -void -yahoo_fetch_aliases(PurpleConnection *gc) -{ - struct yahoo_data *yd = gc->proto_data; - struct callback_data *cb; - char *url, *request, *webpage, *webaddress, *strtmp; - int inttmp; - PurpleUtilFetchUrlData *url_data; - - /* Using callback_data so I have access to gc in the callback function */ - cb = g_new0(struct callback_data, 1); - cb->gc = gc; - - /* Build all the info to make the web request */ - url = g_strdup(YAHOO_ALIAS_FETCH_URL); - purple_url_parse(url, &webaddress, &inttmp, &webpage, &strtmp, &strtmp); - request = g_strdup_printf("GET /%s HTTP/1.1\r\n" - "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" - "Cookie: T=%s; Y=%s\r\n" - "Host: %s\r\n" - "Cache-Control: no-cache\r\n\r\n", - webpage, yd->cookie_t,yd->cookie_y, webaddress); - - /* We have a URL and some header information, let's connect and get some aliases */ - url_data = purple_util_fetch_url_request(url, FALSE, NULL, TRUE, request, FALSE, yahoo_fetch_aliases_cb, cb); - if (url_data != NULL) { - yd->url_datas = g_slist_prepend(yd->url_datas, url_data); - } else { - g_free(cb); - } - - g_free(url); - g_free(request); -} - -/************************************************************************** - * Alias Update Functions - **************************************************************************/ - -static void -yahoo_update_alias_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data,const gchar *url_text, size_t len, const gchar *error_message) -{ - xmlnode *node, *result; - struct callback_data *cb = user_data; - PurpleConnection *gc = cb->gc; - struct yahoo_data *yd; - - yd = gc->proto_data; - yd->url_datas = g_slist_remove(yd->url_datas, url_data); - - result = xmlnode_from_str(url_text, -1); - - purple_debug_info("yahoo", "ID: %s, Return data: %s\n",cb->id, url_text); - - if (result == NULL) { - purple_debug_error("yahoo","Alias update faild: Badly formed response\n"); - return; - } - - if ((node = xmlnode_get_child(result, "ct"))) { - if (g_ascii_strncasecmp(xmlnode_get_attrib(node, "id"), cb->id, strlen(cb->id))==0) - purple_debug_info("yahoo", "Alias update succeeded\n"); - else - purple_debug_error("yahoo", "Alias update failed (Contact record return mismatch)\n"); - } else { - purple_debug_info("yahoo", "Alias update failed (No contact record returned)\n"); - } - - g_free(cb->id); - g_free(cb); - xmlnode_free(result); -} - -void -yahoo_update_alias(PurpleConnection *gc, const char *who, const char *alias) -{ - struct yahoo_data *yd; - struct YahooUser *yu; - char *content, *url, *request, *webpage, *webaddress, *strtmp; - int inttmp; - struct callback_data *cb; - PurpleBuddy *buddy; - PurpleUtilFetchUrlData *url_data; - - g_return_if_fail(alias!= NULL); - g_return_if_fail(who!=NULL); - g_return_if_fail(gc!=NULL); - - purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n",alias, who); - - buddy = purple_find_buddy(gc->account, who); - if (buddy == NULL || buddy->proto_data == NULL) { - purple_debug_info("yahoo", "Missing proto_data (get_yahoo_aliases must have failed), bailing out\n"); - return; - } - - yd = gc->proto_data; - yu = buddy->proto_data; - - /* Using callback_data so I have access to gc in the callback function */ - cb = g_new0(struct callback_data, 1); - cb->id = g_strdup(yu->id); - cb->gc = gc; - - /* Build all the info to make the web request */ - url = g_strdup(YAHOO_ALIAS_UPDATE_URL); - purple_url_parse(url, &webaddress, &inttmp, &webpage, &strtmp, &strtmp); - - content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n" - "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n", - gc->account->username, who, yu->id, g_markup_escape_text(alias, strlen(alias))); - - request = g_strdup_printf("POST /%s HTTP/1.1\r\n" - "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" - "Cookie: T=%s; Y=%s\r\n" - "Host: %s\r\n" - "Content-Length: %" G_GSIZE_FORMAT "\r\n" - "Cache-Control: no-cache\r\n\r\n" - "%s", - webpage, yd->cookie_t,yd->cookie_y, webaddress, - strlen(content), content); - - /* We have a URL and some header information, let's connect and update the alias */ - url_data = purple_util_fetch_url_request(url, FALSE, NULL, TRUE, request, FALSE, yahoo_update_alias_cb, cb); - if (url_data != NULL) { - yd->url_datas = g_slist_prepend(yd->url_datas, url_data); - } else { - g_free(cb->id); - g_free(cb); - } - - g_free(content); - g_free(url); - g_free(request); -} - +/* + * purple + * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + */ + + +#include "internal.h" + +#include "account.h" +#include "accountopt.h" +#include "blist.h" +#include "debug.h" +#include "util.h" +#include "version.h" +#include "yahoo.h" +#include "yahoo_aliases.h" +#include "yahoo_packet.h" + +/* I hate hardcoding this stuff, but Yahoo never sends us anything to use. Someone in the know may be able to tweak this URL */ +#define YAHOO_ALIAS_FETCH_URL "http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=0&tags=short&rt=0&prog-ver=8.1.0.249&useutf8=1&legenc=codepage-1252" +#define YAHOO_ALIAS_UPDATE_URL "http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1&useutf8=1&legenc=codepage-1252" + +void yahoo_update_alias(PurpleConnection *gc, const char *who, const char *alias); + +/** + * Stuff we want passed to the callback function + */ +struct callback_data { + PurpleConnection *gc; + char *id; +}; + + +/************************************************************************** + * Alias Fetch Functions + **************************************************************************/ + +static void +yahoo_fetch_aliases_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data,const gchar *url_text, size_t len, const gchar *error_message) +{ + struct callback_data *cb = user_data; + PurpleConnection *gc = cb->gc; + struct yahoo_data *yd = gc->proto_data; + + yd->url_datas = g_slist_remove(yd->url_datas, url_data); + + if (len == 0) { + purple_debug_info("yahoo", "No Aliases to process.%s%s\n", + error_message ? " Error:" : "", error_message ? error_message : ""); + } else { + const char *yid, *full_name, *nick_name, *alias, *id, *fn, *ln, *nn; + PurpleBuddy *b = NULL; + xmlnode *item, *contacts; + + /* Put our web response into a xmlnode for easy management */ + contacts = xmlnode_from_str(url_text, -1); + + if (contacts == NULL) { + purple_debug_error("yahoo_aliases","Badly formed XML\n"); + return; + } + purple_debug_info("yahoo", "Fetched %i bytes of alias data\n", len); + + /* Loop around and around and around until we have gone through all the received aliases */ + for(item = xmlnode_get_child(contacts, "ct"); item; item = xmlnode_get_next_twin(item)) { + /* Yahoo replies with two types of contact (ct) record, we are only interested in the alias ones */ + if ((yid = xmlnode_get_attrib(item, "yi"))) { + /* Grab all the bits of information we can */ + fn = xmlnode_get_attrib(item,"fn"); + ln = xmlnode_get_attrib(item,"ln"); + nn = xmlnode_get_attrib(item,"nn"); + id = xmlnode_get_attrib(item,"id"); + + /* Yahoo stores first and last names separately, lets put them together into a full name */ + full_name = g_strstrip(g_strdup_printf("%s %s", (fn != NULL ? fn : "") , (ln != NULL ? ln : ""))); + nick_name = (nn != NULL ? g_strstrip(g_strdup_printf("%s", nn)) : NULL); + + if (nick_name != NULL) + alias = nick_name; /* If we have a nickname from Yahoo, let's use it */ + else if (strlen(full_name) != 0) + alias = full_name; /* If no Yahoo nickname, we can use the full_name created above */ + else + alias = NULL; /* No nickname, first name or last name, then you get no alias !! */ + + /* Find the local buddy that matches */ + b = purple_find_buddy(cb->gc->account, yid); + + /* If we don't find a matching buddy, ignore the alias !! */ + if (b != NULL) { + /* Create an object that we can attach to the buddies proto_data pointer */ + struct YahooUser *yu; + yu = g_new0(struct YahooUser, 1); + yu->id = g_strdup(id); + yu->firstname = g_strdup(fn); + yu->lastname = g_strdup(ln); + yu->nickname = g_strdup(nn); + b->proto_data=yu; + + /* Finally, if we received an alias, we better update the buddy list */ + if (alias != NULL) { + serv_got_alias(cb->gc, yid, alias); + purple_debug_info("yahoo","Fetched alias '%s' (%s)\n",alias,id); + } else if (b->alias != alias && strcmp(b->alias, "") != 0) { + /* Or if we have an alias that Yahoo doesn't, send it up */ + yahoo_update_alias(cb->gc, yid, b->alias); + purple_debug_info("yahoo","Sent alias '%s'\n", b->alias); + } + } else { + purple_debug_info("yahoo", "Bizarre, received alias for %s, but they are not on your list...\n", yid); + } + } + } + xmlnode_free(contacts); + } + g_free(cb->id); + g_free(cb); +} + +void +yahoo_fetch_aliases(PurpleConnection *gc) +{ + struct yahoo_data *yd = gc->proto_data; + struct callback_data *cb; + const char *url = YAHOO_ALIAS_FETCH_URL; + char *request, *webpage, *webaddress; + PurpleUtilFetchUrlData *url_data; + + /* Using callback_data so I have access to gc in the callback function */ + cb = g_new0(struct callback_data, 1); + cb->gc = gc; + + /* Build all the info to make the web request */ + purple_url_parse(url, &webaddress, NULL, &webpage, NULL, NULL); + request = g_strdup_printf("GET /%s HTTP/1.1\r\n" + "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" + "Cookie: T=%s; Y=%s\r\n" + "Host: %s\r\n" + "Cache-Control: no-cache\r\n\r\n", + webpage, yd->cookie_t,yd->cookie_y, webaddress); + + /* We have a URL and some header information, let's connect and get some aliases */ + url_data = purple_util_fetch_url_request(url, FALSE, NULL, TRUE, request, FALSE, yahoo_fetch_aliases_cb, cb); + if (url_data != NULL) { + yd->url_datas = g_slist_prepend(yd->url_datas, url_data); + } + + g_free(webaddress); + g_free(webpage); + g_free(request); +} + +/************************************************************************** + * Alias Update Functions + **************************************************************************/ + +static void +yahoo_update_alias_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data,const gchar *url_text, size_t len, const gchar *error_message) +{ + xmlnode *node, *result; + struct callback_data *cb = user_data; + PurpleConnection *gc = cb->gc; + struct yahoo_data *yd; + + yd = gc->proto_data; + yd->url_datas = g_slist_remove(yd->url_datas, url_data); + + if (len == 0 || error_message != NULL) { + purple_debug_info("yahoo", "Error updating alias: %s\n", + error_message ? error_message : ""); + g_free(cb->id); + g_free(cb); + return; + } + + result = xmlnode_from_str(url_text, -1); + + purple_debug_info("yahoo", "ID: %s, Return data: %s\n",cb->id, url_text); + + if (result == NULL) { + purple_debug_error("yahoo","Alias update failed: Badly formed response\n"); + g_free(cb->id); + g_free(cb); + return; + } + + if ((node = xmlnode_get_child(result, "ct"))) { + if (g_ascii_strncasecmp(xmlnode_get_attrib(node, "id"), cb->id, strlen(cb->id))==0) + purple_debug_info("yahoo", "Alias update succeeded\n"); + else + purple_debug_error("yahoo", "Alias update failed (Contact record return mismatch)\n"); + } else { + purple_debug_info("yahoo", "Alias update failed (No contact record returned)\n"); + } + + g_free(cb->id); + g_free(cb); + xmlnode_free(result); +} + +void +yahoo_update_alias(PurpleConnection *gc, const char *who, const char *alias) +{ + struct yahoo_data *yd; + struct YahooUser *yu; + char *content, *url, *request, *webpage, *webaddress, *strtmp; + int inttmp; + struct callback_data *cb; + PurpleBuddy *buddy; + PurpleUtilFetchUrlData *url_data; + + g_return_if_fail(alias!= NULL); + g_return_if_fail(who!=NULL); + g_return_if_fail(gc!=NULL); + + purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n",alias, who); + + buddy = purple_find_buddy(gc->account, who); + if (buddy == NULL || buddy->proto_data == NULL) { + purple_debug_info("yahoo", "Missing proto_data (get_yahoo_aliases must have failed), bailing out\n"); + return; + } + + yd = gc->proto_data; + yu = buddy->proto_data; + + /* Using callback_data so I have access to gc in the callback function */ + cb = g_new0(struct callback_data, 1); + cb->id = g_strdup(yu->id); + cb->gc = gc; + + /* Build all the info to make the web request */ + url = g_strdup(YAHOO_ALIAS_UPDATE_URL); + purple_url_parse(url, &webaddress, &inttmp, &webpage, &strtmp, &strtmp); + + content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n" + "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n", + gc->account->username, who, yu->id, g_markup_escape_text(alias, strlen(alias))); + + request = g_strdup_printf("POST /%s HTTP/1.1\r\n" + "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" + "Cookie: T=%s; Y=%s\r\n" + "Host: %s\r\n" + "Content-Length: %" G_GSIZE_FORMAT "\r\n" + "Cache-Control: no-cache\r\n\r\n" + "%s", + webpage, yd->cookie_t,yd->cookie_y, webaddress, + strlen(content), content); + + /* We have a URL and some header information, let's connect and update the alias */ + url_data = purple_util_fetch_url_request(url, FALSE, NULL, TRUE, request, FALSE, yahoo_update_alias_cb, cb); + if (url_data != NULL) { + yd->url_datas = g_slist_prepend(yd->url_datas, url_data); + } + + g_free(content); + g_free(url); + g_free(request); +} +
--- a/libpurple/protocols/yahoo/yahoo_packet.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_packet.c Sat Nov 03 05:12:43 2007 +0000 @@ -174,8 +174,7 @@ } if (accept) { - /* TODO: strstr() should not be used here because data isn't NULL terminated */ - delimiter = (const guchar *)strstr((char *)&data[pos], "\xc0\x80"); + delimiter = (const guchar *)g_strstr_len((const char *)&data[pos], len - pos, "\xc0\x80"); if (delimiter == NULL) { /* Malformed packet! (It doesn't end in 0xc0 0x80) */
--- a/libpurple/protocols/zephyr/zephyr.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Sat Nov 03 05:12:43 2007 +0000 @@ -2941,7 +2941,7 @@ "prpl-zephyr", /**< id */ "Zephyr", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Zephyr Protocol Plugin"), /** description */
--- a/libpurple/proxy.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/proxy.c Sat Nov 03 05:12:43 2007 +0000 @@ -70,7 +70,7 @@ gsize read_len; }; -static const char *socks5errors[] = { +static const char * const socks5errors[] = { "succeeded\n", "general SOCKS server failure\n", "connection not allowed by ruleset\n",
--- a/libpurple/prpl.h Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/prpl.h Sat Nov 03 05:12:43 2007 +0000 @@ -339,6 +339,15 @@ void (*remove_group)(PurpleConnection *gc, PurpleGroup *group); + /** Gets the real name of a participant in a chat. For example, on + * XMPP this turns a chat room nick <tt>foo</tt> into + * <tt>room@server/foo</tt> + * @param gc the connection on which the room is. + * @param id the ID of the chat room. + * @param who the nickname of the chat participant. + * @return the real name of the participant. This string must be + * freed by the caller. + */ char *(*get_cb_real_name)(PurpleConnection *gc, int id, const char *who); void (*set_chat_topic)(PurpleConnection *gc, int id, const char *topic); @@ -354,6 +363,11 @@ gboolean (*can_receive_file)(PurpleConnection *, const char *who); void (*send_file)(PurpleConnection *, const char *who, const char *filename); PurpleXfer *(*new_xfer)(PurpleConnection *, const char *who); + + /** Checks whether offline messages to @a buddy are supported. + * @return @c TRUE if @a buddy can be sent messages while they are + * offline, or @c FALSE if not. + */ gboolean (*offline_message)(const PurpleBuddy *buddy); PurpleWhiteboardPrplOps *whiteboard_prpl_ops;
--- a/libpurple/util.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/util.c Sat Nov 03 05:12:43 2007 +0000 @@ -1642,7 +1642,7 @@ pt->src_tag = "font"; pt->dest_tag = "span"; tags = g_list_prepend(tags, pt); - if(style->len) + if(style->len && xhtml) g_string_append_printf(xhtml, "<span style='%s'>", g_strstrip(style->str)); else pt->ignore = TRUE; @@ -3067,9 +3067,6 @@ ret[j++] = text[i]; } - purple_debug_misc("purple_str_add_cr", "got: %s, leaving with %s\n", - text, ret); - return ret; } @@ -3199,7 +3196,7 @@ char * purple_str_size_to_units(size_t size) { - static const char *size_str[4] = { "bytes", "KiB", "MiB", "GiB" }; + static const char * const size_str[] = { "bytes", "KiB", "MiB", "GiB" }; float size_mag; int size_index = 0; @@ -3392,11 +3389,11 @@ char host[256], path[256], user[256], passwd[256]; int port = 0; /* hyphen at end includes it in control set */ - static char addr_ctrl[] = "A-Za-z0-9.-"; - static char port_ctrl[] = "0-9"; - static char page_ctrl[] = "A-Za-z0-9.~_/:*!@&%%?=+^-"; - static char user_ctrl[] = "A-Za-z0-9.~_/*!&%%?=+^-"; - static char passwd_ctrl[] = "A-Za-z0-9.~_/*!&%%?=+^-"; + static const char addr_ctrl[] = "A-Za-z0-9.-"; + static const char port_ctrl[] = "0-9"; + static const char page_ctrl[] = "A-Za-z0-9.~_/:*!@&%%?=+^-"; + static const char user_ctrl[] = "A-Za-z0-9.~_/*!&%%?=+^-"; + static const char passwd_ctrl[] = "A-Za-z0-9.~_/*!&%%?=+^-"; g_return_val_if_fail(url != NULL, FALSE);
--- a/libpurple/win32/global.mak Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/win32/global.mak Sat Nov 03 05:12:43 2007 +0000 @@ -71,8 +71,7 @@ ) PURPLE_VERSION := $(PIDGIN_VERSION) -DEFINES += -DVERSION=\"$(PIDGIN_VERSION)\" \ - -DHAVE_CONFIG_H +DEFINES += -DHAVE_CONFIG_H # Use -g flag when building debug version of Pidgin (including plugins). # Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
--- a/libpurple/win32/targets.mak Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/win32/targets.mak Sat Nov 03 05:12:43 2007 +0000 @@ -5,15 +5,15 @@ # files for better handling of cross directory dependencies # -$(PIDGIN_CONFIG_H): $(PIDGIN_TREE_TOP)/config.h.mingw - cp $(PIDGIN_TREE_TOP)/config.h.mingw $(PIDGIN_CONFIG_H) +$(PIDGIN_CONFIG_H): $(PIDGIN_CONFIG_H).mingw $(PIDGIN_TREE_TOP)/configure.ac + sed -e 's/@VERSION@/$(PIDGIN_VERSION)/' $@.mingw > $@ $(PURPLE_VERSION_H): $(PURPLE_VERSION_H).in $(PIDGIN_TREE_TOP)/configure.ac - cp $(PURPLE_VERSION_H).in $(PURPLE_VERSION_H) + cp $@.in $@ awk 'BEGIN {FS="[\\(\\)\\[\\]]"} \ - /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \ - /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \ - /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $(PURPLE_VERSION_H)"); exit}' $(PIDGIN_TREE_TOP)/configure.ac + /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $@");} \ + /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@");} \ + /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac $(PURPLE_DLL) $(PURPLE_DLL).a: $(PURPLE_VERSION_H) $(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) libpurple.dll @@ -30,9 +30,6 @@ $(PIDGIN_EXE): $(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) pidgin.exe -$(PIDGIN_PORTABLE_EXE): - $(MAKE) -C $(PIDGIN_TOP) -f $(MINGW_MAKEFILE) pidgin-portable.exe - # Installation Directories $(PIDGIN_INSTALL_DIR): mkdir -p $(PIDGIN_INSTALL_DIR)
--- a/libpurple/win32/win32dep.c Tue Oct 30 06:45:24 2007 +0000 +++ b/libpurple/win32/win32dep.c Sat Nov 03 05:12:43 2007 +0000 @@ -525,7 +525,7 @@ char *newenv; purple_debug_info("wpurple", "wpurple_init start\n"); - purple_debug_info("wpurple", "libpurple version: " VERSION "\n"); + purple_debug_info("wpurple", "libpurple version: " DISPLAY_VERSION "\n"); purple_debug_info("wpurple", "Glib:%u.%u.%u\n",
--- a/pidgin/gtkaccount.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkaccount.c Sat Nov 03 05:12:43 2007 +0000 @@ -212,6 +212,9 @@ purple_imgstore_get_size(dialog->icon_img), NULL); gdk_pixbuf_loader_close(loader, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); + if (pixbuf) + g_object_ref(pixbuf); + g_object_unref(loader); } if (pixbuf && dialog->prpl_info && @@ -1129,6 +1132,7 @@ g_list_free(dialog->user_split_entries); g_list_free(dialog->protocol_opt_entries); g_free(dialog->protocol_id); + g_object_unref(dialog->sg); purple_imgstore_unref(dialog->icon_img); @@ -2055,8 +2059,9 @@ if (buddyicon_pixbuf != NULL) { buddyicon = gdk_pixbuf_scale_simple(buddyicon_pixbuf, 22, 22, GDK_INTERP_HYPER); - g_object_unref(G_OBJECT(buddyicon_pixbuf)); } + + g_object_unref(loader); } gtk_list_store_set(store, iter,
--- a/pidgin/gtkblist.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkblist.c Sat Nov 03 05:12:43 2007 +0000 @@ -111,7 +111,7 @@ static GtkWidget *accountmenu = NULL; static guint visibility_manager_count = 0; -static gboolean gtk_blist_obscured = FALSE; +static GdkVisibilityState gtk_blist_visibility = GDK_VISIBILITY_UNOBSCURED; static gboolean editing_blist = FALSE; static GList *pidgin_blist_sort_methods = NULL; @@ -174,11 +174,14 @@ ***************************************************/ static gboolean gtk_blist_visibility_cb(GtkWidget *w, GdkEventVisibility *event, gpointer data) { - if (event->state == GDK_VISIBILITY_FULLY_OBSCURED) - gtk_blist_obscured = TRUE; - else if (gtk_blist_obscured) { - gtk_blist_obscured = FALSE; - pidgin_blist_refresh_timer(purple_get_blist()); + GdkVisibilityState old_state = gtk_blist_visibility; + gtk_blist_visibility = event->state; + + if (gtk_blist_visibility == GDK_VISIBILITY_FULLY_OBSCURED && + old_state != GDK_VISIBILITY_FULLY_OBSCURED) { + + /* no longer fully obscured */ + pidgin_blist_refresh_timer(purple_get_blist()); } /* continue to handle event normally */ @@ -3765,7 +3768,8 @@ { PurpleBlistNode *gnode, *cnode; - if (gtk_blist_obscured || !GTK_WIDGET_VISIBLE(gtkblist->window)) + if (gtk_blist_visibility == GDK_VISIBILITY_FULLY_OBSCURED + || !GTK_WIDGET_VISIBLE(gtkblist->window)) return TRUE; for(gnode = list->root; gnode; gnode = gnode->next) { @@ -6328,7 +6332,8 @@ { if (gtkblist && gtkblist->window) { if (GTK_WIDGET_VISIBLE(gtkblist->window)) { - purple_blist_set_visible(PIDGIN_WINDOW_ICONIFIED(gtkblist->window) || gtk_blist_obscured); + purple_blist_set_visible(PIDGIN_WINDOW_ICONIFIED(gtkblist->window) || + gtk_blist_visibility != GDK_VISIBILITY_UNOBSCURED); } else { purple_blist_set_visible(TRUE); }
--- a/pidgin/gtkcertmgr.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkcertmgr.c Sat Nov 03 05:12:43 2007 +0000 @@ -525,7 +525,7 @@ return mgmt_widget; } -PidginCertificateManager tls_peers_mgmt = { +const PidginCertificateManager tls_peers_mgmt = { tls_peers_mgmt_build, /* Widget creation function */ N_("SSL Servers") };
--- a/pidgin/gtkconv.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkconv.c Sat Nov 03 05:12:43 2007 +0000 @@ -359,7 +359,7 @@ PurpleCmdStatus status; if (!g_ascii_strcasecmp(args[0], "version")) { - tmp = g_strdup_printf("me is using %s v%s.", "Pidgin", VERSION); + tmp = g_strdup_printf("me is using %s v%s.", "Pidgin", DISPLAY_VERSION); markup = g_markup_escape_text(tmp, -1); status = purple_cmd_do_command(conv, tmp, markup, error); @@ -5040,7 +5040,6 @@ gtkconv->send_history = g_list_append(NULL, NULL); /* Setup some initial variables. */ - gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); gtkconv->tooltips = gtk_tooltips_new(); gtkconv->unseen_state = PIDGIN_UNSEEN_NONE; gtkconv->unseen_count = 0; @@ -6577,13 +6576,13 @@ style = "color=\"#c4a000\""; } else if (gtkconv->unseen_state == PIDGIN_UNSEEN_NICK) { atk_object_set_description(accessibility_obj, _("Nick Said")); - style = "color=\"#cc0000\""; + style = "color=\"#204a87\""; } else if (gtkconv->unseen_state == PIDGIN_UNSEEN_TEXT) { atk_object_set_description(accessibility_obj, _("Unread Messages")); if (gtkconv->active_conv->type == PURPLE_CONV_TYPE_CHAT) - style = "color=\"#204a87\""; + style = "color=\"#cc0000\""; else - style = "color=\"#cc0000\""; + style = "color=\"#204a87\""; } else if (gtkconv->unseen_state == PIDGIN_UNSEEN_EVENT) { atk_object_set_description(accessibility_obj, _("New Event")); style = "color=\"#888a85\""; @@ -8828,6 +8827,9 @@ GtkPositionType pos; GtkWidget *testidea; GtkWidget *menubar; +#if GTK_CHECK_VERSION(2,6,0) + GdkModifierType state; +#endif win = g_malloc0(sizeof(PidginWindow)); @@ -8835,6 +8837,10 @@ /* Create the window. */ win->window = pidgin_create_window(NULL, 0, "conversation", TRUE); +#if GTK_CHECK_VERSION(2,6,0) + if (!gtk_get_current_event_state(&state)) + gtk_window_set_focus_on_map(GTK_WINDOW(win->window), FALSE); +#endif pidgin_conv_restore_position(win); if (available_list == NULL) { @@ -8907,7 +8913,8 @@ g_signal_connect(G_OBJECT(win->window), "show", G_CALLBACK(winpidgin_ensure_onscreen), win->window); - if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/win32/minimize_new_convs")) + if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/win32/minimize_new_convs") + && !gtk_get_current_event_state(&state)) gtk_window_iconify(GTK_WINDOW(win->window)); #endif
--- a/pidgin/gtkconv.h Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkconv.h Sat Nov 03 05:12:43 2007 +0000 @@ -143,7 +143,12 @@ GtkWidget *tab_label; GtkWidget *menu_icon; GtkWidget *menu_label; +#ifndef PIDGIN_DISABLE_DEPRECATED + /** @deprecated */ GtkSizeGroup *sg; +#else + gpointer depr1; +#endif GtkWidget *lower_hbox;
--- a/pidgin/gtkdebug.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkdebug.c Sat Nov 03 05:12:43 2007 +0000 @@ -68,7 +68,7 @@ GtkWidget *filterlevel; } DebugWindow; -static char debug_fg_colors[][8] = { +static const char debug_fg_colors[][8] = { "#000000", /**< All debug levels. */ "#666666", /**< Misc. */ "#000000", /**< Information. */
--- a/pidgin/gtkdialogs.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkdialogs.c Sat Nov 03 05:12:43 2007 +0000 @@ -68,9 +68,10 @@ }; /* Order: Lead Developer, then Alphabetical by Last Name */ -static struct developer developers[] = { +static const struct developer developers[] = { {"Sean Egan", N_("lead developer"), "sean.egan@gmail.com"}, {"Daniel 'datallah' Atallah", N_("developer"), NULL}, + {"John 'rekkanoryo' Bailey", N_("developer"), NULL}, {"Ethan 'Paco-Paco' Blanton", N_("developer"), NULL}, {"Thomas Butter", N_("developer"), NULL}, {"Ka-Hing Cheung", N_("developer"), NULL}, @@ -94,8 +95,7 @@ }; /* Order: Alphabetical by Last Name */ -static struct developer patch_writers[] = { - {"John 'rekkanoryo' Bailey", NULL, NULL}, +static const struct developer patch_writers[] = { {"Dennis 'EvilDennisR' Ristuccia", N_("Senior Contributor/QA"), NULL}, {"Peter 'Fmoo' Ruibal", NULL, NULL}, {"Gabriel 'Nix' Schulhof", NULL, NULL}, @@ -104,7 +104,7 @@ }; /* Order: Alphabetical by Last Name */ -static struct developer retired_developers[] = { +static const struct developer retired_developers[] = { {"Herman Bloggs", N_("win32 port"), "herman@bluedigits.com"}, {"Jim Duchek", N_("maintainer"), "jim@linuxpimps.com"}, {"Rob Flynn", N_("maintainer"), NULL}, @@ -119,7 +119,7 @@ }; /* Order: Alphabetical by Last Name */ -static struct developer retired_patch_writers[] = { +static const struct developer retired_patch_writers[] = { {"Felipe 'shx' Contreras", NULL, NULL}, {"Decklin Foster", NULL, NULL}, {"Peter 'Bleeter' Lawler", NULL, NULL}, @@ -129,7 +129,7 @@ }; /* Order: Code, then Alphabetical by Last Name */ -static struct translator current_translators[] = { +static const struct translator current_translators[] = { {N_("Afrikaans"), "af", "Friedel Wolff", "friedel@translate.org.za"}, {N_("Arabic"), "ar", "Khaled Hosny", "khaledhosny@eglug.org"}, {N_("Belarusian Latin"), "be@latin", "Ihar Hrachyshka", "ihar.hrachyshka@gmail.com"}, @@ -221,7 +221,7 @@ }; -static struct translator past_translators[] = { +static const struct translator past_translators[] = { {N_("Amharic"), "am", "Daniel Yacob", NULL}, {N_("Arabic"), "ar", "Mohamed Magdy", "alnokta@yahoo.com"}, {N_("Bulgarian"), "bg", "Hristo Todorov", NULL}, @@ -271,7 +271,7 @@ {NULL, NULL, NULL, NULL} }; -static struct artist artists[] = { +static const struct artist artists[] = { {"Hylke Bons", "h.bons@student.rug.nl"}, {NULL, NULL} }; @@ -315,7 +315,7 @@ context = gtk_widget_get_pango_context(widget); layout = pango_layout_new(context); - markup = g_strdup_printf("<span foreground=\"#000000\">%s</span>", VERSION); + markup = g_strdup_printf("<span foreground=\"#000000\">%s</span>", DISPLAY_VERSION); pango_layout_set_font_description(layout, style->font_desc); pango_layout_set_markup(layout, markup, strlen(markup)); g_free(markup); @@ -382,7 +382,7 @@ gdk_pixbuf_unref(pixbuf); /* Insert the logo */ obj = gtk_widget_get_accessible(logo); - tmp = g_strconcat(PIDGIN_NAME, " " VERSION, NULL); + tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL); atk_object_set_description(obj, tmp); g_free(tmp); gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); @@ -394,7 +394,7 @@ str = g_string_sized_new(4096); g_string_append_printf(str, - "<CENTER><FONT SIZE=\"4\"><B>%s %s</B></FONT></CENTER><BR><BR>", PIDGIN_NAME, VERSION); + "<CENTER><FONT SIZE=\"4\"><B>%s %s</B></FONT></CENTER><BR><BR>", PIDGIN_NAME, DISPLAY_VERSION); g_string_append_printf(str, _("%s is a graphical modular messaging client based on "
--- a/pidgin/gtkimhtml.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkimhtml.c Sat Nov 03 05:12:43 2007 +0000 @@ -113,7 +113,7 @@ /* POINT_SIZE converts from AIM font sizes to a point size scale factor. */ #define MAX_FONT_SIZE 7 #define POINT_SIZE(x) (_point_sizes [MIN ((x > 0 ? x : 1), MAX_FONT_SIZE) - 1]) -static gdouble _point_sizes [] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736}; +static const gdouble _point_sizes [] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736}; enum { TARGET_HTML, @@ -138,9 +138,9 @@ static char *html_clipboard = NULL; static char *text_clipboard = NULL; -GtkClipboard *clipboard_selection = NULL; - -static GtkTargetEntry selection_targets[] = { +static GtkClipboard *clipboard_selection = NULL; + +static const GtkTargetEntry selection_targets[] = { #ifndef _WIN32 { "text/html", 0, TARGET_HTML }, #else @@ -151,7 +151,7 @@ { "STRING", 0, TARGET_STRING }, { "TEXT", 0, TARGET_TEXT}}; -static GtkTargetEntry link_drag_drop_targets[] = { +static const GtkTargetEntry link_drag_drop_targets[] = { GTK_IMHTML_DND_TARGETS }; @@ -204,8 +204,6 @@ html = g_strjoinv("\n", split); g_strfreev(split); - html = g_strstrip(html); - #if 0 /* Debugging for Windows clipboard */ purple_debug_info("imhtml clipboard", "HTML fragment: '%s'\n", html); #endif @@ -898,10 +896,9 @@ char *text = NULL; gboolean primary = (clipboard != clipboard_selection); GtkTextIter start, end; - GtkTextMark *sel = NULL; - GtkTextMark *ins = NULL; - - if (primary) { + + if (primary) { + GtkTextMark *sel = NULL, *ins = NULL; ins = gtk_text_buffer_get_insert(imhtml->text_buffer); sel = gtk_text_buffer_get_selection_bound(imhtml->text_buffer); gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &start, sel); @@ -969,20 +966,16 @@ if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, &start, &end)) { if (!clipboard_selection) clipboard_selection = gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_with_owner(clipboard_selection, + gtk_clipboard_set_with_data(clipboard_selection, selection_targets, sizeof(selection_targets) / sizeof(GtkTargetEntry), (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, - (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, G_OBJECT(imhtml)); + (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, NULL); g_free(html_clipboard); g_free(text_clipboard); - imhtml->clipboard_html_string = gtk_imhtml_get_markup_range(imhtml, &start, &end); - imhtml->clipboard_text_string = gtk_imhtml_get_text(imhtml, &start, &end); - - text_clipboard = imhtml->clipboard_text_string; - html_clipboard = imhtml->clipboard_html_string; - + html_clipboard = gtk_imhtml_get_markup_range(imhtml, &start, &end); + text_clipboard = gtk_imhtml_get_text(imhtml, &start, &end); } g_signal_stop_emission_by_name(imhtml, "copy-clipboard"); @@ -994,19 +987,16 @@ if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, &start, &end)) { if (!clipboard_selection) clipboard_selection = gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_with_owner(clipboard_selection, + gtk_clipboard_set_with_data(clipboard_selection, selection_targets, sizeof(selection_targets) / sizeof(GtkTargetEntry), (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, - (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, G_OBJECT(imhtml)); + (GtkClipboardClearFunc)gtk_imhtml_clipboard_clear, NULL); g_free(html_clipboard); g_free(text_clipboard); - imhtml->clipboard_html_string = gtk_imhtml_get_markup_range(imhtml, &start, &end); - imhtml->clipboard_text_string = gtk_imhtml_get_text(imhtml, &start, &end); - - text_clipboard = imhtml->clipboard_text_string; - html_clipboard = imhtml->clipboard_html_string; + html_clipboard = gtk_imhtml_get_markup_range(imhtml, &start, &end); + text_clipboard = gtk_imhtml_get_text(imhtml, &start, &end); if (imhtml->editable) gtk_text_buffer_delete_selection(imhtml->text_buffer, FALSE, FALSE); @@ -1269,11 +1259,6 @@ g_free(imhtml->search_string); g_object_unref(imhtml->undo_manager); G_OBJECT_CLASS(parent_class)->finalize (object); - if (clipboard_selection) - gtk_clipboard_set_with_owner(clipboard_selection, - selection_targets, sizeof(selection_targets) / sizeof(GtkTargetEntry), - (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, - (GtkClipboardClearFunc)NULL, G_OBJECT(imhtml)); } @@ -1464,9 +1449,6 @@ gtk_widget_add_events(GTK_WIDGET(imhtml), GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK); - imhtml->clipboard_text_string = NULL; - imhtml->clipboard_html_string = NULL; - imhtml->tip = NULL; imhtml->tip_timer = 0; imhtml->tip_window = NULL;
--- a/pidgin/gtkimhtml.h Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkimhtml.h Sat Nov 03 05:12:43 2007 +0000 @@ -128,8 +128,15 @@ GtkTextTag *link; } edit; +#ifndef PIDGIN_DISABLE_DEPRECATED + /** @deprecated */ char *clipboard_text_string; + /** @deprecated */ char *clipboard_html_string; +#else + char *depr1; + char *depr2; +#endif GSList *im_images; GtkIMHtmlFuncs *funcs;
--- a/pidgin/gtkmain.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkmain.c Sat Nov 03 05:12:43 2007 +0000 @@ -92,7 +92,7 @@ * Lists of signals we wish to catch and those we wish to ignore. * Each list terminated with -1 */ -static int catch_sig_list[] = { +static const int catch_sig_list[] = { SIGSEGV, SIGHUP, SIGINT, @@ -103,7 +103,7 @@ -1 }; -static int ignore_sig_list[] = { +static const int ignore_sig_list[] = { SIGPIPE, -1 }; @@ -383,7 +383,7 @@ char *text; if (terse) { - text = g_strdup_printf(_("%s %s. Try `%s -h' for more information.\n"), PIDGIN_NAME, VERSION, name); + text = g_strdup_printf(_("%s %s. Try `%s -h' for more information.\n"), PIDGIN_NAME, DISPLAY_VERSION, name); } else { text = g_strdup_printf(_("%s %s\n" "Usage: %s [OPTION]...\n\n" @@ -397,7 +397,7 @@ #ifndef WIN32 " --display=DISPLAY X display to use\n" #endif - " -v, --version display the current version and exit\n"), PIDGIN_NAME, VERSION, name); + " -v, --version display the current version and exit\n"), PIDGIN_NAME, DISPLAY_VERSION, name); } purple_print_utf8_to_console(stdout, text); @@ -527,7 +527,7 @@ "LSchiere (via AIM). Contact information for Sean and Luke \n" "on other protocols is at\n" "%swiki/DeveloperPages\n"), - PIDGIN_NAME, VERSION, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE + PIDGIN_NAME, DISPLAY_VERSION, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE ); /* we have to convert the message (UTF-8 to console @@ -654,7 +654,7 @@ } /* show version message */ if (opt_version) { - printf("%s %s\n", PIDGIN_NAME, VERSION); + printf("%s %s\n", PIDGIN_NAME, DISPLAY_VERSION); #ifdef HAVE_SIGNAL_H g_free(segfault_message); #endif @@ -691,7 +691,7 @@ if (!gui_check) { char *display = gdk_get_display(); - printf("%s %s\n", PIDGIN_NAME, VERSION); + printf("%s %s\n", PIDGIN_NAME, DISPLAY_VERSION); g_warning("cannot open display: %s", display ? display : "unset"); g_free(display);
--- a/pidgin/gtknickcolors.h Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtknickcolors.h Sat Nov 03 05:12:43 2007 +0000 @@ -25,7 +25,7 @@ #ifndef _PIDGINNICKCOLORS_H_ #define _PIDGINNICKCOLORS_H_ -static GdkColor nick_seed_colors[] = { +static const GdkColor nick_seed_colors[] = { {0, 64764, 59881, 20303}, /* Butter #1 */ {0, 60909, 54484, 0}, /* Butter #2 */ {0, 50372, 41120, 0}, /* Butter #3 */
--- a/pidgin/gtkpluginpref.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkpluginpref.c Sat Nov 03 05:12:43 2007 +0000 @@ -255,5 +255,7 @@ } } + g_object_unref(sg); + return ret; }
--- a/pidgin/gtkpounce.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkpounce.c Sat Nov 03 05:12:43 2007 +0000 @@ -685,6 +685,8 @@ gtk_widget_set_sensitive(dialog->play_sound_browse, FALSE); gtk_widget_set_sensitive(dialog->play_sound_test, FALSE); + g_object_unref(sg); + sg = gtk_size_group_new(GTK_SIZE_GROUP_VERTICAL); gtk_size_group_add_widget(sg, dialog->open_win); gtk_size_group_add_widget(sg, dialog->popup); @@ -697,6 +699,9 @@ gtk_size_group_add_widget(sg, dialog->play_sound_browse); gtk_size_group_add_widget(sg, dialog->play_sound_test); + g_object_unref(sg); + sg = NULL; + gtk_table_attach(GTK_TABLE(table), dialog->open_win, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), dialog->popup, 0, 1, 1, 2,
--- a/pidgin/gtkprefs.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkprefs.c Sat Nov 03 05:12:43 2007 +0000 @@ -956,6 +956,7 @@ g_list_free(names); gtk_widget_show_all(ret); + g_object_unref(sg); return ret; } @@ -1113,12 +1114,25 @@ purple_prefs_set_string("/purple/proxy/password", gtk_entry_get_text(entry)); } +static void +proxy_button_clicked_cb(GtkWidget *button, gpointer null) +{ + GError *err = NULL; + + if (g_spawn_command_line_async ("gnome-network-preferences", &err)) + return; + + purple_notify_error(NULL, NULL, _("Cannot start proxy configuration program."), err->message); + g_error_free(err); +} + static GtkWidget * network_page() { GtkWidget *ret; GtkWidget *vbox, *hbox, *entry; GtkWidget *table, *label, *auto_ip_checkbox, *ports_checkbox, *spin_button; + GtkWidget *warning = NULL, *proxy_button = NULL; GtkSizeGroup *sg; PurpleProxyInfo *proxy_info = NULL; @@ -1181,6 +1195,8 @@ g_signal_connect(G_OBJECT(auto_ip_checkbox), "clicked", G_CALLBACK(pidgin_toggle_sensitive), table); + g_object_unref(sg); + vbox = pidgin_make_frame (ret, _("Ports")); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -1201,9 +1217,33 @@ g_signal_connect(G_OBJECT(ports_checkbox), "clicked", G_CALLBACK(pidgin_toggle_sensitive), spin_button); - if (!purple_running_gnome()) { - vbox = pidgin_make_frame(ret, _("Proxy Server")); - prefs_proxy_frame = gtk_vbox_new(FALSE, 0); + vbox = pidgin_make_frame(ret, _("Proxy Server")); + prefs_proxy_frame = gtk_vbox_new(FALSE, 0); + + if (purple_running_gnome()) { + warning = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + gtk_container_add(GTK_CONTAINER(vbox), hbox); + + label = gtk_label_new(NULL); + gtk_label_set_markup(GTK_LABEL(label), + _("<b>Proxy configuration program was not found.</b>")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + + hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + gtk_container_add(GTK_CONTAINER(vbox), hbox); + label = gtk_label_new(_("Proxy preferences are configured in\n" + "GNOME Control Center: Desktop Preferences")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + gtk_widget_show(label); + + hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + gtk_container_add(GTK_CONTAINER(vbox), hbox); + proxy_button = gtk_button_new_with_mnemonic(_("Configure _Proxy")); + g_signal_connect(G_OBJECT(proxy_button), "clicked", + G_CALLBACK(proxy_button_clicked_cb), NULL); + gtk_box_pack_start(GTK_BOX(hbox), proxy_button, FALSE, FALSE, 0); + gtk_widget_show(proxy_button); + } else { pidgin_prefs_dropdown(vbox, _("Proxy _type:"), PURPLE_PREF_STRING, "/purple/proxy/type", _("No proxy"), "none", @@ -1300,11 +1340,25 @@ } gtk_widget_show_all(ret); + g_object_unref(sg); /* Only hide table if not running gnome otherwise we hide the IP address table! */ if (!purple_running_gnome() && (proxy_info == NULL || purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_NONE || - purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_USE_ENVVAR)) + purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_USE_ENVVAR)) { gtk_widget_hide(table); + } else if (purple_running_gnome()) { + gchar *path; + path = g_find_program_in_path("gnome-network-preferences"); + if (path != NULL) { + gtk_widget_set_sensitive(proxy_button, TRUE); + gtk_widget_hide(warning); + g_free(path); + } else { + gtk_widget_set_sensitive(proxy_button, FALSE); + gtk_widget_show(warning); + } + } + return ret; } @@ -1326,7 +1380,7 @@ }; /* Sorted reverse alphabetically */ - static struct browser possible_browsers[] = { + static const struct browser possible_browsers[] = { {N_("Seamonkey"), "seamonkey"}, {N_("Opera"), "opera"}, {N_("Netscape"), "netscape"}, @@ -1451,6 +1505,7 @@ pidgin_set_accessible_label (entry, label); gtk_widget_show_all(ret); + g_object_unref(sg); return ret; } #endif /*_WIN32*/ @@ -1557,18 +1612,22 @@ test_sound(GtkWidget *button, gpointer i_am_NULL) { char *pref; - gboolean temp_value; + gboolean temp_enabled; + gboolean temp_mute; pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/enabled/%s", pidgin_sound_get_event_option(sound_row_sel)); - temp_value = purple_prefs_get_bool(pref); + temp_enabled = purple_prefs_get_bool(pref); + temp_mute = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/sound/mute"); - if (!temp_value) purple_prefs_set_bool(pref, TRUE); + if (!temp_enabled) purple_prefs_set_bool(pref, TRUE); + if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE); purple_sound_play_event(sound_row_sel, NULL); - if (!temp_value) purple_prefs_set_bool(pref, FALSE); + if (!temp_enabled) purple_prefs_set_bool(pref, FALSE); + if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", TRUE); g_free(pref); } @@ -1888,6 +1947,7 @@ gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); gtk_widget_show_all(ret); + g_object_unref(sg); return ret; } @@ -2013,6 +2073,7 @@ } gtk_widget_show_all(ret); + g_object_unref(sg); return ret; }
--- a/pidgin/gtkprivacy.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkprivacy.c Sat Nov 03 05:12:43 2007 +0000 @@ -75,7 +75,7 @@ const char *text; int num; -} menu_entries[] = +} const menu_entries[] = { { N_("Allow all users to contact me"), PURPLE_PRIVACY_ALLOW_ALL }, { N_("Allow only the users on my buddy list"), PURPLE_PRIVACY_ALLOW_BUDDYLIST }, @@ -84,7 +84,7 @@ { N_("Block only the users below"), PURPLE_PRIVACY_DENY_USERS } }; -static size_t menu_entry_count = sizeof(menu_entries) / sizeof(*menu_entries); +static const size_t menu_entry_count = sizeof(menu_entries) / sizeof(*menu_entries); static PidginPrivacyDialog *privacy_dialog = NULL;
--- a/pidgin/gtkrequest.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkrequest.c Sat Nov 03 05:12:43 2007 +0000 @@ -931,7 +931,7 @@ purple_request_field_image_get_scale_y(field) * gdk_pixbuf_get_height(buf), GDK_INTERP_BILINEAR); widget = gtk_image_new_from_pixbuf(scale); - g_object_unref(G_OBJECT(buf)); + g_object_unref(G_OBJECT(loader)); g_object_unref(G_OBJECT(scale)); return widget;
--- a/pidgin/gtksavedstatuses.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtksavedstatuses.c Sat Nov 03 05:12:43 2007 +0000 @@ -1292,6 +1292,7 @@ G_CALLBACK(status_editor_ok_cb), dialog); gtk_widget_show_all(win); + g_object_unref(sg); } @@ -1621,6 +1622,7 @@ } gtk_widget_show_all(win); + g_object_unref(sg); }
--- a/pidgin/gtksession.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtksession.c Sat Nov 03 05:12:43 2007 +0000 @@ -82,7 +82,7 @@ if (opening) { purple_debug(PURPLE_DEBUG_INFO, "Session Management", - "Handling new ICE connection... "); + "Handling new ICE connection... \n"); /* ensure ICE connection is not passed to child processes */ fcntl(IceConnectionNumber(connection), F_SETFD, FD_CLOEXEC); @@ -96,7 +96,7 @@ *watch_data = conninfo; } else { purple_debug(PURPLE_DEBUG_INFO, "Session Management", - "Handling closed ICE connection... "); + "Handling closed ICE connection... \n"); /* get the input ID back and stop watching it */ conninfo = (struct ice_connection_info*) *watch_data;
--- a/pidgin/gtksound.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtksound.c Sat Nov 03 05:12:43 2007 +0000 @@ -51,8 +51,6 @@ char *def; }; -#define PLAY_SOUND_TIMEOUT 15000 - static guint mute_login_sounds_timeout = 0; static gboolean mute_login_sounds = FALSE; @@ -60,7 +58,7 @@ static gboolean gst_init_failed; #endif /* USE_GSTREAMER */ -static struct pidgin_sound_event sounds[PURPLE_NUM_SOUNDS] = { +static const struct pidgin_sound_event sounds[PURPLE_NUM_SOUNDS] = { {N_("Buddy logs in"), "login", "login.wav"}, {N_("Buddy logs out"), "logout", "logout.wav"}, {N_("Message received"), "im_recv", "receive.wav"}, @@ -482,11 +480,11 @@ } play = gst_element_factory_make("playbin", "play"); - + if (play == NULL) { return; } - + uri = g_strdup_printf("file://%s", filename); g_object_set(G_OBJECT(play), "uri", uri,
--- a/pidgin/gtkstatusbox.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkstatusbox.c Sat Nov 03 05:12:43 2007 +0000 @@ -2162,6 +2162,9 @@ purple_imgstore_get_size(status_box->buddy_icon_img), NULL); gdk_pixbuf_loader_close(loader, NULL); status_box->buddy_icon = gdk_pixbuf_loader_get_pixbuf(loader); + if (status_box->buddy_icon) + g_object_ref(status_box->buddy_icon); + g_object_unref(loader); } if (status_box->buddy_icon == NULL)
--- a/pidgin/gtkutils.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/gtkutils.c Sat Nov 03 05:12:43 2007 +0000 @@ -2858,7 +2858,7 @@ gtk_window_set_urgency_hint(window, urgent); #elif defined _WIN32 winpidgin_window_flash(window, urgent); -#else +#elif defined GDK_WINDOWING_X11 GdkWindow *gdkwin; XWMHints *hints; @@ -2880,6 +2880,8 @@ XSetWMHints(GDK_WINDOW_XDISPLAY(gdkwin), GDK_WINDOW_XWINDOW(gdkwin), hints); XFree(hints); +#else + /* do something else? */ #endif } @@ -2990,6 +2992,8 @@ } va_end(args); + g_object_unref(sg); + return vbox; }
--- a/pidgin/plugins/cap/cap.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/cap/cap.c Sat Nov 03 05:12:43 2007 +0000 @@ -934,7 +934,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ CAP_PLUGIN_ID, /**< id */ N_("Contact Availability Prediction"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Contact Availability Prediction plugin."), /** summary */ N_("The contact availability plugin (cap) is used to display statistical information about buddies in a users contact list."), /** description */
--- a/pidgin/plugins/contact_priority.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/contact_priority.c Sat Nov 03 05:12:43 2007 +0000 @@ -157,6 +157,7 @@ gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); gtk_widget_show_all(ret); + g_object_unref(sg); return ret; } @@ -185,7 +186,7 @@ CONTACT_PRIORITY_PLUGIN_ID, /**< id */ N_("Contact Priority"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /**< summary */ N_("Allows for controlling the values associated with different buddy states."), /**< description */
--- a/pidgin/plugins/convcolors.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/convcolors.c Sat Nov 03 05:12:43 2007 +0000 @@ -340,7 +340,7 @@ PLUGIN_ID, /* plugin id */ PLUGIN_NAME, /* name */ - VERSION, /* version */ + DISPLAY_VERSION, /* version */ PLUGIN_SUMMARY, /* summary */ PLUGIN_DESCRIPTION, /* description */ PLUGIN_AUTHOR, /* author */
--- a/pidgin/plugins/crazychat/cc_pidgin_plugin.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/crazychat/cc_pidgin_plugin.c Sat Nov 03 05:12:43 2007 +0000 @@ -144,7 +144,7 @@ CRAZYCHAT_PLUGIN_ID, /**< id */ N_("Crazychat"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Plugin to establish a Crazychat session."), /** description */
--- a/pidgin/plugins/extplacement.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/extplacement.c Sat Nov 03 05:12:43 2007 +0000 @@ -144,7 +144,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ "gtk-extplacement", /**< id */ N_("ExtPlacement"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Extra conversation placement options."), /**< summary */ /** description */ N_("Restrict the number of conversations per windows,"
--- a/pidgin/plugins/gestures/gestures.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/gestures/gestures.c Sat Nov 03 05:12:43 2007 +0000 @@ -293,7 +293,7 @@ GESTURES_PLUGIN_ID, /**< id */ N_("Mouse Gestures"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Provides support for mouse gestures"), /** description */
--- a/pidgin/plugins/gevolution/gevolution.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/gevolution/gevolution.c Sat Nov 03 05:12:43 2007 +0000 @@ -525,7 +525,7 @@ GEVOLUTION_PLUGIN_ID, /**< id */ N_("Evolution Integration"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Provides integration with Evolution."), /** description */
--- a/pidgin/plugins/gevolution/new_person_dialog.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/gevolution/new_person_dialog.c Sat Nov 03 05:12:43 2007 +0000 @@ -416,4 +416,6 @@ /* Show it. */ gtk_widget_show(dialog->win); + g_object_unref(sg); + g_object_unref(sg2); }
--- a/pidgin/plugins/gtk-signals-test.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/gtk-signals-test.c Sat Nov 03 05:12:43 2007 +0000 @@ -158,7 +158,7 @@ GTK_SIGNAL_TEST_PLUGIN_ID, /**< id */ N_("GTK Signals Test"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Test to see that all ui signals are working properly."), /** description */
--- a/pidgin/plugins/gtkbuddynote.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/gtkbuddynote.c Sat Nov 03 05:12:43 2007 +0000 @@ -72,7 +72,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ "gtkbuddynote", /**< id */ N_("Buddy Notes"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Store notes on particular buddies."), /**< summary */ N_("Adds the option to store notes for buddies " "on your buddy list."), /**< description */
--- a/pidgin/plugins/history.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/history.c Sat Nov 03 05:12:43 2007 +0000 @@ -193,7 +193,7 @@ PURPLE_PRIORITY_DEFAULT, HISTORY_PLUGIN_ID, N_("History"), - VERSION, + DISPLAY_VERSION, N_("Shows recently logged conversations in new conversations."), N_("When a new conversation is opened this plugin will insert " "the last conversation into the current conversation."),
--- a/pidgin/plugins/iconaway.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/iconaway.c Sat Nov 03 05:12:43 2007 +0000 @@ -80,7 +80,7 @@ ICONAWAY_PLUGIN_ID, /**< id */ N_("Iconify on Away"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Iconifies the buddy list and your conversations when you go away."), /** description */
--- a/pidgin/plugins/mailchk.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/mailchk.c Sat Nov 03 05:12:43 2007 +0000 @@ -158,7 +158,7 @@ PURPLE_PRIORITY_DEFAULT, MAILCHK_PLUGIN_ID, N_("Mail Checker"), - VERSION, + DISPLAY_VERSION, N_("Checks for new local mail."), N_("Adds a small box to the buddy list that" " shows if you have new mail."),
--- a/pidgin/plugins/markerline.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/markerline.c Sat Nov 03 05:12:43 2007 +0000 @@ -281,7 +281,7 @@ PLUGIN_ID, /* plugin id */ PLUGIN_NAME, /* name */ - VERSION, /* version */ + DISPLAY_VERSION, /* version */ PLUGIN_SUMMARY, /* summary */ PLUGIN_DESCRIPTION, /* description */ PLUGIN_AUTHOR, /* author */
--- a/pidgin/plugins/musicmessaging/musicmessaging.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/musicmessaging/musicmessaging.c Sat Nov 03 05:12:43 2007 +0000 @@ -681,7 +681,7 @@ MUSICMESSAGING_PLUGIN_ID, /**< id */ "Music Messaging", /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ N_("Music Messaging Plugin for collaborative composition."), /** summary */ N_("The Music Messaging Plugin allows a number of users to simultaneously work on a piece of music by editting a common score in real-time."),
--- a/pidgin/plugins/notify.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/notify.c Sat Nov 03 05:12:43 2007 +0000 @@ -905,7 +905,7 @@ NOTIFY_PLUGIN_ID, /**< id */ N_("Message Notification"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Provides a variety of ways of notifying you of unread messages."), /** description */
--- a/pidgin/plugins/pidgininc.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/pidgininc.c Sat Nov 03 05:12:43 2007 +0000 @@ -89,7 +89,7 @@ PURPLEINC_PLUGIN_ID, /**< id */ N_("Pidgin Demonstration Plugin"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("An example plugin that does stuff - see the description."), /** description */
--- a/pidgin/plugins/pidginrc.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/pidginrc.c Sat Nov 03 05:12:43 2007 +0000 @@ -509,6 +509,11 @@ G_CALLBACK(purplerc_reread), NULL); gtk_widget_show_all(ret); + + g_object_unref(labelsg); + g_object_unref(widgetsg); + g_object_unref(buttonsg); + return ret; } @@ -536,7 +541,7 @@ PURPLE_PRIORITY_DEFAULT, "purplerc", N_("Pidgin GTK+ Theme Control"), - VERSION, + DISPLAY_VERSION, N_("Provides access to commonly used gtkrc settings."), N_("Provides access to commonly used gtkrc settings."), "Etan Reisner <deryni@eden.rutgers.edu>",
--- a/pidgin/plugins/raw.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/raw.c Sat Nov 03 05:12:43 2007 +0000 @@ -173,7 +173,7 @@ PURPLE_PRIORITY_DEFAULT, RAW_PLUGIN_ID, N_("Raw"), - VERSION, + DISPLAY_VERSION, N_("Lets you send raw input to text-based protocols."), N_("Lets you send raw input to text-based protocols (XMPP, MSN, IRC, " "TOC). Hit 'Enter' in the entry box to send. Watch the debug window."),
--- a/pidgin/plugins/relnot.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/relnot.c Sat Nov 03 05:12:43 2007 +0000 @@ -141,7 +141,7 @@ "gtk-relnot", /**< id */ N_("Release Notification"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Checks periodically for new releases."), /** description */
--- a/pidgin/plugins/spellchk.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/spellchk.c Sat Nov 03 05:12:43 2007 +0000 @@ -2341,6 +2341,8 @@ #endif gtk_widget_show_all(ret); + g_object_unref(sg); + g_object_unref(sg2); return ret; } @@ -2368,7 +2370,7 @@ PURPLE_PRIORITY_DEFAULT, SPELLCHECK_PLUGIN_ID, N_("Text replacement"), - VERSION, + DISPLAY_VERSION, N_("Replaces text in outgoing messages according to user-defined rules."), N_("Replaces text in outgoing messages according to user-defined rules."), "Eric Warmenhoven <eric@warmenhoven.org>",
--- a/pidgin/plugins/ticker/ticker.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/ticker/ticker.c Sat Nov 03 05:12:43 2007 +0000 @@ -354,7 +354,7 @@ TICKER_PLUGIN_ID, /**< id */ N_("Buddy Ticker"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("A horizontal scrolling version of the buddy list."), /** description */
--- a/pidgin/plugins/timestamp.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/timestamp.c Sat Nov 03 05:12:43 2007 +0000 @@ -200,7 +200,7 @@ TIMESTAMP_PLUGIN_ID, /**< id */ N_("Timestamp"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Display iChat-style timestamps"), /** description */
--- a/pidgin/plugins/timestamp_format.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/timestamp_format.c Sat Nov 03 05:12:43 2007 +0000 @@ -149,7 +149,7 @@ "core-timestamp_format", /**< id */ N_("Message Timestamp Formats"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Customizes the message timestamp formats."), /** description */
--- a/pidgin/plugins/win32/transparency/win2ktrans.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/win32/transparency/win2ktrans.c Sat Nov 03 05:12:43 2007 +0000 @@ -691,7 +691,7 @@ PURPLE_PRIORITY_DEFAULT, /**< priority */ WINTRANS_PLUGIN_ID, /**< id */ N_("Transparency"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Variable Transparency for the buddy list and conversations."), /** description */
--- a/pidgin/plugins/win32/winprefs/winprefs.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/win32/winprefs/winprefs.c Sat Nov 03 05:12:43 2007 +0000 @@ -369,7 +369,7 @@ PURPLE_PRIORITY_DEFAULT, WINPREFS_PLUGIN_ID, N_("Windows Pidgin Options"), - VERSION, + DISPLAY_VERSION, N_("Options specific to Pidgin for Windows."), N_("Provides options specific to Pidgin for Windows , such as buddy list docking."), "Herman Bloggs <hermanator12002@yahoo.com>",
--- a/pidgin/plugins/xmppconsole.c Tue Oct 30 06:45:24 2007 +0000 +++ b/pidgin/plugins/xmppconsole.c Sat Nov 03 05:12:43 2007 +0000 @@ -325,8 +325,9 @@ gtk_text_buffer_get_iter_at_offset(buffer, &iter, strstr(stanza, "</iq>") - stanza); gtk_text_buffer_place_cursor(buffer, &iter); g_free(stanza); - + gtk_widget_destroy(dialog); + g_object_unref(sg); } @@ -483,6 +484,7 @@ g_free(stanza); gtk_widget_destroy(dialog); + g_object_unref(sg); } static void message_clicked_cb(GtkWidget *w, gpointer nul) @@ -619,6 +621,7 @@ g_free(stanza); gtk_widget_destroy(dialog); + g_object_unref(sg); } static void @@ -858,7 +861,7 @@ "gtk-xmpp", /**< id */ N_("XMPP Console"), /**< name */ - VERSION, /**< version */ + DISPLAY_VERSION, /**< version */ /** summary */ N_("Send and receive raw XMPP stanzas."), /** description */