# HG changeset patch # User Yoshiki Yazawa # Date 1267683579 -32400 # Node ID 10c2702ecfff4183be9d5a31b356305d5377e1ab # Parent f5d753b3d01da9ad07d269806f2bada6ca42235a# Parent d4c887b0cb437e335a52f7cc2d10e96f64fc80b2 merged with im.pidgin.pidgin diff -r f5d753b3d01d -r 10c2702ecfff libpurple/protocols/jabber/usermood.c --- a/libpurple/protocols/jabber/usermood.c Wed Mar 03 01:13:44 2010 +0900 +++ b/libpurple/protocols/jabber/usermood.c Thu Mar 04 15:19:39 2010 +0900 @@ -119,10 +119,6 @@ {NULL, NULL, NULL} }; -static PurpleMood empty_moods[] = { - {NULL, NULL, NULL} -}; - static void jabber_mood_cb(JabberStream *js, const char *from, xmlnode *items) { /* it doesn't make sense to have more than one item here, so let's just pick the first one */ xmlnode *item = xmlnode_get_child(items, "item"); @@ -268,6 +264,6 @@ return moods; } else { purple_debug_info("jabber", "get_moods: account doesn't support PEP\n"); - return empty_moods; + return NULL; } } \ No newline at end of file diff -r f5d753b3d01d -r 10c2702ecfff libpurple/prpl.h --- a/libpurple/prpl.h Wed Mar 03 01:13:44 2010 +0900 +++ b/libpurple/prpl.h Thu Mar 04 15:19:39 2010 +0900 @@ -572,7 +572,8 @@ /** * Returns an array of "PurpleMood"s, with the last one having - * "mood" set to @c NULL. + * "mood" set to @c NULL, or NULL if the account does not support setting + * a mood. */ PurpleMood *(*get_moods)(PurpleAccount *account); }; diff -r f5d753b3d01d -r 10c2702ecfff pidgin/gtkblist.c --- a/pidgin/gtkblist.c Wed Mar 03 01:13:44 2010 +0900 +++ b/pidgin/gtkblist.c Thu Mar 04 15:19:39 2010 +0900 @@ -8022,8 +8022,10 @@ if (prpl_info && (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) || PURPLE_PLUGIN_HAS_ACTIONS(plugin))) { - if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods)) { + if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) && + prpl_info->get_moods(account) != NULL) { GList *types; + for (types = purple_account_get_status_types(account); types != NULL ; types = types->next) { PurpleStatusType *type = types->data; diff -r f5d753b3d01d -r 10c2702ecfff pidgin/win32/winpidgin.c --- a/pidgin/win32/winpidgin.c Wed Mar 03 01:13:44 2010 +0900 +++ b/pidgin/win32/winpidgin.c Thu Mar 04 15:19:39 2010 +0900 @@ -97,7 +97,7 @@ return ret; } -static void common_dll_prep(const TCHAR *path) { +static BOOL common_dll_prep(const TCHAR *path) { HMODULE hmod; HKEY hkey; struct _stat stat_buf; @@ -110,7 +110,7 @@ if (_tstat(test_path, &stat_buf) != 0) { printf("Unable to determine GTK+ path. \n" "Assuming GTK+ is in the PATH.\n"); - return; + return FALSE; } @@ -184,6 +184,8 @@ printf("SafeDllSearchMode is set to 0\n"); }/*end else*/ } + + return TRUE; } static void portable_mode_dll_prep(const TCHAR *pidgin_dir) { @@ -224,22 +226,23 @@ _tprintf(_T("%s\n"), path2); _tputenv(path2); - /* set the GTK+ path to be \\path\to\GTK\bin */ - _tcscat(path, _T("\\GTK\\bin")); - - common_dll_prep(path); + if (!dll_prep(pidgin_dir)) { + /* set the GTK+ path to be \\path\to\GTK\bin */ + _tcscat(path, _T("\\GTK\\bin")); + common_dll_prep(path); + } } -static void dll_prep(const TCHAR *pidgin_dir) { - TCHAR gtk_path[MAX_PATH + 1]; - gtk_path[0] = _T('\0'); +static BOOL dll_prep(const TCHAR *pidgin_dir) { + TCHAR path[MAX_PATH + 1]; + path[0] = _T('\0'); if (*pidgin_dir) { - _sntprintf(gtk_path, sizeof(gtk_path) / sizeof(TCHAR), _T("%s\\Gtk\\bin"), pidgin_dir); - gtk_path[sizeof(gtk_path) / sizeof(TCHAR)] = _T('\0'); + _sntprintf(path, sizeof(path) / sizeof(TCHAR), _T("%s\\Gtk\\bin"), pidgin_dir); + path[sizeof(path) / sizeof(TCHAR)] = _T('\0'); } - common_dll_prep(gtk_path); + return common_dll_prep(path); } static TCHAR* winpidgin_lcid_to_posix(LCID lcid) {