/soc/2013/ankitkv/gobjectification: b52f5391d12d: Merged soc.201...

Ankit Vani a at nevitus.org
Tue Aug 6 18:17:37 EDT 2013


Changeset: b52f5391d12dbcc5056529c3c489ebfc1572bc6b
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-07 03:47 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/b52f5391d12d

Description:

Merged soc.2013.gobjectification branch

diffstat:

 configure.ac                                   |   88 ++++++++++---------
 libpurple/ciphers/Makefile.am                  |    3 +-
 libpurple/ciphers/aescipher.c                  |    2 +-
 libpurple/plugins/ciphertest.c                 |    2 +-
 libpurple/plugins/keyrings/gnomekeyring.c      |    2 +-
 libpurple/plugins/keyrings/internalkeyring.c   |    2 +-
 libpurple/plugins/keyrings/kwallet.cpp         |    2 +-
 libpurple/plugins/keyrings/secretservice.c     |    2 +-
 libpurple/plugins/keyrings/wincred.c           |    2 +-
 pidgin/gtkblist.c                              |    7 +-
 pidgin/gtkconv.c                               |   42 ++++-----
 pidgin/gtkconv.h                               |    2 -
 pidgin/gtkdebug.c                              |    2 +-
 pidgin/gtkdialogs.c                            |    2 +-
 pidgin/gtklog.c                                |    2 +-
 pidgin/gtknotify.c                             |    2 +-
 pidgin/gtkpluginpref.c                         |    8 +-
 pidgin/gtkpounce.c                             |    2 +-
 pidgin/gtkprefs.c                              |   14 +-
 pidgin/gtkrequest.c                            |    3 +-
 pidgin/gtksavedstatuses.c                      |   11 +--
 pidgin/gtkstatusbox.c                          |    4 +-
 pidgin/gtkutils.c                              |    9 +-
 pidgin/gtkutils.h                              |    5 +-
 pidgin/gtkwebview.c                            |  109 +++++++++++++++++-------
 pidgin/gtkwebview.h                            |   68 +++++++++++----
 pidgin/gtkwebviewtoolbar.c                     |   62 ++++++++------
 pidgin/gtkwebviewtoolbar.h                     |   25 +-----
 pidgin/plugins/musicmessaging/musicmessaging.c |    2 +
 pidgin/plugins/xmppconsole.c                   |    6 +-
 30 files changed, 268 insertions(+), 224 deletions(-)

diffs (truncated from 1259 to 300 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1579,7 +1579,7 @@ dnl ####################################
 dnl # Check for GNOME Keyring headers
 dnl #######################################################################
 
-AC_ARG_ENABLE(gnome-keyring, [AC_HELP_STRING([--disable-gnome-keyring], [enable GNOME Keyring support])], enable_gnome_keyring="$enableval", enable_gnome_keyring=yes)
+AC_ARG_ENABLE(gnome-keyring, [AC_HELP_STRING([--disable-gnome-keyring], [disable GNOME Keyring support])], enable_gnome_keyring="$enableval", enable_gnome_keyring=yes)
 
 if test "x$enable_gnome_keyring" = "xyes" ; then
 	PKG_CHECK_MODULES(GNOMEKEYRING, [gnome-keyring-1], [
@@ -1604,54 +1604,20 @@ dnl ####################################
 dnl # Check for KWallet headers
 dnl #######################################################################
 
-AC_ARG_ENABLE(kwallet, [AC_HELP_STRING([--disable-kwallet], [enable KWallet support])], enable_kwallet="$enableval", enable_kwallet=yes)
+AC_ARG_ENABLE(kwallet, [AC_HELP_STRING([--disable-kwallet], [disable KWallet support])], enable_kwallet="$enableval", enable_kwallet=yes)
 AC_ARG_WITH(kwallet-includes, [AC_HELP_STRING([--with-kwallet-includes=DIR], [compile the KWallet plugin against includes in DIR])], [ac_kwallet_includes="$withval"], [ac_kwallet_includes="no"])
 AC_ARG_WITH(kwallet-libs, [AC_HELP_STRING([--with-kwallet-libs=DIR], [compile the KWallet plugin against the KWallet libs in DIR])], [ac_kwallet_libs="$withval"], [ac_kwallet_libs="no"])
 
 if test "x$enable_kwallet" = "xyes"; then
-	KWALLET_CXXFLAGS=""
-	KWALLET_LIBS=""
-	if test -z "$with_kwallet_includes" || test -z "$with_kwallet_libs"; then
-		AC_CHECK_PROG(KDE4_CONFIG, kde4-config, kde4-config, no)
-		if test "x$KDE4_CONFIG" = "xno"; then
-			if test "x$force_deps" = "xyes"; then
-				AC_MSG_ERROR([
-kde4-config not found. $KDE4_CONFIG
-Use --disable-kwallet if you do not need KWallet support.
-Use --with-kwallet-includes and --with-kwallet-libs to set up includes manually.
-])
-			enable_kwallet=no
-			fi
-		fi
-	fi
-fi
-
-if test "x$enable_kwallet" = "xyes"; then
-	AC_LANG_PUSH([C++])
-	CPPFLAGS_save="$CPPFLAGS"
-
-	if test "$ac_kwallet_includes" != "no"; then
-		KWALLET_CXXFLAGS="-I$ac_kwallet_includes"
-	elif test "x$KDE4_CONFIG" != "xno"; then
-		KWALLET_CXXFLAGS="-I`$KDE4_CONFIG --path include`"
-	fi
-	CPPFLAGS="$CPPFLAGS $KWALLET_CXXFLAGS"
-	AC_CHECK_HEADER([kwallet.h], , [enable_kwallet=no])
-
-	CPPFLAGS="$CPPFLAGS_save"
-	AC_LANG_POP
-fi
-
-if test "x$enable_kwallet" = "xyes"; then
 	dnl Ensure C++ compiler works
 	AC_CHECK_PROG(CXXTEST, [$CXX], [$CXX])
 	if test "x$CXXTEST" = "x"; then
+		enable_kwallet=no
 		if test "x$force_deps" = "xyes"; then
 			AC_MSG_ERROR([
 A C++ compiler was not found.
 Use --disable-kwallet if you do not need KWallet support.
 ])
-		enable_kwallet=no
 		fi
 	fi
 fi
@@ -1659,6 +1625,7 @@ fi
 AC_LANG_PUSH([C++])
 CPPFLAGS_save="$CPPFLAGS"
 LDFLAGS_save="$LDFLAGS"
+
 if test "x$enable_kwallet" = "xyes"; then
 	PKG_CHECK_MODULES(QT4, [QtCore], [
 		AC_SUBST(QT4_CFLAGS)
@@ -1681,7 +1648,42 @@ if test "x$enable_kwallet" = "xyes"; the
 	AC_SUBST(MOC)
 	AC_MSG_RESULT([$MOC])
 
+	KWALLET_CXXFLAGS=""
+	KWALLET_LIBS=""
+	if test -z "$with_kwallet_includes" || test -z "$with_kwallet_libs"; then
+		AC_CHECK_PROG(KDE4_CONFIG, kde4-config, kde4-config, no)
+		if test "x$KDE4_CONFIG" = "xno"; then
+			enable_kwallet=no
+			if test "x$force_deps" = "xyes"; then
+				AC_MSG_ERROR([
+kde4-config not found. $KDE4_CONFIG
+Use --disable-kwallet if you do not need KWallet support.
+Use --with-kwallet-includes and --with-kwallet-libs to set up includes manually.
+])
+			fi
+		fi
+	fi
+fi
 
+if test "x$enable_kwallet" = "xyes"; then
+	if test "$ac_kwallet_includes" != "no"; then
+		KWALLET_CXXFLAGS="-I$ac_kwallet_includes"
+	elif test "x$KDE4_CONFIG" != "xno"; then
+		KWALLET_CXXFLAGS="-I`$KDE4_CONFIG --path include`"
+	fi
+	CPPFLAGS="$CPPFLAGS $KWALLET_CXXFLAGS"
+	AC_CHECK_HEADER([kwallet.h], , [
+		enable_kwallet=no
+		if test "x$force_deps" = "xyes"; then
+			AC_MSG_ERROR([
+KWallet development headers not found.
+Use --disable-kwallet if you do not need KWallet support.
+])
+		fi
+])
+fi
+
+if test "x$enable_kwallet" = "xyes"; then
 	AC_MSG_CHECKING([for KWallet libraries])
 	if test "$ac_kwallet_libs" != "no"; then
 		KWALLET_LIBS="-L$ac_kwallet_libs -lkdeui"
@@ -1691,19 +1693,21 @@ if test "x$enable_kwallet" = "xyes"; the
 		KWALLET_LIBS="-lkdeui"
 	fi
 	KWALLET_LIBS="$KWALLET_LIBS"
-	CPPFLAGS="$CPPFLAGS $KWALLET_CXXFLAGS"
 	LDFLAGS="$LDFLAGS $KWALLET_LIBS $QT4_LIBS"
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <kwallet.h>],
 		[KWallet::Wallet::LocalWallet();])], [AC_MSG_RESULT([yes])],
-		[if test "x$force_deps" = "xyes"; then
-AC_MSG_ERROR([
+		[
+			AC_MSG_RESULT(no)
+			enable_kwallet=no
+			if test "x$force_deps" = "xyes"; then
+				AC_MSG_ERROR([
 KWallet development libraries not found.
 Use --disable-kwallet if you do not need KWallet support.
 ])
+			fi
+		])
 fi
-])
 
-fi
 CPPFLAGS="$CPPFLAGS_save"
 LDFLAGS="$LDFLAGS_save"
 AC_LANG_POP
diff --git a/libpurple/ciphers/Makefile.am b/libpurple/ciphers/Makefile.am
--- a/libpurple/ciphers/Makefile.am
+++ b/libpurple/ciphers/Makefile.am
@@ -19,9 +19,8 @@ libpurple_ciphers_la_SOURCES=\
 	sha1hash.c \
 	sha256hash.c
 
-INCLUDES = -I$(top_srcdir)/libpurple
-
 AM_CPPFLAGS = \
+	-I$(top_srcdir)/libpurple \
 	$(INTGG_CFLAGS) \
 	$(AM_CFLAGS) \
 	$(GLIB_CFLAGS) \
diff --git a/libpurple/ciphers/aescipher.c b/libpurple/ciphers/aescipher.c
--- a/libpurple/ciphers/aescipher.c
+++ b/libpurple/ciphers/aescipher.c
@@ -164,7 +164,7 @@ purple_aes_cipher_unpad_pkcs7(guchar inp
 	if (padding_len <= 0 || padding_len > PURPLE_AES_BLOCK_SIZE ||
 		padding_len > in_len) {
 		purple_debug_warning("cipher-aes",
-			"Invalid padding length: %d (total %lu) - "
+			"Invalid padding length: %d (total %" G_GSIZE_FORMAT ") - "
 			"most probably, the key was invalid\n",
 			padding_len, in_len);
 		return -1;
diff --git a/libpurple/plugins/ciphertest.c b/libpurple/plugins/ciphertest.c
--- a/libpurple/plugins/ciphertest.c
+++ b/libpurple/plugins/ciphertest.c
@@ -497,7 +497,7 @@ cipher_test_aes(void)
 		gchar *cipher_b16, *deciphered;
 
 		purple_debug_info("cipher-test", "Test %02d:\n", i);
-		purple_debug_info("cipher-test", "\tTesting '%s' (%lubit) \n",
+		purple_debug_info("cipher-test", "\tTesting '%s' (%" G_GSIZE_FORMAT "bit) \n",
 			test->plaintext ? test->plaintext : "(null)",
 			strlen(test->key) * 8 / 2);
 
diff --git a/libpurple/plugins/keyrings/gnomekeyring.c b/libpurple/plugins/keyrings/gnomekeyring.c
--- a/libpurple/plugins/keyrings/gnomekeyring.c
+++ b/libpurple/plugins/keyrings/gnomekeyring.c
@@ -388,7 +388,7 @@ gnomekeyring_load(PurplePlugin *plugin)
 
 	keyring_handler = purple_keyring_new();
 
-	purple_keyring_set_name(keyring_handler, GNOMEKEYRING_NAME);
+	purple_keyring_set_name(keyring_handler, _(GNOMEKEYRING_NAME));
 	purple_keyring_set_id(keyring_handler, GNOMEKEYRING_ID);
 	purple_keyring_set_read_password(keyring_handler, gnomekeyring_read);
 	purple_keyring_set_save_password(keyring_handler, gnomekeyring_save);
diff --git a/libpurple/plugins/keyrings/internalkeyring.c b/libpurple/plugins/keyrings/internalkeyring.c
--- a/libpurple/plugins/keyrings/internalkeyring.c
+++ b/libpurple/plugins/keyrings/internalkeyring.c
@@ -959,7 +959,7 @@ intkeyring_load(PurplePlugin *plugin)
 {
 	keyring_handler = purple_keyring_new();
 
-	purple_keyring_set_name(keyring_handler, INTKEYRING_NAME);
+	purple_keyring_set_name(keyring_handler, _(INTKEYRING_NAME));
 	purple_keyring_set_id(keyring_handler, INTKEYRING_ID);
 	purple_keyring_set_read_password(keyring_handler,
 		intkeyring_read);
diff --git a/libpurple/plugins/keyrings/kwallet.cpp b/libpurple/plugins/keyrings/kwallet.cpp
--- a/libpurple/plugins/keyrings/kwallet.cpp
+++ b/libpurple/plugins/keyrings/kwallet.cpp
@@ -505,7 +505,7 @@ kwallet_load(PurplePlugin *plugin)
 
 	keyring_handler = purple_keyring_new();
 
-	purple_keyring_set_name(keyring_handler, KWALLET_NAME);
+	purple_keyring_set_name(keyring_handler, _(KWALLET_NAME));
 	purple_keyring_set_id(keyring_handler, KWALLET_ID);
 	purple_keyring_set_read_password(keyring_handler, kwallet_read);
 	purple_keyring_set_save_password(keyring_handler, kwallet_save);
diff --git a/libpurple/plugins/keyrings/secretservice.c b/libpurple/plugins/keyrings/secretservice.c
--- a/libpurple/plugins/keyrings/secretservice.c
+++ b/libpurple/plugins/keyrings/secretservice.c
@@ -257,7 +257,7 @@ ss_init(void)
 {
 	keyring_handler = purple_keyring_new();
 
-	purple_keyring_set_name(keyring_handler, SECRETSERVICE_NAME);
+	purple_keyring_set_name(keyring_handler, _(SECRETSERVICE_NAME));
 	purple_keyring_set_id(keyring_handler, SECRETSERVICE_ID);
 	purple_keyring_set_read_password(keyring_handler, ss_read);
 	purple_keyring_set_save_password(keyring_handler, ss_save);
diff --git a/libpurple/plugins/keyrings/wincred.c b/libpurple/plugins/keyrings/wincred.c
--- a/libpurple/plugins/keyrings/wincred.c
+++ b/libpurple/plugins/keyrings/wincred.c
@@ -260,7 +260,7 @@ wincred_load(PurplePlugin *plugin)
 {
 	keyring_handler = purple_keyring_new();
 
-	purple_keyring_set_name(keyring_handler, WINCRED_NAME);
+	purple_keyring_set_name(keyring_handler, _(WINCRED_NAME));
 	purple_keyring_set_id(keyring_handler, WINCRED_ID);
 	purple_keyring_set_read_password(keyring_handler, wincred_read);
 	purple_keyring_set_save_password(keyring_handler, wincred_save);
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -5935,6 +5935,9 @@ static void pidgin_blist_show(PurpleBudd
 
 	/******************************* Menu bar *************************************/
 	action_group = gtk_action_group_new("BListActions");
+#ifdef ENABLE_NLS
+	gtk_action_group_set_translation_domain(action_group, PACKAGE);
+#endif
 	gtk_action_group_add_actions(action_group,
 	                             blist_menu_entries,
 	                             G_N_ELEMENTS(blist_menu_entries),
@@ -5943,10 +5946,6 @@ static void pidgin_blist_show(PurpleBudd
 	                                    blist_menu_toggle_entries,
 	                                    G_N_ELEMENTS(blist_menu_toggle_entries),
 	                                    GTK_WINDOW(gtkblist->window));
-#ifdef ENABLE_NLS
-	gtk_action_group_set_translation_domain(action_group,
-	                                        PACKAGE);
-#endif
 
 	gtkblist->ui = gtk_ui_manager_new();
 	gtk_ui_manager_insert_action_group(gtkblist->ui, action_group, 0);
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -65,7 +65,6 @@
 #include "gtkthemes.h"
 #include "gtkutils.h"
 #include "gtkwebview.h"
-#include "gtkwebviewtoolbar.h"
 #include "pidginstock.h"
 #include "pidgintooltip.h"
 #include "smileyparser.h"
@@ -1242,12 +1241,12 @@ menu_insert_link_cb(GtkAction *action, g
 {
 	PidginWindow *win = data;
 	PidginConversation *gtkconv;
-	GtkWebViewToolbar *toolbar;
+	GtkWebView *entry;
 
 	gtkconv = pidgin_conv_window_get_active_gtkconv(win);
-	toolbar = GTK_WEBVIEWTOOLBAR(gtkconv->toolbar);
-
-	gtk_webviewtoolbar_activate(toolbar, GTK_WEBVIEWTOOLBAR_ACTION_LINK);
+	entry = GTK_WEBVIEW(gtkconv->entry);
+
+	gtk_webview_activate_toolbar(entry, GTK_WEBVIEW_ACTION_LINK);
 }
 
 static void
@@ -1255,12 +1254,12 @@ menu_insert_image_cb(GtkAction *action, 
 {
 	PidginWindow *win = data;



More information about the Commits mailing list