Mercurial > pidgin
changeset 16948:74957a0aa633
merge of '33d699ecd89d879c191e545fe83b8f7b6f8ce58f'
and '4b13951978cab32b69b301f7bba471e1f25e1776'
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 08 May 2007 18:33:11 +0000 |
parents | 46985e1ae76a (current diff) 84b7a625512e (diff) |
children | 30b906ba3974 |
files | |
diffstat | 14 files changed, 183 insertions(+), 404 deletions(-) [+] |
line wrap: on
line diff
--- a/config.h.mingw Tue May 08 18:22:02 2007 +0000 +++ b/config.h.mingw Tue May 08 18:33:11 2007 +0000 @@ -4,65 +4,26 @@ /* configure arguments */ /* #undef CONFIG_ARGS */ -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - /* Define if debugging is enabled. */ /* #undef DEBUG */ -/* Use binary relocation? */ -/* #undef ENABLE_BINRELOC */ - /* Define if mono enabled. */ /* #undef ENABLE_MONO */ -/* Define to 1 if translation of program messages to the user's native - language is requested. */ +/* always defined to indicate that i18n is enabled */ #define ENABLE_NLS 1 -/* Define to make assertions fatal (useful for debugging). */ -/* #undef PURPLE_FATAL_ASSERTS */ - -/* Define if plugins are enabled. */ -#define PURPLE_PLUGINS 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the <alsa/asoundlib.h> header file. */ -/* #undef HAVE_ALSA_ASOUNDLIB_H */ - /* Define if you have the external 'altzone' variable. */ /* #undef HAVE_ALTZONE */ -/* Define to 1 if you have the <argz.h> header file. */ -/* #undef HAVE_ARGZ_H */ - /* Define to 1 if you have the <arpa/nameser_compat.h> header file. */ /* #undef HAVE_ARPA_NAMESER_COMPAT_H */ -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ - -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ +/* Define to 1 if you have the `bind_textdomain_codeset' function. */ +/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */ /* Define to 1 if you have the `connect' function. */ /* #undef HAVE_CONNECT */ @@ -73,39 +34,19 @@ /* Define if you have the external 'daylight' variable. */ #define HAVE_DAYLIGHT 1 -/* Define if we are re using DBUS. */ +/* Define if we are using D-Bus. */ /* #undef HAVE_DBUS */ -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ +/* Define to 1 if you have the `dcgettext' function. */ /* #undef HAVE_DCGETTEXT */ -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -/* #undef HAVE_DECL_FEOF_UNLOCKED */ - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -/* #undef HAVE_DECL_FGETS_UNLOCKED */ - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -/* #undef HAVE_DECL_GETC_UNLOCKED */ - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 +/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. + */ +/* #undef HAVE_DECL_TZNAME */ /* Define to 1 if you have the <dlfcn.h> header file. */ /* #undef HAVE_DLFCN_H */ -/* Define to 1 if you have the `dlopen' function. */ -/* #undef HAVE_DLOPEN */ - /* whether or not we have dot */ /* #undef HAVE_DOT */ @@ -121,68 +62,28 @@ /* Define to 1 if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 -/* Define to 1 if you have the `fwprintf' function. */ -#define HAVE_FWPRINTF 1 - /* Define to 1 if you have the getaddrinfo function. */ /* TODO: Use this on new enough versions of Windows */ /* #define HAVE_GETADDRINFO 1 */ -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getegid' function. */ -/* #define HAVE_GETEGID 1 */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #define HAVE_GETEUID 1 */ - -/* Define to 1 if you have the `getgid' function. */ -/* #define HAVE_GETGID 1 */ - /* Define to 1 if you have the `gethostid' function. */ /* #define HAVE_GETHOSTID 1 */ /* Define to 1 if you have the `getopt_long' function. */ /* #define HAVE_GETOPT_LONG 1 */ -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - /* Define if the GNU gettext() function is already present or preinstalled. */ /* #define HAVE_GETTEXT 1 */ -/* Define to 1 if you have the `getuid' function. */ -/* #define HAVE_GETUID 1 */ - -/* Pidgin always has GLib, but Linphone can be built without it */ -/* #undef HAVE_GLIB */ - /* Define if you have GNUTLS */ /* #define HAVE_GNUTLS 1 */ /* Define to 1 if you have the <gnutls/gnutls.h> header file. */ /* #define HAVE_GNUTLS_GNUTLS_H 1 */ -/* Define if you have the iconv() function. */ -/* #define HAVE_ICONV 1 */ - -/* Defined when we have ilbc codec lib */ -/* #undef HAVE_ILBC */ - -/* Define to 1 if you have the <iLBC_decode.h> header file. */ -/* #undef HAVE_ILBC_DECODE_H */ - -/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */ -#define HAVE_INTMAX_T 1 - /* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */ #define HAVE_INTTYPES_H 1 -/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - /* Define if we have IOKit */ /* #undef HAVE_IOKIT */ @@ -201,15 +102,15 @@ /* Define to 1 if you have the `krb_set_key' function. */ /* #undef HAVE_KRB_SET_KEY */ -/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ -/* #define HAVE_LANGINFO_CODESET 1 */ - /* Define if your <locale.h> file defines LC_MESSAGES. */ /* #define HAVE_LC_MESSAGES 1 */ /* Define to 1 if you have libgadu. */ #define HAVE_LIBGADU 1 +/* Define if you have NetworkManager */ +/* #undef HAVE_LIBNM */ + /* Define to 1 if you have the `nsl' library (-lnsl). */ /* #define HAVE_LIBNSL 1 */ @@ -219,24 +120,12 @@ /* Define to 1 if you have the `socket' library (-lsocket). */ /* #undef HAVE_LIBSOCKET */ -/* Define to 1 if you have the <limits.h> header file. */ -#define HAVE_LIMITS_H 1 - /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 -/* Define if you have the 'long double' type. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define if you have the 'long long' type. */ -#define HAVE_LONG_LONG 1 - /* Define to 1 if you have the `lrand48' function. */ /* #define HAVE_LRAND48 1 */ -/* Define to 1 if you have the <machine/soundcard.h> header file. */ -/* #undef HAVE_MACHINE_SOUNDCARD_H */ - /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 @@ -249,12 +138,6 @@ /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 -/* Define to 1 if you have the `mempcpy' function. */ -/* #define HAVE_MEMPCPY 1*/ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #define HAVE_MMAP 1 */ - /* Define to 1 if you have the `mono_jit_init' function. */ /* #undef HAVE_MONO_JIT_INIT */ @@ -264,12 +147,6 @@ /* Define to 1 if you have the <mono/metadata/object.h> header file. */ /* #undef HAVE_MONO_METADATA_OBJECT_H */ -/* Define to 1 if you have the `munmap' function. */ -/* #define HAVE_MUNMAP 1 */ - -/* Define to 1 if you have the <nl_types.h> header file. */ -/* #define HAVE_NL_TYPES_H 1 */ - /* Define to 1 if you have the <nspr.h> header file. */ /* #undef HAVE_NSPR_H */ @@ -297,24 +174,15 @@ /* Define to 1 if you have the `perl_run' function. */ /* #define HAVE_PERL_RUN 1 */ -/* Define if your printf() function supports format strings with positions. */ -#define HAVE_POSIX_PRINTF 1 - /* Define to 1 if you have the <prio.h> header file. */ /* #undef HAVE_PRIO_H */ -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - /* Define to 1 if you have the `random' function. */ /* #define HAVE_RANDOM 1 */ /* Define to 1 if you have the <regex.h> header file. */ /* #define HAVE_REGEX_H 1 */ -/* Define to 1 if you have the `setenv' function. */ -/* #define HAVE_SETENV 1 */ - /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 @@ -333,12 +201,6 @@ /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 -/* Define to 1 if you have the <soundcard.h> header file. */ -/* #undef HAVE_SOUNDCARD_H */ - -/* Define to 1 if you have the <speex.h> header file. */ -/* #undef HAVE_SPEEX_H */ - /* Define if you have SSL */ #define HAVE_SSL 1 @@ -351,25 +213,12 @@ /* Define to 1 if you have the <stdarg.h> header file. */ #define HAVE_STDARG_H 1 -/* Define to 1 if you have the <stddef.h> header file. */ -#define HAVE_STDDEF_H 1 - /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 -/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the `stpcpy' function. */ -/* #define HAVE_STPCPY 1 */ - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 @@ -394,15 +243,9 @@ /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - /* Define to 1 if `tm_zone' is member of `struct tm'. */ /* #define HAVE_STRUCT_TM_TM_ZONE 1 */ -/* Define to 1 if you have the <sys/audio.h> header file. */ -/* #undef HAVE_SYS_AUDIO_H */ - /* Define to 1 if you have the <sys/cdefs.h> header file. */ /* #define HAVE_SYS_CDEFS_H 1 */ @@ -418,15 +261,9 @@ /* Define to 1 if you have the <sys/msgbuf.h> header file. */ /* #undef HAVE_SYS_MSGBUF_H */ -/* Define to 1 if you have the <sys/param.h> header file. */ -/* #define HAVE_SYS_PARAM_H 1 */ - /* Define to 1 if you have the <sys/select.h> header file. */ /* #define HAVE_SYS_SELECT_H 1 */ -/* Define to 1 if you have the <sys/soundcard.h> header file. */ -/* #undef HAVE_SYS_SOUNDCARD_H */ - /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 @@ -464,61 +301,28 @@ `HAVE_STRUCT_TM_TM_ZONE' instead. */ /* #define HAVE_TM_ZONE 1 */ -/* Define to 1 if you have the `tsearch' function. */ -/* #define HAVE_TSEARCH 1 */ - /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ /* #undef HAVE_TZNAME */ -/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */ -#define HAVE_UINTMAX_T 1 - /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the 'unsigned long long' type. */ -#define HAVE_UNSIGNED_LONG_LONG 1 - /* Define to 1 if you have the `vprintf' function. */ #define HAVE_VPRINTF 1 -/* Compile with Voice/Video support */ -/* #undef HAVE_VV */ - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 +/* Define to 1 if you have X11 */ +/* #define HAVE_X11 1 */ /* Define to 1 if you have the <X11/SM/SMlib.h> header file. */ /* #define HAVE_X11_SM_SMLIB_H 1 */ -/* Define to 1 if you have the `__argz_count' function. */ -/* #define HAVE___ARGZ_COUNT 1 */ - -/* Define to 1 if you have the `__argz_next' function. */ -/* #define HAVE___ARGZ_NEXT 1 */ - -/* Define to 1 if you have the `__argz_stringify' function. */ -/* #define HAVE___ARGZ_STRINGIFY 1 */ - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #define HAVE___FSETLOCKING 1 */ - -/* Define as const if the declaration of iconv() needs const. */ -/* #define ICONV_CONST */ - -/* Define if integer division by zero raises signal SIGFPE. */ -/* #define INTDIV0_RAISES_SIGFPE 1 */ - /* Define if external libzephyr should be used. */ /* #undef LIBZEPHYR_EXT */ +/* Define to 1 if you don't have wide-character support. */ +/* #undef NO_WIDECHAR */ + /* Define if old perl is installed. */ /* #undef OLD_PERL */ @@ -540,23 +344,17 @@ /* Define to the version of this package. */ /* #define PACKAGE_VERSION "2.0.0dev" */ -/* Define if <inttypes.h> exists and defines unusable PRI* macros. */ -/* #undef PRI_MACROS_BROKEN */ +/* Define to make assertions fatal (useful for debugging). */ +/* #define PURPLE_FATAL_ASSERTS 1 */ + +/* Define if plugins are enabled. */ +#define PURPLE_PLUGINS 1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -/* #undef SIZE_MAX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ +/* The size of `time_t', as computed by sizeof. */ +#define SIZEOF_TIME_T 4 /* Loads static protocol plugin module initialization functions. */ #ifndef STATIC_PROTO_INIT @@ -569,10 +367,10 @@ /* Define to 1 if your <sys/time.h> declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ -/* Define if we're using libao and libaudiofile for sound playing */ -/* #define USE_AO 1 */ +/* Use GStreamer for playing sounds */ +/* #define USE_GSTREAMER 1 */ -/* do we have gtkspell? */ +/* Define if we're using GtkSpell */ #define USE_GTKSPELL 1 /* Define if we're using XScreenSaver. */ @@ -603,48 +401,14 @@ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ -/* Defined when alsa support is enabled */ -/* #undef __ALSA_ENABLED__ */ - -/* Jack support */ -/* #undef __JACK_ENABLED__ */ - /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `long' if <sys/types.h> does not define. */ -/* #undef off_t */ - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to empty if the C compiler doesn't support this keyword. */ -/* #undef signed */ - -/* Define to `unsigned' if <sys/types.h> does not define. */ -/* #undef size_t */ - /* socklen_t size */ -/* #define socklen_t int */ - -/* Define to unsigned long or unsigned long long if <stdint.h> and - <inttypes.h> don't define. */ -/* #undef uintmax_t */ - -#define HAVE_LIBXML 1 +/* #undef socklen_t */ /* * Following are added for Win32 version of Pidgin */ #define HAVE_VSNPRINTF 1 -#define SIZEOF_TIME_T 4 - -#define PIDGIN_NAME "Pidgin"
--- a/finch/finch.c Tue May 08 18:22:02 2007 +0000 +++ b/finch/finch.c Tue May 08 18:33:11 2007 +0000 @@ -274,7 +274,9 @@ } /* show version message */ if (opt_version) { - printf("%s v%s.\n", "Finch", VERSION); + /* Translators may want to transliterate the name. + It is not to be translated. */ + printf("%s %s\n", _("Finch"), VERSION); return 0; } @@ -303,7 +305,7 @@ char *text = g_strdup_printf(_( "%s encountered errors migrating your settings " "from %s to %s. Please investigate and complete the " - "migration by hand. Please report this error at http://developer.pidgin.im"), "Finch", + "migration by hand. Please report this error at http://developer.pidgin.im"), _("Finch"), old, purple_user_dir()); g_free(old);
--- a/finch/gntplugin.c Tue May 08 18:22:02 2007 +0000 +++ b/finch/gntplugin.c Tue May 08 18:33:11 2007 +0000 @@ -105,6 +105,20 @@ { PurplePlugin *plugin = current; char *text; + GList *list = NULL, *iter = NULL; + + /* If the selected plugin was unseen before, mark it as seen. But save the list + * only when the plugin list is closed. So if the user enables a plugin, and it + * crashes, it won't get marked as seen so the user can fix the bug and still + * quickly find the plugin in the list. + * I probably mean 'plugin developers' by 'users' here. */ + list = g_object_get_data(G_OBJECT(widget), "seen-list"); + if (list) + iter = g_list_find_custom(list, plugin->path, (GCompareFunc)strcmp); + if (!iter) { + list = g_list_prepend(list, g_strdup(plugin->path)); + g_object_set_data(G_OBJECT(widget), "seen-list", list); + } /* XXX: Use formatting and stuff */ gnt_text_view_clear(GNT_TEXT_VIEW(plugins.aboot)); @@ -121,6 +135,11 @@ static void reset_plugin_window(GntWidget *window, gpointer null) { + GList *list = g_object_get_data(G_OBJECT(plugins.tree), "seen-list"); + purple_prefs_set_path_list("/finch/plugins/seen", list); + g_list_foreach(list, (GFunc)g_free, NULL); + g_list_free(list); + plugins.window = NULL; plugins.tree = NULL; plugins.aboot = NULL; @@ -214,6 +233,8 @@ { GntWidget *window, *tree, *box, *aboot, *button; GList *iter; + GList *seen; + if (plugins.window) return; @@ -244,6 +265,7 @@ gnt_widget_set_size(aboot, 40, 20); gnt_box_add_widget(GNT_BOX(box), aboot); + seen = purple_prefs_get_path_list("/finch/plugins/seen"); for (iter = purple_plugins_get_all(); iter; iter = iter->next) { PurplePlugin *plug = iter->data; @@ -256,10 +278,13 @@ gnt_tree_add_choice(GNT_TREE(tree), plug, gnt_tree_create_row(GNT_TREE(tree), plug->info->name), NULL, NULL); gnt_tree_set_choice(GNT_TREE(tree), plug, purple_plugin_is_loaded(plug)); + if (!g_list_find_custom(seen, plug->path, (GCompareFunc)strcmp)) + gnt_tree_set_row_flags(GNT_TREE(tree), plug, GNT_TEXT_FLAG_BOLD); } gnt_tree_set_col_width(GNT_TREE(tree), 0, 30); g_signal_connect(G_OBJECT(tree), "toggled", G_CALLBACK(plugin_toggled_cb), NULL); g_signal_connect(G_OBJECT(tree), "selection_changed", G_CALLBACK(selection_changed), NULL); + g_object_set_data(G_OBJECT(tree), "seen-list", seen); box = gnt_hbox_new(FALSE); gnt_box_add_widget(GNT_BOX(window), box);
--- a/finch/gntprefs.c Tue May 08 18:22:02 2007 +0000 +++ b/finch/gntprefs.c Tue May 08 18:33:11 2007 +0000 @@ -39,6 +39,7 @@ purple_prefs_add_none("/finch/plugins"); purple_prefs_add_path_list("/finch/plugins/loaded", NULL); + purple_prefs_add_path_list("/finch/plugins/seen", NULL); purple_prefs_add_none("/finch/conversations"); purple_prefs_add_bool("/finch/conversations/timestamps", TRUE);
--- a/libpurple/prefs.c Tue May 08 18:22:02 2007 +0000 +++ b/libpurple/prefs.c Tue May 08 18:33:11 2007 +0000 @@ -937,7 +937,7 @@ if(pref->type != PURPLE_PREF_PATH_LIST) { purple_debug_error("prefs", - "purple_prefs_set_path_list: %s not a string list pref\n", + "purple_prefs_set_path_list: %s not a path list pref\n", name); return; }
--- a/libpurple/protocols/irc/irc.h Tue May 08 18:22:02 2007 +0000 +++ b/libpurple/protocols/irc/irc.h Tue May 08 18:33:11 2007 +0000 @@ -142,8 +142,8 @@ void irc_msg_ping(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_pong(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_privmsg(struct irc_conn *irc, const char *name, const char *from, char **args); +void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args); -void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_time(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_unavailable(struct irc_conn *irc, const char *name, const char *from, char **args);
--- a/libpurple/protocols/irc/msgs.c Tue May 08 18:22:02 2007 +0000 +++ b/libpurple/protocols/irc/msgs.c Tue May 08 18:33:11 2007 +0000 @@ -1079,7 +1079,7 @@ if (!args || !args[1] || !args[2] || !gc) return; - msg = g_strdup_printf(_("Cannot join %s:"), args[1]); + msg = g_strdup_printf(_("Cannot join %s: Registration is required."), args[1]); purple_notify_error(gc, _("Cannot join channel"), msg, args[2]); g_free(msg); }
--- a/libpurple/protocols/irc/parse.c Tue May 08 18:22:02 2007 +0000 +++ b/libpurple/protocols/irc/parse.c Tue May 08 18:33:11 2007 +0000 @@ -91,6 +91,7 @@ { "442", "nc:", irc_msg_notinchan }, /* Not in channel */ { "473", "nc:", irc_msg_inviteonly }, /* Tried to join invite-only */ { "474", "nc:", irc_msg_banned }, /* Banned from channel */ + { "477", "nc:", irc_msg_regonly }, /* Registration Required */ { "478", "nct:", irc_msg_banfull }, /* Banlist is full */ { "482", "nc:", irc_msg_notop }, /* Need to be op to do that */ { "501", "n:", irc_msg_badmode }, /* Unknown mode flag */
--- a/libpurple/protocols/oscar/oscar.c Tue May 08 18:22:02 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Tue May 08 18:33:11 2007 +0000 @@ -6463,15 +6463,18 @@ gboolean oscar_offline_message(const PurpleBuddy *buddy) { - OscarData *od; + OscarData *od = NULL; PurpleAccount *account; - PurpleConnection *gc; + PurpleConnection *gc = NULL; account = purple_buddy_get_account(buddy); - gc = purple_account_get_connection(account); - od = (OscarData *)gc->proto_data; - - return (od->icq && aim_sn_is_icq(purple_account_get_username(account))); + if (account != NULL) { + gc = purple_account_get_connection(account); + if (gc != NULL) + od = (OscarData *)gc->proto_data; + } + + return (od != NULL && od->icq && aim_sn_is_icq(purple_account_get_username(account))); } /* TODO: Find somewhere to put this instead of including it in a bunch of places.
--- a/pidgin/gtkdocklet-x11.c Tue May 08 18:22:02 2007 +0000 +++ b/pidgin/gtkdocklet-x11.c Tue May 08 18:33:11 2007 +0000 @@ -42,7 +42,6 @@ static GtkTooltips *tooltips = NULL; static GdkPixbuf *blank_icon = NULL; static int embed_timeout = 0; -static DockletStatus icon_status = 0; static int docklet_height = 0; /* protos */ @@ -90,39 +89,38 @@ } static void -docklet_x11_update_icon(DockletStatus icon) +docklet_x11_update_icon(PurpleStatusPrimitive status, gboolean connecting, gboolean pending) { const gchar *icon_name = NULL; g_return_if_fail(image != NULL); - switch (icon) { - case DOCKLET_STATUS_OFFLINE: + switch (status) { + case PURPLE_STATUS_OFFLINE: icon_name = PIDGIN_STOCK_TRAY_OFFLINE; break; - case DOCKLET_STATUS_CONNECTING: - icon_name = PIDGIN_STOCK_TRAY_CONNECT; + case PURPLE_STATUS_AWAY: + icon_name = PIDGIN_STOCK_TRAY_AWAY; + break; + case PURPLE_STATUS_UNAVAILABLE: + icon_name = PIDGIN_STOCK_TRAY_BUSY; break; - case DOCKLET_STATUS_AVAILABLE: + case PURPLE_STATUS_EXTENDED_AWAY: + icon_name = PIDGIN_STOCK_TRAY_XA; + break; + case PURPLE_STATUS_INVISIBLE: + icon_name = PIDGIN_STOCK_TRAY_INVISIBLE; + break; + default: icon_name = PIDGIN_STOCK_TRAY_AVAILABLE; break; - case DOCKLET_STATUS_PENDING: - icon_name = PIDGIN_STOCK_TRAY_PENDING; - break; - case DOCKLET_STATUS_AWAY: - icon_name = PIDGIN_STOCK_TRAY_AWAY; - break; - case DOCKLET_STATUS_BUSY: - icon_name = PIDGIN_STOCK_TRAY_BUSY; - break; - case DOCKLET_STATUS_XA: - icon_name = PIDGIN_STOCK_TRAY_XA; - break; - case DOCKLET_STATUS_INVISIBLE: - icon_name = PIDGIN_STOCK_TRAY_INVISIBLE; - break; } + if (pending) + icon_name = PIDGIN_STOCK_TRAY_PENDING; + if (connecting) + icon_name = PIDGIN_STOCK_TRAY_CONNECT; + if(icon_name) { int icon_size; if (docklet_height < 22) @@ -132,7 +130,6 @@ gtk_image_set_from_stock(GTK_IMAGE(image), icon_name, icon_size); } - icon_status = icon; } static void @@ -141,7 +138,7 @@ if (docklet_height == widget->allocation.height) return; docklet_height = widget->allocation.height; - docklet_x11_update_icon(icon_status); + pidgin_docklet_update_icon(); } static void
--- a/pidgin/gtkdocklet.c Tue May 08 18:22:02 2007 +0000 +++ b/pidgin/gtkdocklet.c Tue May 08 18:33:11 2007 +0000 @@ -49,7 +49,9 @@ /* globals */ static struct docklet_ui_ops *ui_ops = NULL; -static DockletStatus status = DOCKLET_STATUS_OFFLINE; +static PurpleStatusPrimitive status = PURPLE_STATUS_OFFLINE; +static gboolean pending = FALSE; +static gboolean connecting = FALSE; static gboolean enable_join_chat = FALSE; static guint docklet_blinking_timer = 0; static gboolean visible = FALSE; @@ -66,21 +68,17 @@ blinked = !blinked; - switch (status) { - case DOCKLET_STATUS_PENDING: - if (blinked) { - if (ui_ops && ui_ops->blank_icon) - ui_ops->blank_icon(); - } else { - if (ui_ops && ui_ops->update_icon) - ui_ops->update_icon(status); - } - ret = TRUE; /* keep blinking */ - break; - default: - docklet_blinking_timer = 0; - blinked = FALSE; - break; + if(pending && !connecting) { + if (blinked) { + if (ui_ops && ui_ops->blank_icon) + ui_ops->blank_icon(); + } else { + pidgin_docklet_update_icon(); + } + ret = TRUE; /* keep blinking */ + } else { + docklet_blinking_timer = 0; + blinked = FALSE; } return ret; @@ -114,9 +112,8 @@ GList *convs, *l; int count; PurpleSavedStatus *saved_status; - PurpleStatusPrimitive prim; - DockletStatus newstatus = DOCKLET_STATUS_OFFLINE; - gboolean pending = FALSE, connecting = FALSE; + PurpleStatusPrimitive newstatus = PURPLE_STATUS_OFFLINE; + gboolean newpending = FALSE, newconnecting = FALSE; /* get the current savedstatus */ saved_status = purple_savedstatus_get_current(); @@ -141,7 +138,7 @@ } if (convs != NULL) { - pending = TRUE; + newpending = TRUE; /* set tooltip if messages are pending */ if (ui_ops->set_tooltip) { @@ -190,38 +187,22 @@ account_status = purple_account_get_active_status(account); if (purple_account_is_connecting(account)) - connecting = TRUE; + newconnecting = TRUE; } - prim = purple_savedstatus_get_type(saved_status); - if (pending) - newstatus = DOCKLET_STATUS_PENDING; - else if (connecting) - newstatus = DOCKLET_STATUS_CONNECTING; - else if (prim == PURPLE_STATUS_UNAVAILABLE) - newstatus = DOCKLET_STATUS_BUSY; - else if (prim == PURPLE_STATUS_AWAY) - newstatus = DOCKLET_STATUS_AWAY; - else if (prim == PURPLE_STATUS_EXTENDED_AWAY) - newstatus = DOCKLET_STATUS_XA; - else if (prim == PURPLE_STATUS_OFFLINE) - newstatus = DOCKLET_STATUS_OFFLINE; - else if (prim == PURPLE_STATUS_INVISIBLE) - newstatus = DOCKLET_STATUS_INVISIBLE; - else - newstatus = DOCKLET_STATUS_AVAILABLE; + newstatus = purple_savedstatus_get_type(saved_status); /* update the icon if we changed status */ - if (status != newstatus) { + if (status != newstatus || pending!=newpending || connecting!=newconnecting) { status = newstatus; + pending = newpending; + connecting = newconnecting; - if (ui_ops && ui_ops->update_icon) - ui_ops->update_icon(status); + pidgin_docklet_update_icon(); /* and schedule the blinker function if messages are pending */ - if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/blink") && - status == DOCKLET_STATUS_PENDING - && docklet_blinking_timer == 0) { + if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/blink") + && pending && !connecting && docklet_blinking_timer == 0) { docklet_blinking_timer = g_timeout_add(500, docklet_blink_icon, NULL); } } @@ -510,7 +491,7 @@ menuitem = gtk_menu_item_new_with_label(_("Unread Messages")); - if (status == DOCKLET_STATUS_PENDING) { + if (pending) { GtkWidget *submenu = gtk_menu_new(); GList *l = get_pending_list(0); if (l == NULL) { @@ -530,7 +511,7 @@ pidgin_separator(menu); menuitem = pidgin_new_item_from_stock(menu, _("New Message..."), PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, G_CALLBACK(pidgin_dialogs_im), NULL, 0, 0, NULL); - if (status == DOCKLET_STATUS_OFFLINE) + if (status == PURPLE_STATUS_OFFLINE) gtk_widget_set_sensitive(menuitem, FALSE); menuitem = docklet_status_submenu(); @@ -558,10 +539,6 @@ pidgin_separator(menu); - /* TODO: need a submenu to change status, this needs to "link" - * to the status in the buddy list gtkstatusbox - */ - pidgin_new_item_from_stock(menu, _("Quit"), GTK_STOCK_QUIT, G_CALLBACK(purple_core_quit), NULL, 0, 0, NULL); #ifdef _WIN32 @@ -578,11 +555,18 @@ * public api for ui_ops **************************************************************************/ void +pidgin_docklet_update_icon() +{ + if (ui_ops && ui_ops->update_icon) + ui_ops->update_icon(status, connecting, pending); +} + +void pidgin_docklet_clicked(int button_type) { switch (button_type) { case 1: - if (status == DOCKLET_STATUS_PENDING) { + if (pending) { GList *l = get_pending_list(1); if (l != NULL) { purple_conversation_present((PurpleConversation *)l->data); @@ -608,8 +592,7 @@ } visible = TRUE; docklet_update_status(); - if (ui_ops && ui_ops->update_icon) - ui_ops->update_icon(status); + pidgin_docklet_update_icon(); } void @@ -625,7 +608,7 @@ docklet_blinking_timer = 0; } visible = FALSE; - status = DOCKLET_STATUS_OFFLINE; + status = PURPLE_STATUS_OFFLINE; } }
--- a/pidgin/gtkdocklet.h Tue May 08 18:22:02 2007 +0000 +++ b/pidgin/gtkdocklet.h Tue May 08 18:33:11 2007 +0000 @@ -25,23 +25,13 @@ #ifndef _GTKDOCKLET_H_ #define _GTKDOCKLET_H_ -typedef enum -{ - DOCKLET_STATUS_OFFLINE, - DOCKLET_STATUS_AVAILABLE, - DOCKLET_STATUS_INVISIBLE, - DOCKLET_STATUS_PENDING, - DOCKLET_STATUS_AWAY, - DOCKLET_STATUS_BUSY, - DOCKLET_STATUS_XA, - DOCKLET_STATUS_CONNECTING -} DockletStatus; +#include "status.h" struct docklet_ui_ops { void (*create)(void); void (*destroy)(void); - void (*update_icon)(DockletStatus); + void (*update_icon)(PurpleStatusPrimitive, gboolean, gboolean); void (*blank_icon)(void); void (*set_tooltip)(gchar *); GtkMenuPositionFunc position_menu; @@ -49,6 +39,7 @@ /* functions in gtkdocklet.c */ +void pidgin_docklet_update_icon(void); void pidgin_docklet_clicked(int); void pidgin_docklet_embedded(void); void pidgin_docklet_remove(void);
--- a/pidgin/pidgin.h Tue May 08 18:22:02 2007 +0000 +++ b/pidgin/pidgin.h Tue May 08 18:33:11 2007 +0000 @@ -45,7 +45,8 @@ /* change this only when we have a sane upgrade path for old prefs */ #define PIDGIN_PREFS_ROOT "/pidgin" -/* Translators may want to transliterate the name. */ +/* Translators may want to transliterate the name. + It is not to be translated. */ #define PIDGIN_NAME _("Pidgin") #ifndef _WIN32
--- a/pidgin/win32/gtkdocklet-win32.c Tue May 08 18:22:02 2007 +0000 +++ b/pidgin/win32/gtkdocklet-win32.c Tue May 08 18:33:11 2007 +0000 @@ -45,7 +45,8 @@ * LOCALS */ static HWND systray_hwnd = NULL; -static HICON cached_icons[DOCKLET_STATUS_CONNECTING + 1]; +/* additional two cached_icons entries for pending and connecting icons */ +static HICON cached_icons[PURPLE_STATUS_NUM_PRIMITIVES + 2]; static GtkWidget *image = NULL; static NOTIFYICONDATA _nicon_data; @@ -466,46 +467,56 @@ Shell_NotifyIcon(NIM_DELETE, &_nicon_data); } -static void winpidgin_tray_update_icon(DockletStatus icon) { +static void winpidgin_tray_update_icon(PurpleStatusPrimitive status, + gboolean connecting, gboolean pending) { + + int icon_index; + g_return_if_fail(image != NULL); - g_return_if_fail(image != NULL); - g_return_if_fail(icon < (sizeof(cached_icons) / sizeof(HICON))); + if(connecting) + icon_index = PURPLE_STATUS_NUM_PRIMITIVES; + else if(pending) + icon_index = PURPLE_STATUS_NUM_PRIMITIVES+1; + else + icon_index = status; + + g_return_if_fail(icon_index < (sizeof(cached_icons) / sizeof(HICON))); /* Look up and cache the HICON if we don't already have it */ - if (cached_icons[icon] == NULL) { + if (cached_icons[icon_index] == NULL) { const gchar *icon_name = NULL; - switch (icon) { - case DOCKLET_STATUS_OFFLINE: - icon_name = PIDGIN_STOCK_TRAY_OFFLINE; - break; - case DOCKLET_STATUS_CONNECTING: - icon_name = PIDGIN_STOCK_TRAY_CONNECT; - break; - case DOCKLET_STATUS_AVAILABLE: - icon_name = PIDGIN_STOCK_TRAY_AVAILABLE; - break; - case DOCKLET_STATUS_PENDING: - icon_name = PIDGIN_STOCK_TRAY_PENDING; - break; - case DOCKLET_STATUS_AWAY: - icon_name = PIDGIN_STOCK_TRAY_AWAY; - break; - case DOCKLET_STATUS_BUSY: - icon_name = PIDGIN_STOCK_TRAY_BUSY; - break; - case DOCKLET_STATUS_XA: - icon_name = PIDGIN_STOCK_TRAY_XA; - break; - case DOCKLET_STATUS_INVISIBLE: - icon_name = PIDGIN_STOCK_TRAY_INVISIBLE; + switch (status) { + case PURPLE_STATUS_OFFLINE: + icon_name = PIDGIN_STOCK_TRAY_OFFLINE; + break; + case PURPLE_STATUS_AWAY: + icon_name = PIDGIN_STOCK_TRAY_AWAY; + break; + case PURPLE_STATUS_UNAVAILABLE: + icon_name = PIDGIN_STOCK_TRAY_BUSY; + break; + case PURPLE_STATUS_EXTENDED_AWAY: + icon_name = PIDGIN_STOCK_TRAY_XA; + break; + case PURPLE_STATUS_INVISIBLE: + icon_name = PIDGIN_STOCK_TRAY_INVISIBLE; + break; + default: + icon_name = PIDGIN_STOCK_TRAY_AVAILABLE; + break; } + if (pending) + icon_name = PIDGIN_STOCK_TRAY_PENDING; + if (connecting) + icon_name = PIDGIN_STOCK_TRAY_CONNECT; + g_return_if_fail(icon_name != NULL); - cached_icons[icon] = load_hicon_from_stock(icon_name); + cached_icons[icon_index] = load_hicon_from_stock(icon_name); } - systray_change_icon(cached_icons[icon]); + systray_change_icon(cached_icons[icon_index]); } static void winpidgin_tray_blank_icon() { @@ -557,21 +568,21 @@ * That is why we use custom 4-bit icons for pre XP Windowses */ if (osinfo.dwMajorVersion < 5 || (osinfo.dwMajorVersion == 5 && osinfo.dwMinorVersion == 0)) { - cached_icons[DOCKLET_STATUS_OFFLINE] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_OFFLINE] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_OFFLINE_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); - cached_icons[DOCKLET_STATUS_AVAILABLE] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_AVAILABLE] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_AVAILABLE_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); - cached_icons[DOCKLET_STATUS_AWAY] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_AWAY] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_AWAY_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); - cached_icons[DOCKLET_STATUS_XA] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_EXTENDED_AWAY] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_XA_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); - cached_icons[DOCKLET_STATUS_BUSY] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_UNAVAILABLE] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_BUSY_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); - cached_icons[DOCKLET_STATUS_CONNECTING] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_NUM_PRIMITIVES] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_CONNECTING_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); - cached_icons[DOCKLET_STATUS_PENDING] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_NUM_PRIMITIVES+1] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_PENDING_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); - cached_icons[DOCKLET_STATUS_INVISIBLE] = (HICON) LoadImage(winpidgin_dll_hinstance(), + cached_icons[PURPLE_STATUS_INVISIBLE] = (HICON) LoadImage(winpidgin_dll_hinstance(), MAKEINTRESOURCE(PIDGIN_TRAY_INVISIBLE_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION); }