/dev/tomkiewicz/gg11: f0ae13a29cdf: Merge from main

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Aug 28 13:38:20 EDT 2013


Changeset: f0ae13a29cdf8fb556a9f563acac93e09b775510
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2013-08-28 19:38 +0200
Branch:	 default
URL: https://hg.pidgin.im/dev/tomkiewicz/gg11/rev/f0ae13a29cdf

Description:

Merge from main

diffstat:

 configure.ac                                   |   11 +-
 finch/gntaccount.c                             |    3 +-
 finch/gntdebug.c                               |    1 +
 finch/gntrequest.c                             |    4 +-
 finch/libgnt/Makefile.am                       |    8 +-
 finch/libgnt/gntcolors.c                       |    2 +-
 finch/libgnt/gntentry.c                        |   11 +-
 finch/libgnt/gntentry.h                        |    2 +-
 finch/libgnt/gntmenu.c                         |    9 +-
 finch/libgnt/gntmenu.h                         |    2 +-
 finch/libgnt/gntstyle.c                        |    2 +-
 finch/libgnt/gnttextview.c                     |    2 +-
 finch/libgnt/gntwm.c                           |    3 +-
 libpurple/account.c                            |    6 +-
 libpurple/account.h                            |    2 +-
 libpurple/cipher.c                             |    7 +-
 libpurple/ciphers/aes.c                        |    4 +-
 libpurple/ciphers/des.c                        |   42 ++-
 libpurple/ciphers/gchecksum.c                  |    5 +-
 libpurple/ciphers/hmac.c                       |    2 +-
 libpurple/ciphers/pbkdf2.c                     |    2 +-
 libpurple/circbuffer.c                         |   10 +-
 libpurple/connection.c                         |   20 +
 libpurple/connection.h                         |   12 +
 libpurple/core.c                               |   25 ++
 libpurple/dbus-server.c                        |    5 +-
 libpurple/debug.c                              |   32 ++-
 libpurple/debug.h                              |    7 +
 libpurple/dnsquery.c                           |    6 +-
 libpurple/dnssrv.c                             |    2 +-
 libpurple/ft.c                                 |   10 +-
 libpurple/http.c                               |  267 +++++++++++++++++++-----
 libpurple/http.h                               |    3 +-
 libpurple/keyring.c                            |    4 +-
 libpurple/media/backend-fs2.c                  |    2 +-
 libpurple/plugins/Makefile.am                  |    6 +-
 libpurple/plugins/joinpart.c                   |    2 +-
 libpurple/plugins/keyrings/gnomekeyring.c      |   13 +
 libpurple/plugins/keyrings/internalkeyring.c   |    2 +-
 libpurple/plugins/perl/Makefile.am             |   10 +-
 libpurple/plugins/perl/common/Makefile.PL.in   |    2 +-
 libpurple/plugins/perl/perl-handlers.h         |    4 +-
 libpurple/plugins/signals-test.c               |    2 +-
 libpurple/plugins/ssl/ssl-gnutls.c             |   14 +-
 libpurple/plugins/tcl/tcl_purple.h             |    2 +-
 libpurple/plugins/tcl/tcl_ref.c                |    4 +-
 libpurple/prefs.c                              |    5 +-
 libpurple/protocols/bonjour/bonjour.c          |   11 +-
 libpurple/protocols/gg/account.h               |    2 +-
 libpurple/protocols/gg/gg.c                    |   10 +-
 libpurple/protocols/gg/libgadu-events.c        |    4 +-
 libpurple/protocols/gg/pubdir-prpl.c           |    5 +-
 libpurple/protocols/gg/utils.c                 |    4 +-
 libpurple/protocols/gg/utils.h                 |    2 +-
 libpurple/protocols/irc/irc.c                  |   10 +-
 libpurple/protocols/irc/parse.c                |    2 +-
 libpurple/protocols/jabber/auth_scram.c        |    2 +-
 libpurple/protocols/jabber/data.c              |    6 +-
 libpurple/protocols/jabber/jabber.c            |    6 +-
 libpurple/protocols/jabber/jutil.c             |   10 +-
 libpurple/protocols/jabber/libfacebook.c       |    3 +-
 libpurple/protocols/jabber/libgtalk.c          |    3 +-
 libpurple/protocols/jabber/libxmpp.c           |    3 +-
 libpurple/protocols/jabber/presence.c          |    2 +-
 libpurple/protocols/jabber/si.c                |    8 +-
 libpurple/protocols/msn/command.c              |    2 +-
 libpurple/protocols/msn/command.h              |    2 +-
 libpurple/protocols/msn/directconn.c           |    6 +-
 libpurple/protocols/msn/history.c              |    2 +-
 libpurple/protocols/msn/msn.c                  |    9 +-
 libpurple/protocols/msn/nexus.c                |    8 +-
 libpurple/protocols/msn/nexus.h                |    2 +-
 libpurple/protocols/msn/notification.c         |    4 +-
 libpurple/protocols/msn/p2p.c                  |    4 +-
 libpurple/protocols/msn/servconn.c             |    7 +-
 libpurple/protocols/msn/slplink.c              |    4 +-
 libpurple/protocols/msn/slpmsg.h               |    2 +-
 libpurple/protocols/msn/slpmsg_part.c          |    2 +-
 libpurple/protocols/msn/tlv.c                  |    2 +-
 libpurple/protocols/msn/transaction.c          |    2 +-
 libpurple/protocols/msn/transaction.h          |    2 +-
 libpurple/protocols/mxit/mxit.c                |    7 +-
 libpurple/protocols/myspace/myspace.c          |   13 +-
 libpurple/protocols/myspace/persist.h          |    4 +-
 libpurple/protocols/myspace/user.c             |    6 +-
 libpurple/protocols/novell/nmrtf.c             |    2 +-
 libpurple/protocols/novell/novell.c            |   10 +-
 libpurple/protocols/null/nullprpl.c            |    3 +-
 libpurple/protocols/oscar/bstream.c            |    7 +-
 libpurple/protocols/oscar/family_feedbag.c     |    2 +-
 libpurple/protocols/oscar/libaim.c             |    3 +-
 libpurple/protocols/oscar/libicq.c             |   10 +-
 libpurple/protocols/oscar/oscar.c              |   11 +-
 libpurple/protocols/oscar/oscar.h              |    8 +-
 libpurple/protocols/oscar/oscarcommon.h        |    1 +
 libpurple/protocols/oscar/tlv.c                |    6 +-
 libpurple/protocols/oscar/util.c               |    2 +-
 libpurple/protocols/sametime/sametime.c        |   18 +-
 libpurple/protocols/silc/buddy.c               |    2 +-
 libpurple/protocols/silc/chat.c                |   22 +-
 libpurple/protocols/silc/ops.c                 |    2 +-
 libpurple/protocols/silc/pk.c                  |    2 +-
 libpurple/protocols/silc/silc.c                |    3 +-
 libpurple/protocols/simple/simple.c            |    3 +-
 libpurple/protocols/yahoo/libyahoo.c           |    3 +-
 libpurple/protocols/yahoo/libyahoojp.c         |    3 +-
 libpurple/protocols/yahoo/libymsg.c            |   10 +-
 libpurple/protocols/yahoo/libymsg.h            |    3 +-
 libpurple/protocols/yahoo/util.c               |    4 +-
 libpurple/protocols/yahoo/yahoo_filexfer.c     |    3 +-
 libpurple/protocols/yahoo/yahoo_packet.c       |    4 +-
 libpurple/protocols/yahoo/yahoo_packet.h       |    2 +-
 libpurple/protocols/yahoo/ycht.c               |    2 +-
 libpurple/protocols/zephyr/ZReadAscii.c        |    2 +-
 libpurple/protocols/zephyr/ZVariables.c        |    2 +-
 libpurple/protocols/zephyr/Zinternal.c         |    4 +-
 libpurple/protocols/zephyr/internal.h          |    2 +-
 libpurple/protocols/zephyr/zephyr.c            |    9 +-
 libpurple/proxy.c                              |    6 +-
 libpurple/prpl.h                               |   15 +
 libpurple/purple-client.c                      |    4 +-
 libpurple/stun.c                               |   10 +-
 libpurple/tag.sh                               |   29 +-
 libpurple/upnp.c                               |   10 +-
 libpurple/util.c                               |   30 +-
 libpurple/xmlnode.c                            |    6 +-
 pidgin/gtkaccount.c                            |    3 +-
 pidgin/gtkconv.c                               |    4 +-
 pidgin/gtkdebug.c                              |    2 +-
 pidgin/gtkdialogs.c                            |    2 +-
 pidgin/gtkft.c                                 |    4 +-
 pidgin/gtkimhtml.c                             |    2 +-
 pidgin/gtkmain.c                               |   24 +-
 pidgin/gtkprefs.c                              |   22 +-
 pidgin/gtkprivacy.c                            |   15 +-
 pidgin/gtkrequest.c                            |    8 +-
 pidgin/gtksession.c                            |   24 +-
 pidgin/gtksound.c                              |    1 +
 pidgin/gtkstatusbox.c                          |    6 +-
 pidgin/gtkthemes.c                             |    2 +-
 pidgin/gtkutils.c                              |    4 +-
 pidgin/gtkwebview.c                            |   67 +++++-
 pidgin/gtkwebviewtoolbar.c                     |   13 +-
 pidgin/pidginstock.c                           |    4 +-
 pidgin/plugins/musicmessaging/Makefile.am      |    6 +-
 pidgin/plugins/musicmessaging/musicmessaging.c |    2 +
 pidgin/plugins/perl/Makefile.am                |    7 +-
 pidgin/plugins/perl/common/Makefile.PL.in      |    2 +-
 pidgin/plugins/pidginrc.c                      |   10 +-
 pidgin/plugins/spellchk.c                      |   11 +-
 pidgin/plugins/webkit.c                        |  126 +-----------
 pidgin/themes/Contents/Resources/main.css      |    6 +
 152 files changed, 903 insertions(+), 538 deletions(-)

diffs (truncated from 4486 to 300 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1424,21 +1424,13 @@ if test "x$GCC" = "xyes"; then
 	dnl	This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
 	dnl		We'd need an intermediate variable.
 	dnl
-	dnl Consider adding -Wfloat-equal.
-	dnl	This leads to warnings with Perl.
-	dnl		Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
-	dnl		On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
-	dnl
-	dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
-	dnl	This is likely non-trivial.
-	dnl
 	for newflag in \
 			"-Waggregate-return" \
 			"-Wcast-align" \
 			"-Wdeclaration-after-statement" \
 			"-Wendif-labels" \
 			"-Werror-implicit-function-declaration" \
-			"-Wextra -Wno-sign-compare -Wno-unused-parameter" \
+			"-Wextra -Wno-unused-parameter" \
 			"-Wformat-security" \
 				"-Werror=format-security" \
 			"-Winit-self" \
@@ -1446,6 +1438,7 @@ if test "x$GCC" = "xyes"; then
 			"-Wmissing-noreturn" \
 			"-Wmissing-prototypes" \
 			"-Wpointer-arith" \
+			"-Wfloat-equal" \
 			"-Wundef" \
 	; do
 		orig_CFLAGS="$CFLAGS"
diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -765,7 +765,8 @@ account_list_key_pressed_cb(GntWidget *w
 	count = g_list_length(accounts);
 	pos = g_list_index(accounts, account);
 	pos = (move + pos + count + 1) % (count + 1);
-	purple_accounts_reorder(account, pos);
+	if (pos >= 0)
+		purple_accounts_reorder(account, pos);
 
 	/* I don't like this, but recreating the entire list seems to be
 	 * the easiest way of doing it */
diff --git a/finch/gntdebug.c b/finch/gntdebug.c
--- a/finch/gntdebug.c
+++ b/finch/gntdebug.c
@@ -144,6 +144,7 @@ finch_debug_print(PurpleDebugLevel level
 		}
 
 		gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), args, flag);
+		gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), "\n", GNT_TEXT_FLAG_NORMAL);
 		if (pos <= 1)
 			gnt_text_view_scroll(GNT_TEXT_VIEW(debug.tview), 0);
 	}
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -262,7 +262,7 @@ finch_request_action(const char *title, 
 		va_list actions)
 {
 	GntWidget *window, *box, *button, *focus = NULL;
-	int i;
+	gsize i;
 
 	window = setup_request_window(title, primary, secondary, PURPLE_REQUEST_ACTION);
 
@@ -281,7 +281,7 @@ finch_request_action(const char *title, 
 		g_object_set_data(G_OBJECT(button), "activate-id", GINT_TO_POINTER(i));
 		g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(request_action_cb), window);
 
-		if (i == default_value)
+		if (default_value >= 0 && i == (gsize)default_value)
 			focus = button;
 	}
 
diff --git a/finch/libgnt/Makefile.am b/finch/libgnt/Makefile.am
--- a/finch/libgnt/Makefile.am
+++ b/finch/libgnt/Makefile.am
@@ -73,11 +73,13 @@ CLEANFILES = \
 	gntmarshal.c
 
 gntmarshal.c: $(srcdir)/genmarshal gntmarshal.h
-	echo "#include \"gntmarshal.h\"" > $@
-	glib-genmarshal --prefix=gnt_closure_marshal --body $(srcdir)/genmarshal >> $@
+	@echo -e "  GEN\t$@"
+	@echo "#include \"gntmarshal.h\"" > $@
+	@glib-genmarshal --prefix=gnt_closure_marshal --body $(srcdir)/genmarshal >> $@
 
 gntmarshal.h: $(srcdir)/genmarshal
-	glib-genmarshal --prefix=gnt_closure_marshal --header $(srcdir)/genmarshal > $@
+	@echo -e "  GEN\t$@"
+	@glib-genmarshal --prefix=gnt_closure_marshal --header $(srcdir)/genmarshal > $@
 
 libgnt_laincludedir=$(includedir)/gnt
 libgnt_lainclude_HEADERS = \
diff --git a/finch/libgnt/gntcolors.c b/finch/libgnt/gntcolors.c
--- a/finch/libgnt/gntcolors.c
+++ b/finch/libgnt/gntcolors.c
@@ -296,7 +296,7 @@ int gnt_color_pair(int pair)
 {
 	return (hascolors ? COLOR_PAIR(pair) :
 		((pair == GNT_COLOR_NORMAL || pair == GNT_COLOR_HIGHLIGHT_D ||
-		  pair == GNT_COLOR_TITLE_D || pair == GNT_COLOR_DISABLED) ? 0 : A_STANDOUT));
+		  pair == GNT_COLOR_TITLE_D || pair == GNT_COLOR_DISABLED) ? 0 : (int)A_STANDOUT));
 }
 
 int gnt_color_add_pair(int fg, int bg)
diff --git a/finch/libgnt/gntentry.c b/finch/libgnt/gntentry.c
--- a/finch/libgnt/gntentry.c
+++ b/finch/libgnt/gntentry.c
@@ -184,7 +184,7 @@ static gboolean
 show_suggest_dropdown(GntEntry *entry)
 {
 	char *suggest = NULL;
-	int len;
+	gsize len;
 	int offset = 0, x, y;
 	int count = 0;
 	GList *iter;
@@ -815,7 +815,7 @@ gnt_entry_key_pressed(GntWidget *widget,
 
 		for (str = text; *str; str = next)
 		{
-			int len;
+			gsize len;
 			next = g_utf8_find_next_char(str, NULL);
 			len = next - str;
 
@@ -834,7 +834,7 @@ gnt_entry_key_pressed(GntWidget *widget,
 			if (entry->max && g_utf8_pointer_to_offset(entry->start, entry->end) >= entry->max)
 				continue;
 
-			if (entry->end + len - entry->start >= entry->buffer)
+			if ((gsize)(entry->end + len - entry->start) >= entry->buffer)
 			{
 				/* This will cause the buffer to grow */
 				char *tmp = g_strdup(entry->start);
@@ -1184,8 +1184,11 @@ void gnt_entry_add_to_history(GntEntry *
 {
 	g_return_if_fail(entry->history != NULL);   /* Need to set_history_length first */
 
-	if (g_list_length(entry->history) >= entry->histlength)
+	if (entry->histlength >= 0 &&
+		g_list_length(entry->history) >= (gsize)entry->histlength)
+	{
 		return;
+	}
 
 	entry->history = g_list_first(entry->history);
 	g_free(entry->history->data);
diff --git a/finch/libgnt/gntentry.h b/finch/libgnt/gntentry.h
--- a/finch/libgnt/gntentry.h
+++ b/finch/libgnt/gntentry.h
@@ -178,7 +178,7 @@ void gnt_entry_add_to_history(GntEntry *
  * Set the length of history for the entry box.
  *
  * @param entry  The entry box.
- * @param num    The maximum length of the history.
+ * @param num    The maximum length of the history, -1 for unlimited.
  */
 void gnt_entry_set_history_length(GntEntry *entry, int num);
 
diff --git a/finch/libgnt/gntmenu.c b/finch/libgnt/gntmenu.c
--- a/finch/libgnt/gntmenu.c
+++ b/finch/libgnt/gntmenu.c
@@ -79,7 +79,7 @@ gnt_menu_draw(GntWidget *widget)
 	GntMenu *menu = GNT_MENU(widget);
 	GList *iter;
 	chtype type;
-	int i;
+	guint i;
 
 	if (menu->type == GNT_MENU_TOPLEVEL) {
 		wbkgdset(widget->window, '\0' | gnt_color_pair(GNT_COLOR_HIGHLIGHT));
@@ -277,7 +277,7 @@ static gboolean
 gnt_menu_key_pressed(GntWidget *widget, const char *text)
 {
 	GntMenu *menu = GNT_MENU(widget);
-	int current = menu->selected;
+	guint current = menu->selected;
 
 	if (menu->submenu) {
 		GntMenu *sub = menu;
@@ -304,9 +304,10 @@ gnt_menu_key_pressed(GntWidget *widget, 
 
 	if (menu->type == GNT_MENU_TOPLEVEL) {
 		if (strcmp(text, GNT_KEY_LEFT) == 0) {
-			menu->selected--;
-			if (menu->selected < 0)
+			if (menu->selected == 0)
 				menu->selected = g_list_length(menu->list) - 1;
+			else
+				menu->selected--;
 		} else if (strcmp(text, GNT_KEY_RIGHT) == 0) {
 			menu->selected++;
 			if (menu->selected >= g_list_length(menu->list))
diff --git a/finch/libgnt/gntmenu.h b/finch/libgnt/gntmenu.h
--- a/finch/libgnt/gntmenu.h
+++ b/finch/libgnt/gntmenu.h
@@ -65,7 +65,7 @@ struct _GntMenu
 	GntMenuType type;
 
 	GList *list;
-	int selected;
+	guint selected;
 
 	/* This will keep track of its immediate submenu which is visible so that
 	 * keystrokes can be passed to it. */
diff --git a/finch/libgnt/gntstyle.c b/finch/libgnt/gntstyle.c
--- a/finch/libgnt/gntstyle.c
+++ b/finch/libgnt/gntstyle.c
@@ -168,7 +168,7 @@ void gnt_style_read_workspaces(GntWM *wm
 	gsize c;
 
 	for (i = 1; i < MAX_WORKSPACES; ++i) {
-		int j;
+		gsize j;
 		GntWS *ws;
 		gchar **titles;
 		char group[32];
diff --git a/finch/libgnt/gnttextview.c b/finch/libgnt/gnttextview.c
--- a/finch/libgnt/gnttextview.c
+++ b/finch/libgnt/gnttextview.c
@@ -513,7 +513,7 @@ void gnt_text_view_append_text_with_tag(
 			GntTextFormatFlags flags, const char *tagname)
 {
 	GntWidget *widget = GNT_WIDGET(view);
-	int fl = 0;
+	chtype fl = 0;
 	const char *start, *end;
 	GList *list = view->list;
 	GntTextLine *line;
diff --git a/finch/libgnt/gntwm.c b/finch/libgnt/gntwm.c
--- a/finch/libgnt/gntwm.c
+++ b/finch/libgnt/gntwm.c
@@ -427,6 +427,7 @@ switch_window(GntWM *wm, int direction, 
 
 	w = wm->cws->ordered->data;
 	orgpos = pos = g_list_index(wm->cws->list, w);
+	g_return_if_fail(pos < 0);
 
 	do {
 		pos += direction;
@@ -434,7 +435,7 @@ switch_window(GntWM *wm, int direction, 
 		if (pos < 0) {
 			wid = g_list_last(wm->cws->list)->data;
 			pos = g_list_length(wm->cws->list) - 1;
-		} else if (pos >= g_list_length(wm->cws->list)) {
+		} else if ((guint)pos >= g_list_length(wm->cws->list)) {
 			wid = wm->cws->list->data;
 			pos = 0;
 		} else
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -3037,7 +3037,7 @@ purple_accounts_delete(PurpleAccount *ac
 }
 
 void
-purple_accounts_reorder(PurpleAccount *account, gint new_index)
+purple_accounts_reorder(PurpleAccount *account, guint new_index)
 {
 	gint index;
 	GList *l;
@@ -3047,7 +3047,7 @@ purple_accounts_reorder(PurpleAccount *a
 
 	index = g_list_index(accounts, account);
 
-	if (index == -1) {
+	if (index < 0) {
 		purple_debug_error("account",
 				   "Unregistered account (%s) discovered during reorder!\n",
 				   purple_account_get_username(account));
@@ -3056,7 +3056,7 @@ purple_accounts_reorder(PurpleAccount *a
 
 	l = g_list_nth(accounts, index);
 
-	if (new_index > index)
+	if (new_index > (guint)index)
 		new_index--;
 
 	/* Remove the old one. */
diff --git a/libpurple/account.h b/libpurple/account.h
--- a/libpurple/account.h
+++ b/libpurple/account.h
@@ -1118,7 +1118,7 @@ void purple_accounts_delete(PurpleAccoun
  * @param account   The account to reorder.
  * @param new_index The new index for the account.
  */
-void purple_accounts_reorder(PurpleAccount *account, gint new_index);
+void purple_accounts_reorder(PurpleAccount *account, guint new_index);
 
 /**
  * Returns a list of all accounts.
diff --git a/libpurple/cipher.c b/libpurple/cipher.c
--- a/libpurple/cipher.c



More information about the Commits mailing list