summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Laager <rlaager@pidgin.im>2008-12-01 23:36:00 +0000
committerRichard Laager <rlaager@pidgin.im>2008-12-01 23:36:00 +0000
commit1238515692b60565d7dfe27c38d33c03b00dd500 (patch)
treeb1648346894d5c8542b9e483d6a9bbf1c1d02ad7
parent035d456ae31c5d38258e1d125fd86d452dfe6273 (diff)
parent3f45fbcddb0eb18b3f45a3320c448fb053a1d57d (diff)
downloadpidgin-1238515692b60565d7dfe27c38d33c03b00dd500.tar.gz
Propagated im.pidgin.pidgin to im.pidgin.cpw.rekkanoryo.icqxstatus and
merged the smiley theme changes together.
-rw-r--r--COPYRIGHT2
-rw-r--r--ChangeLog22
-rw-r--r--Makefile.am2
-rw-r--r--finch/gntdebug.c1
-rw-r--r--finch/libgnt/Makefile.am2
-rw-r--r--finch/libgnt/gntbindable.c6
-rw-r--r--finch/libgnt/gntcolors.c8
-rw-r--r--finch/libgnt/gntentry.c4
-rw-r--r--finch/libgnt/gntfilesel.c8
-rw-r--r--finch/libgnt/gntinternal.h33
-rw-r--r--finch/libgnt/gntkeys.c4
-rw-r--r--finch/libgnt/gntmain.c6
-rw-r--r--finch/libgnt/gntstyle.c24
-rw-r--r--finch/libgnt/gnttextview.c18
-rw-r--r--finch/libgnt/gntutils.c6
-rw-r--r--finch/libgnt/gntwm.c20
-rw-r--r--libpurple/protocols/gg/buddylist.c38
-rw-r--r--libpurple/protocols/jabber/auth.c4
-rw-r--r--libpurple/protocols/jabber/buddy.c27
-rw-r--r--libpurple/protocols/jabber/jabber.c63
-rw-r--r--libpurple/protocols/jabber/libxmpp.c2
-rw-r--r--libpurple/protocols/jabber/pep.c2
-rw-r--r--libpurple/protocols/jabber/presence.c2
-rw-r--r--libpurple/protocols/jabber/si.c2
-rw-r--r--libpurple/protocols/myspace/README3
-rw-r--r--libpurple/protocols/myspace/message.c7
-rw-r--r--libpurple/protocols/qq/qq_network.c4
-rw-r--r--libpurple/protocols/sametime/sametime.c2
-rw-r--r--libpurple/protocols/yahoo/yahoochat.c8
-rwxr-xr-xlibpurple/purple-remote4
-rw-r--r--libpurple/request.c2
-rw-r--r--libpurple/roomlist.c5
-rw-r--r--pidgin/Makefile.am1
-rw-r--r--pidgin/gtkblist.c8
-rw-r--r--pidgin/gtkconv.c12
-rw-r--r--pidgin/gtknotify.c9
-rw-r--r--pidgin/gtkrequest.c9
-rw-r--r--pidgin/gtksavedstatuses.c3
-rw-r--r--pidgin/pidginstock.c2
-rw-r--r--pidgin/pixmaps/Makefile.am7
-rw-r--r--pidgin/pixmaps/emotes/default/24/default.theme.in71
-rw-r--r--pidgin/pixmaps/emotes/small/16/small.theme.in38
-rw-r--r--pidgin/pixmaps/status/11/rtl/log-in.pngbin0 -> 456 bytes
-rw-r--r--pidgin/pixmaps/status/11/rtl/log-out.pngbin0 -> 479 bytes
-rw-r--r--pidgin/pixmaps/status/48/invisible.pngbin0 -> 4155 bytes
-rw-r--r--pidgin/pixmaps/status/48/log-in.pngbin2014 -> 3095 bytes
-rw-r--r--pidgin/pixmaps/status/48/log-out.pngbin1826 -> 2829 bytes
-rw-r--r--pidgin/pixmaps/status/48/rtl/log-in.png (renamed from pidgin/pixmaps/status/48/rtl/login.png)bin2023 -> 2023 bytes
-rw-r--r--pidgin/pixmaps/status/48/rtl/log-out.png (renamed from pidgin/pixmaps/status/48/rtl/logout.png)bin1893 -> 1893 bytes
-rw-r--r--pidgin/plugins/history.c7
50 files changed, 318 insertions, 190 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
index d02a524903..b81944517e 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -340,6 +340,7 @@ Tim Ringenbach
Dennis Ristuccia
Lee Roach
Eion Robb
+Kahlil Robinson
Rhett Robinson
Luciano Miguel Ferreira Rocha
Andrew Rodland
@@ -351,6 +352,7 @@ Peter Ruibal
Michael Ruprecht
Sam S.
Thanumalayan S.
+Jonathan Sailor
Elliott Sales de Andrade
Tomasz Sałaciński <tsalacinski@gmail.com>
Pradyumna Sampath
diff --git a/ChangeLog b/ChangeLog
index 5dfb361427..49d3291f30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,13 +8,33 @@ version 2.5.3 (??/??/????):
--with-system-ssl-certs and GnuTLS need to include these in the
system certs directory.
* Corrected maximum message lengths for Yahoo!
- * Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki)
* Enable auto-reply on Zephyr, to emulate 'zaway' (Toby Schaffer)
* The Buddy State Notification plugin no longer prints duplicate
notifications when the same buddy is in multiple groups (Florian Quèze)
* The Buddy State Notification plugin no longer turns JID's, MSN Passport
ID's, etc. into links (Florian Quèze)
* Fix a crash in SIMPLE when a malformed message is received.
+ * purple-remote now has a "getstatusmessage" command to retrieve the text
+ of the current status message.
+
+ Gadu-Gadu:
+ * Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki)
+ * Gadu-Gadu now validates that UID's are valid (Adam Strzelecki)
+ * Gadu-Gadu now does proper charset translations where needed (Adam
+ Strzelecki)
+
+ XMPP:
+ * Fix the namespace URL we look for in PEP reply stanzas to match the URL
+ used in the 'get' requests (Paul Aurich)
+ * Resources can be set to the local machine's hostname by using
+ __HOSTNAME__ as the resource string (Jonathan Sailor)
+ * Resources can now be left blank, causing the server to generate a
+ resource for us where supported (Jonathan Sailor)
+ * Resources now default to no value
+ * Quit trying to get user info for MUC's (Paul Aurich)
+ * Send "client-accepts-full-bind-result" attribute during SASL login.
+ This will fix Google Talk login failures if the user configures the
+ wrong domain for his/her account.
Pidgin:
* On GTK+ 2.14 and higher, we're using the gtk-tooltip-delay setting
diff --git a/Makefile.am b/Makefile.am
index 11f87db6b0..202f346df5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,7 +59,7 @@ version-check: commit-check
# Ensure we're working from a tag...
test x`mtn automate select t:v$(PACKAGE_VERSION)` = x`mtn automate get_base_revision_id`
# ... and have no changes in the working copy.
- test x`mtn diff | grep -v '^#'` = x
+ test "x`mtn diff | grep -v '^#'`" = x
release: version-check distcheck packages
diff --git a/finch/gntdebug.c b/finch/gntdebug.c
index 158a9120b8..a43db72234 100644
--- a/finch/gntdebug.c
+++ b/finch/gntdebug.c
@@ -344,6 +344,7 @@ void finch_debug_init()
REGISTER_G_LOG_HANDLER("GModule");
REGISTER_G_LOG_HANDLER("GLib-GObject");
REGISTER_G_LOG_HANDLER("GThread");
+ REGISTER_G_LOG_HANDLER("Gnt");
#ifdef USE_GSTREAMER
REGISTER_G_LOG_HANDLER("GStreamer");
#endif
diff --git a/finch/libgnt/Makefile.am b/finch/libgnt/Makefile.am
index af061dcc01..99b6d4566b 100644
--- a/finch/libgnt/Makefile.am
+++ b/finch/libgnt/Makefile.am
@@ -6,6 +6,8 @@ pkgconfig_DATA = gnt.pc
lib_LTLIBRARIES = libgnt.la
+noinst_HEADERS = gntinternal.h
+
BUILT_SOURCES = gntmarshal.h
libgnt_la_SOURCES = \
diff --git a/finch/libgnt/gntbindable.c b/finch/libgnt/gntbindable.c
index c2be911a6b..0abad65f82 100644
--- a/finch/libgnt/gntbindable.c
+++ b/finch/libgnt/gntbindable.c
@@ -22,6 +22,10 @@
#include <string.h>
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "Bindable"
+
#include "gntbindable.h"
#include "gntstyle.h"
#include "gnt.h"
@@ -360,7 +364,7 @@ register_binding(GntBindableClass *klass, const char *name, const char *trigger,
action = g_hash_table_lookup(klass->actions, name);
if (!action) {
- g_printerr("GntBindable: Invalid action name %s for %s\n",
+ gnt_warning("Invalid action name %s for %s",
name, g_type_name(G_OBJECT_CLASS_TYPE(klass)));
if (list)
g_list_free(list);
diff --git a/finch/libgnt/gntcolors.c b/finch/libgnt/gntcolors.c
index 64401d78f9..b8364e38a7 100644
--- a/finch/libgnt/gntcolors.c
+++ b/finch/libgnt/gntcolors.c
@@ -24,6 +24,10 @@
#include <ncurses.h>
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "Colors"
+
#include "gntcolors.h"
#include "gntstyle.h"
@@ -182,7 +186,7 @@ void gnt_colors_parse(GKeyFile *kfile)
if (error)
{
- g_printerr("GntColors: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
error = NULL;
}
@@ -226,7 +230,7 @@ void gnt_color_pairs_parse(GKeyFile *kfile)
if (error)
{
- g_printerr("GntColors: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
return;
}
diff --git a/finch/libgnt/gntentry.c b/finch/libgnt/gntentry.c
index 60f0d6ab51..6395ad3a13 100644
--- a/finch/libgnt/gntentry.c
+++ b/finch/libgnt/gntentry.c
@@ -365,7 +365,7 @@ backspace(GntBindable *bind, GList *null)
return TRUE;
len = entry->cursor - g_utf8_find_prev_char(entry->start, entry->cursor);
- update_kill_ring(entry, ENTRY_DEL_BWD_CHAR, entry->cursor, -len);
+ update_kill_ring(entry, ENTRY_JAIL, entry->cursor, -len);
entry->cursor -= len;
memmove(entry->cursor, entry->cursor + len, entry->end - entry->cursor);
@@ -391,7 +391,7 @@ delkey(GntBindable *bind, GList *null)
return FALSE;
len = g_utf8_find_next_char(entry->cursor, NULL) - entry->cursor;
- update_kill_ring(entry, ENTRY_DEL_FWD_CHAR, entry->cursor, len);
+ update_kill_ring(entry, ENTRY_JAIL, entry->cursor, len);
memmove(entry->cursor, entry->cursor + len, entry->end - entry->cursor - len + 1);
entry->end -= len;
entry_redraw(GNT_WIDGET(entry));
diff --git a/finch/libgnt/gntfilesel.c b/finch/libgnt/gntfilesel.c
index 01bbdf7fd0..7187315667 100644
--- a/finch/libgnt/gntfilesel.c
+++ b/finch/libgnt/gntfilesel.c
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "FileSel"
+
#include "gntbutton.h"
#include "gntentry.h"
#include "gntfilesel.h"
@@ -254,7 +258,7 @@ local_read_fn(const char *path, GList **files, GError **error)
struct stat st;
if (stat(fp, &st)) {
- g_printerr("Error stating location %s\n", fp);
+ gnt_warning("Error stating location %s", fp);
} else {
if (S_ISDIR(st.st_mode)) {
file = gnt_file_new_dir(str);
@@ -309,7 +313,7 @@ location_changed(GntFileSel *sel, GError **err)
success = local_read_fn(sel->current, &files, err);
if (!success || *err) {
- g_printerr("GntFileSel: error opening location %s (%s)\n",
+ gnt_warning("error opening location %s (%s)",
sel->current, *err ? (*err)->message : "reason unknown");
return FALSE;
}
diff --git a/finch/libgnt/gntinternal.h b/finch/libgnt/gntinternal.h
new file mode 100644
index 0000000000..813eae4998
--- /dev/null
+++ b/finch/libgnt/gntinternal.h
@@ -0,0 +1,33 @@
+/*
+ * GNT - The GLib Ncurses Toolkit
+ *
+ * GNT 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 library 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
+ */
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "Gnt"
+
+#ifdef __GNUC__
+# ifndef GNT_LOG_DOMAIN
+# define GNT_LOG_DOMAIN ""
+# endif
+# define gnt_warning(format, args...) g_warning("(%s) %s: " format, GNT_LOG_DOMAIN, __PRETTY_FUNCTION__, args)
+#else /* __GNUC__ */
+# define gnt_warning g_warning
+#endif
+
diff --git a/finch/libgnt/gntkeys.c b/finch/libgnt/gntkeys.c
index b4c22ad1d5..ddb9e4aa25 100644
--- a/finch/libgnt/gntkeys.c
+++ b/finch/libgnt/gntkeys.c
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "Keys"
+
#include "gntkeys.h"
#include <glib.h>
diff --git a/finch/libgnt/gntmain.c b/finch/libgnt/gntmain.c
index e72b6104eb..2fe2b598c7 100644
--- a/finch/libgnt/gntmain.c
+++ b/finch/libgnt/gntmain.c
@@ -32,6 +32,10 @@
#include <sys/types.h>
#include <sys/wait.h>
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "Main"
+
#include "gnt.h"
#include "gntbox.h"
#include "gntbutton.h"
@@ -319,7 +323,7 @@ setup_io()
But irssi does this, so I am going to assume the
crashes were caused by some other stuff. */
- g_printerr("gntmain: setting up IO (%d)\n", channel_read_callback);
+ gnt_warning("setting up IO (%d)", channel_read_callback);
}
static gboolean
diff --git a/finch/libgnt/gntstyle.c b/finch/libgnt/gntstyle.c
index d911bd7e60..e3153216a8 100644
--- a/finch/libgnt/gntstyle.c
+++ b/finch/libgnt/gntstyle.c
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "Style"
+
#include "gntstyle.h"
#include "gntcolors.h"
#include "gntws.h"
@@ -226,7 +230,7 @@ void gnt_style_read_actions(GType type, GntBindableClass *klass)
keys = g_key_file_get_keys(gkfile, name, &len, &error);
if (error)
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
g_free(name);
return;
@@ -241,7 +245,7 @@ void gnt_style_read_actions(GType type, GntBindableClass *klass)
if (error)
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
error = NULL;
}
@@ -249,7 +253,7 @@ void gnt_style_read_actions(GType type, GntBindableClass *klass)
{
const char *keycode = parse_key(key);
if (keycode == NULL) {
- g_printerr("GntStyle: Invalid key-binding %s\n", key);
+ gnt_warning("Invalid key-binding %s", key);
} else {
gnt_bindable_register_binding(klass, action, keycode, NULL);
}
@@ -280,7 +284,7 @@ gboolean gnt_style_read_menu_accels(const char *name, GHashTable *table)
keys = g_key_file_get_keys(gkfile, kname, &len, &error);
if (error)
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
g_free(kname);
return ret;
@@ -295,7 +299,7 @@ gboolean gnt_style_read_menu_accels(const char *name, GHashTable *table)
if (error)
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
error = NULL;
}
@@ -303,7 +307,7 @@ gboolean gnt_style_read_menu_accels(const char *name, GHashTable *table)
{
const char *keycode = parse_key(key);
if (keycode == NULL) {
- g_printerr("GntStyle: Invalid key-binding %s\n", key);
+ gnt_warning("Invalid key-binding %s", key);
} else {
ret = TRUE;
g_hash_table_replace(table, g_strdup(keycode), menuid);
@@ -338,7 +342,7 @@ void gnt_styles_get_keyremaps(GType type, GHashTable *hash)
keys = g_key_file_get_keys(gkfile, name, &len, &error);
if (error)
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
g_free(name);
return;
@@ -353,7 +357,7 @@ void gnt_styles_get_keyremaps(GType type, GHashTable *hash)
if (error)
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
error = NULL;
g_free(key);
@@ -402,7 +406,7 @@ read_general_style(GKeyFile *kfile)
if (error)
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
}
else
@@ -426,7 +430,7 @@ void gnt_style_read_configure_file(const char *filename)
if (!g_key_file_load_from_file(gkfile, filename,
G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &error))
{
- g_printerr("GntStyle: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
return;
}
diff --git a/finch/libgnt/gnttextview.c b/finch/libgnt/gnttextview.c
index 60ffdc7ebf..1991a08afb 100644
--- a/finch/libgnt/gnttextview.c
+++ b/finch/libgnt/gnttextview.c
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "TextView"
+
#include "gntstyle.h"
#include "gnttextview.h"
#include "gntutils.h"
@@ -67,6 +71,7 @@ static void
gnt_text_view_draw(GntWidget *widget)
{
GntTextView *view = GNT_TEXT_VIEW(widget);
+ int n;
int i = 0;
GList *lines;
int rows, scrcol;
@@ -76,10 +81,11 @@ gnt_text_view_draw(GntWidget *widget)
wbkgd(widget->window, gnt_color_pair(GNT_COLOR_NORMAL));
werase(widget->window);
+ n = g_list_length(view->list);
if ((view->flags & GNT_TEXT_VIEW_TOP_ALIGN) &&
- g_list_length(view->list) < widget->priv.height) {
+ n < widget->priv.height) {
GList *now = view->list;
- comp = widget->priv.height - g_list_length(view->list);
+ comp = widget->priv.height - n;
view->list = g_list_nth_prev(view->list, comp);
if (!view->list) {
view->list = g_list_first(now);
@@ -236,6 +242,7 @@ gnt_text_view_destroy(GntWidget *widget)
static char *
gnt_text_view_get_p(GntTextView *view, int x, int y)
{
+ int n;
int i = 0;
GntWidget *wid = GNT_WIDGET(view);
GntTextLine *line;
@@ -244,10 +251,11 @@ gnt_text_view_get_p(GntTextView *view, int x, int y)
GntTextSegment *seg;
gchar *pos;
+ n = g_list_length(view->list);
y = wid->priv.height - y;
- if (g_list_length(view->list) < y) {
+ if (n < y) {
x = 0;
- y = g_list_length(view->list) - 1;
+ y = n - 1;
}
lines = g_list_nth(view->list, y - 1);
@@ -776,7 +784,7 @@ int gnt_text_view_tag_change(GntTextView *view, const char *name, const char *te
/* XXX: Make things work if the tagged text spans over several lines. */
} else {
/* XXX: handle the rest of the conditions */
- g_printerr("WTF! This needs to be handled properly!!\n");
+ gnt_warning("WTF! This needs to be handled properly!!%s", "");
}
}
}
diff --git a/finch/libgnt/gntutils.c b/finch/libgnt/gntutils.c
index 549a38dfbf..c6712a15dc 100644
--- a/finch/libgnt/gntutils.c
+++ b/finch/libgnt/gntutils.c
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "Utils"
+
#include "gntbutton.h"
#include "gntcheckbox.h"
#include "gntcombobox.h"
@@ -306,7 +310,7 @@ gnt_widget_from_xmlnode(xmlNode *node, GntWidget **data[], int max)
xmlFree(content);
if (widget == NULL) {
- g_printerr("Invalid widget name %s\n", name);
+ gnt_warning("Invalid widget name %s", name);
return NULL;
}
diff --git a/finch/libgnt/gntwm.c b/finch/libgnt/gntwm.c
index a4ba43bcd3..e87d2756c6 100644
--- a/finch/libgnt/gntwm.c
+++ b/finch/libgnt/gntwm.c
@@ -46,6 +46,10 @@
#include <string.h>
#include <time.h>
+#include "gntinternal.h"
+#undef GNT_LOG_DOMAIN
+#define GNT_LOG_DOMAIN "WM"
+
#include "gntwm.h"
#include "gntstyle.h"
#include "gntmarshal.h"
@@ -201,7 +205,7 @@ update_act_msg(void)
GString *text = g_string_new("act: ");
if (message)
gnt_widget_destroy(message);
- if (g_list_length(act) == 0)
+ if (!act)
return;
for (iter = act; iter; iter = iter->next) {
GntWS *ws = iter->data;
@@ -325,7 +329,7 @@ read_window_positions(GntWM *wm)
gsize nk;
if (!g_key_file_load_from_file(gfile, filename, G_KEY_FILE_NONE, &error)) {
- g_printerr("GntWM: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
g_free(filename);
return;
@@ -333,7 +337,7 @@ read_window_positions(GntWM *wm)
keys = g_key_file_get_keys(gfile, "positions", &nk, &error);
if (error) {
- g_printerr("GntWM: %s\n", error->message);
+ gnt_warning("%s", error->message);
g_error_free(error);
error = NULL;
} else {
@@ -349,7 +353,7 @@ read_window_positions(GntWM *wm)
p->y = y;
g_hash_table_replace(wm->positions, g_strdup(title + 1), p);
} else {
- g_printerr("GntWM: Invalid number of arguments for positioing a window.\n");
+ gnt_warning("Invalid number of arguments (%d) for positioning a window.", l);
}
g_strfreev(coords);
}
@@ -927,6 +931,7 @@ list_actions(GntBindable *bindable, GList *null)
GntWidget *tree, *win;
GList *iter;
GntWM *wm = GNT_WM(bindable);
+ int n;
if (wm->_list.window || wm->menu)
return TRUE;
@@ -950,8 +955,9 @@ list_actions(GntBindable *bindable, GList *null)
gnt_tree_create_row(GNT_TREE(tree), action->label), NULL);
}
g_signal_connect(G_OBJECT(tree), "activate", G_CALLBACK(action_list_activate), wm);
- gnt_widget_set_size(tree, 0, g_list_length(wm->acts));
- gnt_widget_set_position(win, 0, getmaxy(stdscr) - 3 - g_list_length(wm->acts));
+ n = g_list_length(wm->acts);
+ gnt_widget_set_size(tree, 0, n);
+ gnt_widget_set_position(win, 0, getmaxy(stdscr) - 3 - n);
gnt_widget_show(win);
return TRUE;
@@ -2093,7 +2099,7 @@ write_already(gpointer data)
file = fopen(filename, "wb");
if (file == NULL) {
- g_printerr("GntWM: error opening file to save positions\n");
+ gnt_warning("error opening file (%s) to save positions", filename);
} else {
fprintf(file, "[positions]\n");
g_hash_table_foreach(wm->positions, write_gdi, file);
diff --git a/libpurple/protocols/gg/buddylist.c b/libpurple/protocols/gg/buddylist.c
index 9794e14b1f..9fff6ce96b 100644
--- a/libpurple/protocols/gg/buddylist.c
+++ b/libpurple/protocols/gg/buddylist.c
@@ -96,9 +96,10 @@ void ggp_buddylist_load(PurpleConnection *gc, char *buddylist)
PurpleGroup *group;
gchar **users_tbl;
int i;
+ char *utf8buddylist = charset_convert(buddylist, "CP1250", "UTF-8");
/* Don't limit the number of records in a buddylist. */
- users_tbl = g_strsplit(buddylist, "\r\n", -1);
+ users_tbl = g_strsplit(utf8buddylist, "\r\n", -1);
for (i = 0; users_tbl[i] != NULL; i++) {
gchar **data_tbl;
@@ -115,23 +116,22 @@ void ggp_buddylist_load(PurpleConnection *gc, char *buddylist)
continue;
}
- show = charset_convert(data_tbl[F_NICKNAME], "CP1250", "UTF-8");
+ show = data_tbl[F_NICKNAME];
name = data_tbl[F_UIN];
- if ('\0' == *name) {
+ if ('\0' == *name || !atol(name)) {
purple_debug_warning("gg",
- "Something is wrong on line %d of the buddylist. Skipping.\n",
+ "Identifier on line %d of the buddylist is not a number. Skipping.\n",
i + 1);
continue;
}
if ('\0' == *show) {
- show = g_strdup(name);
+ show = name;
}
purple_debug_info("gg", "got buddy: name=%s; show=%s\n", name, show);
if (purple_find_buddy(purple_connection_get_account(gc), name)) {
- g_free(show);
g_strfreev(data_tbl);
continue;
}
@@ -144,7 +144,7 @@ void ggp_buddylist_load(PurpleConnection *gc, char *buddylist)
gchar **group_tbl = g_strsplit(data_tbl[F_GROUP], ",", 50);
if (ggp_array_size(group_tbl) > 0) {
g_free(g);
- g = charset_convert(group_tbl[0], "CP1250", "UTF-8");
+ g = g_strdup(group_tbl[0]);
}
g_strfreev(group_tbl);
}
@@ -160,10 +160,10 @@ void ggp_buddylist_load(PurpleConnection *gc, char *buddylist)
purple_blist_add_buddy(buddy, NULL, group, NULL);
g_free(g);
- g_free(show);
g_strfreev(data_tbl);
}
g_strfreev(users_tbl);
+ g_free(utf8buddylist);
ggp_buddylist_send(gc);
}
@@ -234,8 +234,7 @@ char *ggp_buddylist_dump(PurpleAccount *account)
continue;
for (bnode = cnode->child; bnode != NULL; bnode = bnode->next) {
- gchar *newdata, *name, *alias, *gname;
- gchar *cp_alias, *cp_gname;
+ gchar *name, *alias, *gname;
if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
continue;
@@ -248,25 +247,20 @@ char *ggp_buddylist_dump(PurpleAccount *account)
alias = buddy->alias ? buddy->alias : buddy->name;
gname = group->name;
- cp_gname = charset_convert(gname, "UTF-8", "CP1250");
- cp_alias = charset_convert(alias, "UTF-8", "CP1250");
- newdata = g_strdup_printf(
- "%s;%s;%s;%s;%s;%s;%s;%s%s\r\n",
- cp_alias, cp_alias, cp_alias, cp_alias,
- "", cp_gname, name, "", "");
-
ptr = buddylist;
- buddylist = g_strconcat(ptr, newdata, NULL);
+ buddylist = g_strdup_printf(
+ "%s%s;%s;%s;%s;%s;%s;%s;%s%s\r\n",
+ ptr, alias, alias, alias, alias,
+ "", gname, name, "", "");
- g_free(newdata);
g_free(ptr);
- g_free(cp_gname);
- g_free(cp_alias);
}
}
}
- return buddylist;
+ ptr = charset_convert(buddylist, "UTF-8", "CP1250");
+ g_free(buddylist);
+ return ptr;
}
/* }}} */
diff --git a/libpurple/protocols/jabber/auth.c b/libpurple/protocols/jabber/auth.c
index 664f11d927..b4b35a3925 100644
--- a/libpurple/protocols/jabber/auth.c
+++ b/libpurple/protocols/jabber/auth.c
@@ -397,6 +397,10 @@ static void jabber_auth_start_cyrus(JabberStream *js)
auth = xmlnode_new("auth");
xmlnode_set_namespace(auth, "urn:ietf:params:xml:ns:xmpp-sasl");
xmlnode_set_attrib(auth, "mechanism", js->current_mech);
+
+ xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
+ xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+
if (clientout) {
if (coutlen == 0) {
xmlnode_insert_data(auth, "=", -1);
diff --git a/libpurple/protocols/jabber/buddy.c b/libpurple/protocols/jabber/buddy.c
index d9b3211580..d8078835d3 100644
--- a/libpurple/protocols/jabber/buddy.c
+++ b/libpurple/protocols/jabber/buddy.c
@@ -115,14 +115,18 @@ JabberBuddyResource *jabber_buddy_find_resource(JabberBuddy *jb,
break;
case JABBER_BUDDY_STATE_AWAY:
case JABBER_BUDDY_STATE_DND:
- case JABBER_BUDDY_STATE_UNAVAILABLE:
- /* This resource is away/dnd/unavailable. Prefer to one which is extended away or unknown. */
- if ((jbr->state == JABBER_BUDDY_STATE_XA) ||
+ /* This resource is away/dnd. Prefer to one which is extended away, unavailable, or unknown. */
+ if ((jbr->state == JABBER_BUDDY_STATE_XA) || (jbr->state == JABBER_BUDDY_STATE_UNAVAILABLE) ||
(jbr->state == JABBER_BUDDY_STATE_UNKNOWN) || (jbr->state == JABBER_BUDDY_STATE_ERROR))
jbr = l->data;
break;
case JABBER_BUDDY_STATE_XA:
- /* This resource is extended away. That's better than unknown. */
+ /* This resource is extended away. That's better than unavailable or unknown. */
+ if ((jbr->state == JABBER_BUDDY_STATE_UNAVAILABLE) || (jbr->state == JABBER_BUDDY_STATE_UNKNOWN) || (jbr->state == JABBER_BUDDY_STATE_ERROR))
+ jbr = l->data;
+ break;
+ case JABBER_BUDDY_STATE_UNAVAILABLE:
+ /* This resource is unavailable. That's better than unknown. */
if ((jbr->state == JABBER_BUDDY_STATE_UNKNOWN) || (jbr->state == JABBER_BUDDY_STATE_ERROR))
jbr = l->data;
break;
@@ -966,7 +970,7 @@ static void jabber_buddy_info_show_if_ready(JabberBuddyInfo *jbi)
}
#endif
} else {
- gboolean multiple_resources = jbi->jb->resources && (g_list_length(jbi->jb->resources) > 1);
+ gboolean multiple_resources = jbi->jb->resources && jbi->jb->resources->next;
for(resources = jbi->jb->resources; resources; resources = resources->next) {
char *purdy = NULL;
@@ -1798,12 +1802,21 @@ static void jabber_buddy_get_info_for_jid(JabberStream *js, const char *jid)
void jabber_buddy_get_info(PurpleConnection *gc, const char *who)
{
JabberStream *js = gc->proto_data;
- char *bare_jid = jabber_get_bare_jid(who);
+ JabberID *jid = jabber_id_new(who);
- if(bare_jid) {
+ if (!jid)
+ return;
+
+ if (jabber_chat_find(js, jid->node, jid->domain)) {
+ /* For a conversation, include the resource (indicates the user). */
+ jabber_buddy_get_info_for_jid(js, who);
+ } else {
+ char *bare_jid = jabber_get_bare_jid(who);
jabber_buddy_get_info_for_jid(js, bare_jid);
g_free(bare_jid);
}
+
+ jabber_id_free(jid);
}
static void jabber_buddy_set_invisibility(JabberStream *js, const char *who,
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
index a8c1324e50..565bb09c1e 100644
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -146,10 +146,37 @@ static void jabber_bind_result_cb(JabberStream *js, xmlnode *packet,
jabber_session_init(js);
}
+static char *jabber_prep_resource(char *input) {
+ char hostname[256]; /* current hostname */
+
+ /* Empty resource == don't send any */
+ if (*input == '\0')
+ return NULL;
+
+ if (strstr(input, "__HOSTNAME__") == NULL)
+ return input;
+
+ /* Replace __HOSTNAME__ with hostname */
+ if (gethostname(hostname, sizeof(hostname) - 1)) {
+ purple_debug_warning("jabber", "gethostname: %s\n", g_strerror(errno));
+ /* according to glibc doc, the only time an error is returned
+ is if the hostname is longer than the buffer, in which case
+ glibc 2.2+ would still fill the buffer with partial
+ hostname, so maybe we want to detect that and use it
+ instead
+ */
+ strcpy(hostname, "localhost");
+ }
+ hostname[sizeof(hostname) - 1] = '\0';
+
+ return purple_strreplace(input, "__HOSTNAME__", hostname);
+}
+
static void jabber_stream_features_parse(JabberStream *js, xmlnode *packet)
{
if(xmlnode_get_child(packet, "starttls")) {
if(jabber_process_starttls(js, packet))
+
return;
} else if(purple_account_get_bool(js->gc->account, "require_tls", FALSE) && !js->gsc) {
purple_connection_error_reason (js->gc,
@@ -164,11 +191,17 @@ static void jabber_stream_features_parse(JabberStream *js, xmlnode *packet)
jabber_auth_start(js, packet);
} else if(xmlnode_get_child(packet, "bind")) {
xmlnode *bind, *resource;
+ char *requested_resource;
JabberIq *iq = jabber_iq_new(js, JABBER_IQ_SET);
bind = xmlnode_new_child(iq->node, "bind");
xmlnode_set_namespace(bind, "urn:ietf:params:xml:ns:xmpp-bind");
- resource = xmlnode_new_child(bind, "resource");
- xmlnode_insert_data(resource, js->user->resource, -1);
+ requested_resource = jabber_prep_resource(js->user->resource);
+
+ if (requested_resource != NULL) {
+ resource = xmlnode_new_child(bind, "resource");
+ xmlnode_insert_data(resource, requested_resource, -1);
+ free(requested_resource);
+ }
jabber_iq_set_callback(iq, jabber_bind_result_cb, NULL);
@@ -679,19 +712,6 @@ jabber_login(PurpleAccount *account)
return;
}
- if(!js->user->resource) {
- char *me;
- js->user->resource = g_strdup("Home");
- if(!js->user->node) {
- js->user->node = js->user->domain;
- js->user->domain = g_strdup("jabber.org");
- }
- me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain,
- js->user->resource);
- purple_account_set_username(account, me);
- g_free(me);
- }
-
if((my_jb = jabber_buddy_find(js, purple_account_get_username(account), TRUE)))
my_jb->subscription |= JABBER_SUB_BOTH;
@@ -1159,19 +1179,6 @@ void jabber_register_account(PurpleAccount *account)
js->write_buffer = purple_circ_buffer_new(512);
- if(!js->user->resource) {
- char *me;
- js->user->resource = g_strdup("Home");
- if(!js->user->node) {
- js->user->node = js->user->domain;
- js->user->domain = g_strdup("jabber.org");
- }
- me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain,
- js->user->resource);
- purple_account_set_username(account, me);
- g_free(me);
- }
-
if((my_jb = jabber_buddy_find(js, purple_account_get_username(account), TRUE)))
my_jb->subscription |= JABBER_SUB_BOTH;
diff --git a/libpurple/protocols/jabber/libxmpp.c b/libpurple/protocols/jabber/libxmpp.c
index 5b3ffd3810..604924a463 100644
--- a/libpurple/protocols/jabber/libxmpp.c
+++ b/libpurple/protocols/jabber/libxmpp.c
@@ -209,7 +209,7 @@ init_plugin(PurplePlugin *plugin)
purple_account_user_split_set_reverse(split, FALSE);
prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
- split = purple_account_user_split_new(_("Resource"), "Home", '/');
+ split = purple_account_user_split_new(_("Resource"), NULL, '/');
purple_account_user_split_set_reverse(split, FALSE);
prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
diff --git a/libpurple/protocols/jabber/pep.c b/libpurple/protocols/jabber/pep.c
index e7d849b184..fae2223b63 100644
--- a/libpurple/protocols/jabber/pep.c
+++ b/libpurple/protocols/jabber/pep.c
@@ -54,7 +54,7 @@ void jabber_pep_register_handler(const char *shortname, const char *xmlns, Jabbe
static void do_pep_iq_request_item_callback(JabberStream *js, xmlnode *packet, gpointer data) {
const char *from = xmlnode_get_attrib(packet,"from");
- xmlnode *pubsub = xmlnode_get_child_with_namespace(packet,"pubsub","http://jabber.org/protocol/pubsub#event");
+ xmlnode *pubsub = xmlnode_get_child_with_namespace(packet,"pubsub","http://jabber.org/protocol/pubsub");
xmlnode *items = NULL;
JabberPEPHandler *cb = data;
diff --git a/libpurple/protocols/jabber/presence.c b/libpurple/protocols/jabber/presence.c
index 162f25fc67..dc9fa7df68 100644
--- a/libpurple/protocols/jabber/presence.c
+++ b/libpurple/protocols/jabber/presence.c
@@ -513,7 +513,7 @@ void jabber_presence_parse(JabberStream *js, xmlnode *packet)
} else if(!strcmp(y->name, "delay") && !strcmp(xmlns, "urn:xmpp:delay")) {
/* XXX: compare the time. jabber:x:delay can happen on presence packets that aren't really and truly delayed */
delayed = TRUE;
- } else if(!strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) {
+ } else if(xmlns && !strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) {
caps = y; /* store for later, when creating buddy resource */
} else if(!strcmp(y->name, "x")) {
const char *xmlns = xmlnode_get_namespace(y);
diff --git a/libpurple/protocols/jabber/si.c b/libpurple/protocols/jabber/si.c
index 8fb5da9cb9..a6dc785032 100644
--- a/libpurple/protocols/jabber/si.c
+++ b/libpurple/protocols/jabber/si.c
@@ -1085,7 +1085,7 @@ static void jabber_si_xfer_init(PurpleXfer *xfer)
purple_notify_error(jsx->js->gc, _("File Send Failed"), _("File Send Failed"), msg);
g_free(msg);
- } else if(g_list_length(jb->resources) == 1) {
+ } else if(!jb->resources->next) {
/* only 1 resource online (probably our most common case)
* so no need to ask who to send to */
jbr = jb->resources->data;
diff --git a/libpurple/protocols/myspace/README b/libpurple/protocols/myspace/README
index 69ebc2c9e8..b890160596 100644
--- a/libpurple/protocols/myspace/README
+++ b/libpurple/protocols/myspace/README
@@ -10,9 +10,6 @@ This code was initially developed under Google Summer of Code 2007.
For features and TODO, see http://developer.pidgin.im/wiki/MySpaceIM
-Windows installation: Unzip the archive to C:\Program Files\Pidgin
-Unix/source installation: run "make install"
-
Usage:
Login using your _email address_ you use to login to myspace.com. You can't
diff --git a/libpurple/protocols/myspace/message.c b/libpurple/protocols/myspace/message.c
index ffbf77e5da..91d93345f0 100644
--- a/libpurple/protocols/myspace/message.c
+++ b/libpurple/protocols/myspace/message.c
@@ -613,6 +613,7 @@ msim_msg_pack_using(MsimMessage *msg,
const gchar *sep,
const gchar *begin, const gchar *end)
{
+ int num_items;
gchar **strings;
gchar **strings_tmp;
gchar *joined;
@@ -621,8 +622,10 @@ msim_msg_pack_using(MsimMessage *msg,
g_return_val_if_fail(msg != NULL, NULL);
+ num_items = g_list_length(msg);
+
/* Add one for NULL terminator for g_strjoinv(). */
- strings = (gchar **)g_new0(gchar *, g_list_length(msg) + 1);
+ strings = (gchar **)g_new0(gchar *, num_items + 1);
strings_tmp = strings;
g_list_foreach(msg, gf, &strings_tmp);
@@ -632,7 +635,7 @@ msim_msg_pack_using(MsimMessage *msg,
g_free(joined);
/* Clean up. */
- for (i = 0; i < g_list_length(msg); ++i) {
+ for (i = 0; i < num_items; ++i) {
g_free(strings[i]);
}
diff --git a/libpurple/protocols/qq/qq_network.c b/libpurple/protocols/qq/qq_network.c
index 6b89e52400..ed9ce4a8fa 100644
--- a/libpurple/protocols/qq/qq_network.c
+++ b/libpurple/protocols/qq/qq_network.c
@@ -126,8 +126,8 @@ static gboolean set_new_server(qq_data *qd)
/* get new server */
index = rand() % count;
it = g_list_nth(qd->servers, index);
- qd->curr_server = it->data; /* do not free server_name */
- if (qd->curr_server == NULL || strlen(qd->curr_server) <= 0 ) {
+ qd->curr_server = it->data; /* do not free server_name */
+ if (qd->curr_server == NULL || strlen(qd->curr_server) <= 0 ) {
purple_debug_info("QQ", "Server name at %d is empty\n", index);
return FALSE;
}
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
index 3d01af32a2..f2fcb17a81 100644
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -4415,7 +4415,7 @@ static void add_buddy_resolved(struct mwServiceResolve *srvc,
res = results->data;
if(!code && res && res->matches) {
- if(g_list_length(res->matches) == 1) {
+ if(!res->matches->next) {
struct mwResolveMatch *match = res->matches->data;
/* only one? that might be the right one! */
diff --git a/libpurple/protocols/yahoo/yahoochat.c b/libpurple/protocols/yahoo/yahoochat.c
index 387dfbb117..c6b70b70ac 100644
--- a/libpurple/protocols/yahoo/yahoochat.c
+++ b/libpurple/protocols/yahoo/yahoochat.c
@@ -513,12 +513,12 @@ void yahoo_process_chat_join(PurpleConnection *gc, struct yahoo_packet *pkt)
c = purple_find_chat(gc, YAHOO_CHAT_ID);
- if (room && (!c || purple_conv_chat_has_left(PURPLE_CONV_CHAT(c))) && members &&
- ((g_list_length(members) > 1) ||
+ if (room && (!c || purple_conv_chat_has_left(PURPLE_CONV_CHAT(c))) &&
+ members && (members->next ||
!g_ascii_strcasecmp(members->data, purple_connection_get_display_name(gc)))) {
- int i;
+ GList *l;
GList *flags = NULL;
- for (i = 0; i < g_list_length(members); i++)
+ for (l = members; l; l = l->next)
flags = g_list_append(flags, GINT_TO_POINTER(PURPLE_CBFLAGS_NONE));
if (c && purple_conv_chat_has_left(PURPLE_CONV_CHAT(c))) {
/* this might be a hack, but oh well, it should nicely */
diff --git a/libpurple/purple-remote b/libpurple/purple-remote
index cc1fa5602e..4ff2a19fcc 100755
--- a/libpurple/purple-remote
+++ b/libpurple/purple-remote
@@ -172,6 +172,10 @@ def execute(uri):
status_id = purple.PurplePrimitiveGetIdFromType(status_type)
return status_id
+ elif command == "getstatusmessage":
+ current = purple.PurpleSavedstatusGetCurrent()
+ return purple.PurpleSavedstatusGetMessage(current)
+
elif command == "getinfo":
account = findaccount(accountname, protocol)
connection = cpurple.PurpleAccountGetConnection(account)
diff --git a/libpurple/request.c b/libpurple/request.c
index c63fe179ab..5e9ec96aeb 100644
--- a/libpurple/request.c
+++ b/libpurple/request.c
@@ -916,7 +916,7 @@ purple_request_field_list_set_selected(PurpleRequestField *field, GList *items)
purple_request_field_list_clear_selected(field);
if (!purple_request_field_list_get_multi_select(field) &&
- g_list_length(items) > 1)
+ items && items->next)
{
purple_debug_warning("request",
"More than one item added to non-multi-select "
diff --git a/libpurple/roomlist.c b/libpurple/roomlist.c
index ef50935a45..b32b23ad4d 100644
--- a/libpurple/roomlist.c
+++ b/libpurple/roomlist.c
@@ -265,6 +265,11 @@ void purple_roomlist_room_add_field(PurpleRoomlist *list, PurpleRoomlistRoom *ro
g_return_if_fail(room != NULL);
g_return_if_fail(list->fields != NULL);
+ /* If this is the first call for this room, grab the first field in
+ * the Roomlist's fields. Otherwise, grab the field that is one
+ * more than the number of fields already present for the room.
+ * (This works because g_list_nth_data() is zero-indexed and
+ * g_list_length() is one-indexed.) */
if (!room->fields)
f = list->fields->data;
else
diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
index b8eff6a7a6..450d19bbbb 100644
--- a/pidgin/Makefile.am
+++ b/pidgin/Makefile.am
@@ -5,7 +5,6 @@ EXTRA_DIST = \
Makefile.mingw \
pidgin.pc.in \
pidgin-uninstalled.pc.in \
- pidginstock-artwork.c \
win32/IdleTracker/Makefile.mingw \
win32/IdleTracker/idletrack.c \
win32/IdleTracker/idletrack.h \
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
index 8408d04e23..b070dc0142 100644
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -3320,6 +3320,7 @@ static char *pidgin_get_tooltip_text(PurpleBlistNode *node, gboolean full)
if (PURPLE_BLIST_NODE_IS_CHAT(node))
{
PurpleChat *chat;
+ GList *connections;
GList *cur;
struct proto_chat_entry *pce;
char *name, *value;
@@ -3330,7 +3331,8 @@ static char *pidgin_get_tooltip_text(PurpleBlistNode *node, gboolean full)
prpl = purple_find_prpl(purple_account_get_protocol_id(chat->account));
prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
- if (g_list_length(purple_connections_get_all()) > 1)
+ connections = purple_connections_get_all();
+ if (connections && connections->next)
{
tmp = g_markup_escape_text(chat->account->username, -1);
g_string_append_printf(str, _("<b>Account:</b> %s"), tmp);
@@ -3400,6 +3402,7 @@ static char *pidgin_get_tooltip_text(PurpleBlistNode *node, gboolean full)
PurpleBuddy *b;
PurplePresence *presence;
PurpleNotifyUserInfo *user_info;
+ GList *connections;
char *tmp;
time_t idle_secs, signon;
@@ -3421,7 +3424,8 @@ static char *pidgin_get_tooltip_text(PurpleBlistNode *node, gboolean full)
user_info = purple_notify_user_info_new();
/* Account */
- if (full && g_list_length(purple_connections_get_all()) > 1)
+ connections = purple_connections_get_all();
+ if (full && connections && connections->next)
{
tmp = g_markup_escape_text(purple_account_get_username(
purple_buddy_get_account(b)), -1);
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
index cd6dd39080..c07865dd7b 100644
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -2759,26 +2759,16 @@ saveicon_writefile_cb(void *user_data, const char *filename)
{
PidginConversation *gtkconv = (PidginConversation *)user_data;
PurpleConversation *conv = gtkconv->active_conv;
- FILE *fp;
PurpleBuddyIcon *icon;
const void *data;
size_t len;
- if ((fp = g_fopen(filename, "wb")) == NULL) {
- purple_notify_error(gtkconv, NULL, _("Unable to open file."), NULL);
- return;
- }
-
icon = purple_conv_im_get_icon(PURPLE_CONV_IM(conv));
data = purple_buddy_icon_get_data(icon, &len);
- if ((len <= 0) || (data == NULL) || (fwrite(data, 1, len, fp) != len)) {
+ if ((len <= 0) || (data == NULL) || !purple_util_write_data_to_file_absolute(filename, data, len)) {
purple_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL);
- fclose(fp);
- g_unlink(filename);
- return;
}
- fclose(fp);
}
static void
diff --git a/pidgin/gtknotify.c b/pidgin/gtknotify.c
index b188f2659c..288bc83d4a 100644
--- a/pidgin/gtknotify.c
+++ b/pidgin/gtknotify.c
@@ -730,7 +730,6 @@ pidgin_notify_searchresults_new_rows(PurpleConnection *gc, PurpleNotifySearchRes
GtkListStore *model = data->model;
GtkTreeIter iter;
GdkPixbuf *pixbuf;
- guint col_num;
GList *row, *column;
guint n;
@@ -738,9 +737,6 @@ pidgin_notify_searchresults_new_rows(PurpleConnection *gc, PurpleNotifySearchRes
pixbuf = pidgin_create_prpl_icon(purple_connection_get_account(gc), 0.5);
- /* +1 is for the automagically created Status column. */
- col_num = g_list_length(results->columns) + 1;
-
for (row = results->rows; row != NULL; row = row->next) {
gtk_list_store_append(model, &iter);
@@ -776,6 +772,7 @@ pidgin_notify_searchresults(PurpleConnection *gc, const char *title,
guint col_num;
GList *columniter;
guint i;
+ GList *l;
GtkWidget *vbox;
GtkWidget *label;
@@ -869,8 +866,8 @@ pidgin_notify_searchresults(PurpleConnection *gc, const char *title,
i++;
}
- for (i = 0; i < g_list_length(results->buttons); i++) {
- PurpleNotifySearchButton *b = g_list_nth_data(results->buttons, i);
+ for (l = results->buttons; l; l = l->next) {
+ PurpleNotifySearchButton *b = l->data;
GtkWidget *button = NULL;
switch (b->type) {
case PURPLE_NOTIFY_BUTTON_LABELED:
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
index 8edaa00709..24d91f5e51 100644
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -853,12 +853,11 @@ static GtkWidget *
create_choice_field(PurpleRequestField *field)
{
GtkWidget *widget;
- GList *labels;
+ GList *labels = purple_request_field_choice_get_labels(field);
+ int num_labels = g_list_length(labels);
GList *l;
- labels = purple_request_field_choice_get_labels(field);
-
- if (g_list_length(labels) > 5)
+ if (num_labels > 5)
{
GtkWidget *menu;
GtkWidget *item;
@@ -892,7 +891,7 @@ create_choice_field(PurpleRequestField *field)
GtkWidget *radio;
gint i;
- if (g_list_length(labels) == 2)
+ if (num_labels == 2)
box = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
else
box = gtk_vbox_new(FALSE, 0);
diff --git a/pidgin/gtksavedstatuses.c b/pidgin/gtksavedstatuses.c
index e5955ed582..fba4a30ef6 100644
--- a/pidgin/gtksavedstatuses.c
+++ b/pidgin/gtksavedstatuses.c
@@ -331,7 +331,8 @@ status_window_delete_cb(GtkButton *button, gpointer user_data)
}
g_list_free(sel_paths);
- if (g_list_length(sel_titles) == 1) {
+ g_return_if_fail(sel_titles != NULL);
+ if (!sel_titles->next) {
title = g_strdup_printf(_("Are you sure you want to delete %s?"),
(const gchar *)sel_titles->data);
handle = purple_savedstatus_find(sel_titles->data);
diff --git a/pidgin/pidginstock.c b/pidgin/pidginstock.c
index 4e5f95cc4f..05d4e3700a 100644
--- a/pidgin/pidginstock.c
+++ b/pidgin/pidginstock.c
@@ -175,7 +175,6 @@ static struct SizedStockIcon {
{ PIDGIN_STOCK_ANIMATION_TYPING4, "animations", "typing4.png",FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_ANIMATION_TYPING5, "animations", "typing5.png",FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
- { PIDGIN_STOCK_TOOLBAR_ACCOUNTS, "toolbar", "accounts.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_BGCOLOR, "toolbar", "change-bgcolor.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_BLOCK, "emblems", "blocked.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_FGCOLOR, "toolbar", "change-fgcolor.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
@@ -189,7 +188,6 @@ static struct SizedStockIcon {
{ PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, "toolbar", "message-new.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_PENDING, "tray", "tray-new-im.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_PLUGINS, "toolbar", "plugins.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
- { PIDGIN_STOCK_TOOLBAR_TYPING, "toolbar", "typing.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_UNBLOCK, "toolbar", "unblock.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR, "toolbar", "select-avatar.png", FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL },
{ PIDGIN_STOCK_TOOLBAR_SEND_FILE, "toolbar", "send-file.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
diff --git a/pidgin/pixmaps/Makefile.am b/pidgin/pixmaps/Makefile.am
index 3b3acde7bf..d71d1441ed 100644
--- a/pidgin/pixmaps/Makefile.am
+++ b/pidgin/pixmaps/Makefile.am
@@ -344,6 +344,8 @@ STATUS_11 = \
STATUS_11_RTL = \
status/11/rtl/extended-away.png
+ status/11/rtl/log-in.png
+ status/11/rtl/log-out.png
STATUS_16 = \
status/16/available.png \
@@ -402,6 +404,7 @@ STATUS_48 = \
status/48/busy.png \
status/48/chat.png \
status/48/extended-away.png \
+ status/48/invisible.png \
status/48/log-in.png \
status/48/log-out.png \
status/48/offline.png \
@@ -409,8 +412,8 @@ STATUS_48 = \
STATUS_48_RTL = \
status/48/rtl/extended-away.png \
- status/48/rtl/login.png \
- status/48/rtl/logout.png
+ status/48/rtl/log-in.png \
+ status/48/rtl/log-out.png
TOOLBAR_11 = \
toolbar/11/message-new.png
diff --git a/pidgin/pixmaps/emotes/default/24/default.theme.in b/pidgin/pixmaps/emotes/default/24/default.theme.in
index 7dc5abd986..9fa98b13ba 100644
--- a/pidgin/pixmaps/emotes/default/24/default.theme.in
+++ b/pidgin/pixmaps/emotes/default/24/default.theme.in
@@ -10,7 +10,7 @@ happy.png :) :-)
excited.png :-D :-d :D :d
sad.png :-( :(
wink.png ;-) ;)
-tongue.png :P :-P :-p :p
+tongue.png :P :p :-P :-p
shocked.png =-O =-o
kiss.png :-*
glasses-cool.png 8-)
@@ -23,20 +23,21 @@ moneymouth.png :-$
foot-in-mouth.png :-!
shout.png >:o >:O
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|) 8-|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
[XMPP]
-# Following XEP-0038 + our default set, in default set order
-happy.png :) :-)
-excited.png :-D :-d :D :d
+# Following XEP-0038 + GTalk + our default set, in default set order
+# The GTalk strings come from ticket #3307.
+happy.png :) :-) =)
+excited.png :-D :-d :D :d =D =d
sad.png :-( :(
-wink.png ;-) ;)
-tongue.png :P :-P :-p :p
-shocked.png =-O =-o
+wink.png ;-) ;) ;^)
+tongue.png :P :p :-P :-p
+shocked.png =-O =-o :-O :-o
kiss.png :kiss: :-*
-glasses-cool.png 8-)
+glasses-cool.png 8-) B-)
embarrassed.png :-[
crying.png :'-( :'(
thinking.png :-/ :-\\
@@ -46,8 +47,8 @@ moneymouth.png :-$
foot-in-mouth.png :-!
shout.png >:o >:O
-# Following XEP-0038
-angry.png >:-( >:(
+# Following XEP-0038 + GTalk
+angry.png >:-( >:( X-( x-(
good.png :yes:
bad.png :no:
stop.png :wait:
@@ -56,7 +57,7 @@ phone.png :telephone:
mail.png :email:
lamp.png :jabber:
cake.png :cake:
-in_love.png :heart: :love:
+in_love.png :heart: :love: <3
love-over.png :brokenheart:
musical-note.png :music:
beer.png :beer:
@@ -66,10 +67,14 @@ moon.png :moon:
sun.png :sun:
star.png :star:
+# Others
+neutral.png :| :-|
+victory.png \\m/
+
# Hidden icons from the default set.
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|) 8-|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
# Following AIM 6.1
@@ -77,7 +82,7 @@ star.png :star:
happy.png :-) :)
wink.png ;-) ;)
sad.png :-( :(
-tongue.png :-P :P :-p :p
+tongue.png :P :p :-P :-p
shocked.png =-O
kiss.png :-*
shout.png >:o
@@ -91,21 +96,21 @@ crying.png :'(
shut-mouth.png :-X
glasses-cool.png 8-)
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
# Following Windows Live Messenger 8.1
[MSN]
happy.png :) :-)
-excited.png :D :d :-D :-d
+excited.png :D :d :-D :-d
wink.png ;) ;-)
-shocked.png :-O :-o :O :o
-tongue.png :P :p :-P :-p
+shocked.png :-O :-o :O :o
+tongue.png :-P :P :-p :p
glasses-cool.png (H) (h)
angry.png :@ :-@
embarrassed.png :$ :-$
-confused.png :S :s :-S :-s
+confused.png :S :s :-S :-s
sad.png :( :-(
crying.png :'(
neutral.png :| :-|
@@ -174,8 +179,8 @@ eyeroll.png 8-)
sleepy.png |-)
bunny.png ('.')
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
# Hidden MSN emotes
cigarette.png (ci) (CI)
@@ -280,8 +285,8 @@ star.png /<*> /xixing /star
girl.png /<00> /nv /woman
boy.png /<11> /nan /man
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
# Following ICQ 6.0
@@ -317,8 +322,8 @@ excited.png :-D :D
glasses-cool.png 8-)
amorous.png *IN\ LOVE*
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
# Following Yahoo! Messenger 8.1
@@ -378,8 +383,8 @@ nervous.png :-SS :-Ss :-sS :-ss
cowboy.png <):)
desire.png 8->
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
# Hidden Yahoo emotes
alien.png =:) >-)
@@ -432,7 +437,7 @@ messed.png X)
glasses-nerdy.png Q)
doh.png :G
pirate.png P)
-shock.png :O
+shocked.png :O
sidefrown.png :{
sinister.png :B
smirk.png :,
@@ -443,6 +448,6 @@ wink.png ;-) ;)
sad.png :[
kiss.png :x
! skywalker.png C:-) c:-) C:) c:)
-! monkey.png :-(|) :(|)
-! cyclops.png O-) o-)
+! monkey.png :-(|) :(|) 8-|)
+! cyclops.png O-) o-)
diff --git a/pidgin/pixmaps/emotes/small/16/small.theme.in b/pidgin/pixmaps/emotes/small/16/small.theme.in
index 738a2b6c41..b9b952067d 100644
--- a/pidgin/pixmaps/emotes/small/16/small.theme.in
+++ b/pidgin/pixmaps/emotes/small/16/small.theme.in
@@ -10,7 +10,7 @@ happy.png :) :-)
excited.png :-D :-d :D :d
sad.png :-( :(
wink.png ;-) ;)
-tongue.png :P :-P :-p :p
+tongue.png :P :p :-P :-p
shocked.png =-O =-o
kiss.png :-*
embarrassed.png :-[
@@ -20,27 +20,31 @@ angel.png O:-) o:-)
[XMPP]
-# Following XEP-0038 + our default set, in default set order
-happy.png :) :-)
-excited.png :-D :-d :D :d
+# Following XEP-0038 + GTalk + our default set, in default set order
+# The GTalk strings come from ticket #3307.
+happy.png :) :-) =)
+excited.png :-D :-d :D :d =D =d
sad.png :-( :(
-wink.png ;-) ;)
-tongue.png :P :-P :-p :p
-shocked.png =-O =-o
+wink.png ;-) ;) ;^)
+tongue.png :P :p :-P :-p
+shocked.png =-O =-o :-O :-o
kiss.png :kiss: :-*
embarrassed.png :-[
crying.png :'-( :'(
thinking.png :-/ :-\\
angel.png O:-) o:-)
-# Following XEP-0038
-angry.png >:-( >:(
+# Following XEP-0038 + GTalk
+angry.png >:-( >:( X-( x-(
phone.png :telephone:
-in_love.png :heart: :love:
+in_love.png :heart: :love: <3
musical-note.png :music:
beer.png :beer:
coffee.png :coffee:
+# Others
+neutral.png :| :-|
+
# Hidden icons from the default set.
@@ -49,7 +53,7 @@ coffee.png :coffee:
happy.png :-) :)
wink.png ;-) ;)
sad.png :-( :(
-tongue.png :-P :P :-p :p
+tongue.png :P :p :-P :-p
shocked.png =-O
kiss.png :-*
excited.png :-D :D
@@ -62,13 +66,13 @@ crying.png :'(
# Following Windows Live Messenger 8.1
[MSN]
happy.png :) :-)
-excited.png :D :d :-D :-d
+excited.png :D :d :-D :-d
wink.png ;) ;-)
-shocked.png :-O :-o :O :o
-tongue.png :P :p :-P :-p
+shocked.png :-O :-o :O :o
+tongue.png :-P :P :-p :p
angry.png :@ :-@
embarrassed.png :$ :-$
-confused.png :S :s :-S :-s
+confused.png :S :s :-S :-s
sad.png :( :-(
crying.png :'(
neutral.png :| :-|
@@ -134,6 +138,7 @@ sad.png :-( :(
shocked.png =-O
wink.png ;-) ;)
tongue.png :-P :P :-p :p
+music.png [:-}
sleeping.png *TIRED*
crying.png :'( :'-(
sick.png :-!
@@ -190,9 +195,8 @@ musical-note.png :-"
excited.png :D :-D
devil.png }:)
confused.png :Z
-smile.png :) :-)
amorous.png :X
-shock.png :O
+shocked.png :O
neutral.png :|
tongue.png :P :p
wink.png ;-) ;)
diff --git a/pidgin/pixmaps/status/11/rtl/log-in.png b/pidgin/pixmaps/status/11/rtl/log-in.png
new file mode 100644
index 0000000000..7f93f85f8f
--- /dev/null
+++ b/pidgin/pixmaps/status/11/rtl/log-in.png
Binary files differ
diff --git a/pidgin/pixmaps/status/11/rtl/log-out.png b/pidgin/pixmaps/status/11/rtl/log-out.png
new file mode 100644
index 0000000000..b80b6e5ce2
--- /dev/null
+++ b/pidgin/pixmaps/status/11/rtl/log-out.png
Binary files differ
diff --git a/pidgin/pixmaps/status/48/invisible.png b/pidgin/pixmaps/status/48/invisible.png
new file mode 100644
index 0000000000..cc5991ad89
--- /dev/null
+++ b/pidgin/pixmaps/status/48/invisible.png
Binary files differ
diff --git a/pidgin/pixmaps/status/48/log-in.png b/pidgin/pixmaps/status/48/log-in.png
index b3a225f4a4..61c103f41d 100644
--- a/pidgin/pixmaps/status/48/log-in.png
+++ b/pidgin/pixmaps/status/48/log-in.png
Binary files differ
diff --git a/pidgin/pixmaps/status/48/log-out.png b/pidgin/pixmaps/status/48/log-out.png
index 0f3d5510b4..ef7947ed17 100644
--- a/pidgin/pixmaps/status/48/log-out.png
+++ b/pidgin/pixmaps/status/48/log-out.png
Binary files differ
diff --git a/pidgin/pixmaps/status/48/rtl/login.png b/pidgin/pixmaps/status/48/rtl/log-in.png
index 6a0e9d29dc..6a0e9d29dc 100644
--- a/pidgin/pixmaps/status/48/rtl/login.png
+++ b/pidgin/pixmaps/status/48/rtl/log-in.png
Binary files differ
diff --git a/pidgin/pixmaps/status/48/rtl/logout.png b/pidgin/pixmaps/status/48/rtl/log-out.png
index 3323124066..3323124066 100644
--- a/pidgin/pixmaps/status/48/rtl/logout.png
+++ b/pidgin/pixmaps/status/48/rtl/log-out.png
Binary files differ
diff --git a/pidgin/plugins/history.c b/pidgin/plugins/history.c
index 4be8e1139f..b2e7b8ee48 100644
--- a/pidgin/plugins/history.c
+++ b/pidgin/plugins/history.c
@@ -47,10 +47,11 @@ static void historize(PurpleConversation *c)
convtype = purple_conversation_get_type(c);
gtkconv = PIDGIN_CONVERSATION(c);
- if (gtkconv == NULL)
- return;
+ g_return_if_fail(gtkconv != NULL);
- if (convtype == PURPLE_CONV_TYPE_IM && g_list_length(gtkconv->convs) < 2)
+ /* An IM which is the first active conversation. */
+ g_return_if_fail(gtkconv->convs != NULL);
+ if (convtype == PURPLE_CONV_TYPE_IM && !gtkconv->convs->next)
{
GSList *buddies;
GSList *cur;