/soc/2013/ankitkv/gobjectification: 94d1a2589d5a: Merged default...

Ankit Vani a at nevitus.org
Tue Feb 11 13:19:18 EST 2014


Changeset: 94d1a2589d5a0096e3dab2241610f2c0ecb1a492
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-02-11 23:47 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/94d1a2589d5a

Description:

Merged default branch

diffstat:

 ChangeLog                                      |    4 +-
 configure.ac                                   |    8 +-
 libpurple/plugins/perl/common/module.h         |    8 +-
 libpurple/plugins/perl/perl-common.h           |    4 +
 libpurple/plugins/perl/perl.c                  |    3 +
 libpurple/plugins/tcl/tcl_glib.c               |   12 +-
 libpurple/protocols/novell/nmrtf.c             |   21 ++--
 pidgin/gtk3compat.h                            |   61 +++++++++++++
 pidgin/gtkaccount.c                            |   22 ++--
 pidgin/gtkblist.c                              |   20 ++--
 pidgin/gtkcertmgr.c                            |    8 +-
 pidgin/gtkconv.c                               |   73 ++++++++++------
 pidgin/gtkdebug.c                              |    2 +-
 pidgin/gtkdialogs.c                            |    2 +-
 pidgin/gtklog.c                                |    8 +-
 pidgin/gtkmedia.c                              |   14 +-
 pidgin/gtkmenutray.c                           |    7 +-
 pidgin/gtknotify.c                             |    3 +-
 pidgin/gtkplugin.c                             |    2 +-
 pidgin/gtkpluginpref.c                         |    8 +-
 pidgin/gtkpounce.c                             |    7 +-
 pidgin/gtkprefs.c                              |   68 ++++++++-------
 pidgin/gtkrequest.c                            |   38 ++++----
 pidgin/gtkroomlist.c                           |    3 +-
 pidgin/gtksavedstatuses.c                      |    6 +-
 pidgin/gtkscrollbook.c                         |    3 +-
 pidgin/gtkstatusbox.c                          |   10 +-
 pidgin/gtkutils.c                              |   30 +++---
 pidgin/gtkwebviewtoolbar.c                     |    8 +-
 pidgin/gtkwhiteboard.c                         |   12 +-
 pidgin/minidialog.c                            |    8 +-
 pidgin/pidgintooltip.c                         |   13 ++-
 pidgin/plugins/contact_priority.c              |   13 +-
 pidgin/plugins/disco/gtkdisco.c                |    3 +-
 pidgin/plugins/gestures/gestures.c             |    3 +-
 pidgin/plugins/gevolution/add_buddy_dialog.c   |   22 ++--
 pidgin/plugins/gevolution/assoc-buddy.c        |   22 ++--
 pidgin/plugins/gevolution/eds-utils.c          |  112 ++++++++++--------------
 pidgin/plugins/gevolution/gevo-util.c          |   37 ++++++-
 pidgin/plugins/gevolution/gevolution.c         |    3 +-
 pidgin/plugins/gevolution/gevolution.h         |    8 +-
 pidgin/plugins/gevolution/new_person_dialog.c  |   16 ++-
 pidgin/plugins/musicmessaging/musicmessaging.c |    5 +-
 pidgin/plugins/notify.c                        |   11 +-
 pidgin/plugins/perl/common/gtkmodule.h         |    4 +
 pidgin/plugins/raw.c                           |    3 +-
 pidgin/plugins/spellchk.c                      |   11 +-
 pidgin/plugins/themeedit-icon.c                |    5 +-
 pidgin/plugins/themeedit.c                     |    4 +-
 pidgin/plugins/ticker/ticker.c                 |    3 +-
 pidgin/plugins/win32/transparency/win2ktrans.c |    7 +-
 pidgin/plugins/xmppconsole.c                   |   28 +++---
 po/POTFILES.in                                 |    3 +-
 53 files changed, 483 insertions(+), 336 deletions(-)

diffs (truncated from 2801 to 300 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,10 +8,12 @@ version 3.0.0 (??/??/????):
 	  support.  The default is 'auto', which will first look for 3.x
 	  development headers and then 2.x development headers.
 	* Add email notification in the docklet area. (Alexei) (#3571)
-	* Add a pref to select the type messages in conversation that triggers 
+	* Add a pref to select the type messages in conversation that triggers
 	  the docklet notification. (Momchil) (#12598)
 	* Complete support for receiving a limited amount of history when
 	  joining a room. (Kha) (#15458)
+	* Fix gevolution plugin to compile with e-d-s >= 3.6, older versions are
+	  not supported anymore. (Ed Catmur) (#15353)
 
 	Finch:
 	* Support the conversation-extended signal for extending the
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -634,16 +634,10 @@ Use --disable-gtkspell if you do not nee
 	dnl # Check for stuff needed by the Evolution integration plugin.
 	dnl #######################################################################
 	if test "x$enable_gevolution" = "xyes"; then
-		evo_deps="libebook-1.2 libedata-book-1.2"
+		evo_deps="libebook-1.2 libedata-book-1.2 evolution-data-server-1.2 >= 3.6"
 		PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
 			enable_gevolution="no"
 		])
-		if test "x$enable_gevolution" = "xno"; then
-			evo_deps="libebook-1.0 libedata-book-1.0"
-			PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
-				enable_gevolution="yes"
-			])
-		fi
 		if test "x$enable_gevolution" = "xyes"; then
 			AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
 			AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
diff --git a/libpurple/plugins/perl/common/module.h b/libpurple/plugins/perl/common/module.h
--- a/libpurple/plugins/perl/common/module.h
+++ b/libpurple/plugins/perl/common/module.h
@@ -1,6 +1,8 @@
 /* Allow the Perl code to see deprecated functions, so we can continue to
  * export them to Perl plugins. */
-#undef PURPLE_DISABLE_DEPRECATED
+/* Re-enable this after 3.0.0 release.
+ #undef PURPLE_DISABLE_DEPRECATED
+ */
 
 typedef struct group *Purple__Group;
 
@@ -11,6 +13,10 @@ typedef struct group *Purple__Group;
 #undef pipe
 #undef STRINGIFY
 #endif
+
+#define SILENT_NO_TAINT_SUPPORT 0
+#define NO_TAINT_SUPPORT 0
+
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
diff --git a/libpurple/plugins/perl/perl-common.h b/libpurple/plugins/perl/perl-common.h
--- a/libpurple/plugins/perl/perl-common.h
+++ b/libpurple/plugins/perl/perl-common.h
@@ -6,6 +6,10 @@
 #undef STRINGIFY
 #undef pipe
 #endif
+
+#define SILENT_NO_TAINT_SUPPORT 0
+#define NO_TAINT_SUPPORT 0
+
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
diff --git a/libpurple/plugins/perl/perl.c b/libpurple/plugins/perl/perl.c
--- a/libpurple/plugins/perl/perl.c
+++ b/libpurple/plugins/perl/perl.c
@@ -48,6 +48,9 @@
 # define HAS_UNION_SEMUN
 #endif
 
+#define SILENT_NO_TAINT_SUPPORT 0
+#define NO_TAINT_SUPPORT 0
+
 #include <perl.h>
 #include <XSUB.h>
 
diff --git a/libpurple/plugins/tcl/tcl_glib.c b/libpurple/plugins/tcl/tcl_glib.c
--- a/libpurple/plugins/tcl/tcl_glib.c
+++ b/libpurple/plugins/tcl/tcl_glib.c
@@ -68,6 +68,10 @@
 
 #include "tcl_glib.h"
 
+#ifndef CONST86
+#  define CONST86
+#endif
+
 struct tcl_file_handler {
 	int source;
 	int fd;
@@ -86,8 +90,8 @@ static guint tcl_timer;
 static gboolean tcl_timer_pending;
 static GHashTable *tcl_file_handlers;
 
-static void tcl_set_timer(Tcl_Time *timePtr);
-static int tcl_wait_for_event(Tcl_Time *timePtr);
+static void tcl_set_timer(CONST86 Tcl_Time *timePtr);
+static int tcl_wait_for_event(CONST86 Tcl_Time *timePtr);
 static void tcl_create_file_handler(int fd, int mask, Tcl_FileProc *proc, ClientData data);
 static void tcl_delete_file_handler(int fd);
 
@@ -120,7 +124,7 @@ void tcl_glib_init ()
 	tcl_file_handlers = g_hash_table_new(g_direct_hash, g_direct_equal);
 }
 
-static void tcl_set_timer(Tcl_Time *timePtr)
+static void tcl_set_timer(CONST86 Tcl_Time *timePtr)
 {
 	guint interval;
 
@@ -137,7 +141,7 @@ static void tcl_set_timer(Tcl_Time *time
 	tcl_timer_pending = TRUE;
 }
 
-static int tcl_wait_for_event(Tcl_Time *timePtr)
+static int tcl_wait_for_event(CONST86 Tcl_Time *timePtr)
 {
 	if (!timePtr || (timePtr->sec == 0 && timePtr->usec == 0)) {
 		g_main_context_iteration(NULL, FALSE);
diff --git a/libpurple/protocols/novell/nmrtf.c b/libpurple/protocols/novell/nmrtf.c
--- a/libpurple/protocols/novell/nmrtf.c
+++ b/libpurple/protocols/novell/nmrtf.c
@@ -132,7 +132,8 @@ struct _NMRtfContext
 	int depth;				/* how many groups deep are we */
 	gboolean skip_unknown;	/* if true, skip any unknown destinations (this is set after encountering '\*') */
 	char *input;			/* input string */
-	char nextch;			/* next char in input */
+	guchar nextch;			/* next char in input */
+	gboolean nextch_available;	/* nextch value is set */
 	GString *ansi;   		/* Temporary ansi text, will be convert/flushed to the output string */
 	GString *output; 		/* The plain text UTF8 string */
 };
@@ -217,7 +218,7 @@ NMRtfContext *
 nm_rtf_init()
 {
 	NMRtfContext *ctx = g_new0(NMRtfContext, 1);
-	ctx->nextch = -1;
+	ctx->nextch_available = FALSE;
 	ctx->ansi = g_string_new("");
 	ctx->output = g_string_new("");
 	return ctx;
@@ -802,14 +803,13 @@ rtf_dispatch_special(NMRtfContext *ctx, 
 static int
 rtf_get_char(NMRtfContext *ctx, guchar *ch)
 {
-    if (ctx->nextch >= 0) {
-        *ch = ctx->nextch;
-        ctx->nextch = -1;
-    }
-    else {
+	if (ctx->nextch_available) {
+		*ch = ctx->nextch;
+		ctx->nextch_available = FALSE;
+	} else {
 		*ch = *(ctx->input);
 		ctx->input++;
-    }
+	}
 
 	if (*ch)
 		return NMRTF_OK;
@@ -823,6 +823,7 @@ rtf_get_char(NMRtfContext *ctx, guchar *
 static int
 rtf_unget_char(NMRtfContext *ctx, guchar ch)
 {
-    ctx->nextch = ch;
-    return NMRTF_OK;
+	ctx->nextch = ch;
+	ctx->nextch_available = TRUE;
+	return NMRTF_OK;
 }
diff --git a/pidgin/gtk3compat.h b/pidgin/gtk3compat.h
--- a/pidgin/gtk3compat.h
+++ b/pidgin/gtk3compat.h
@@ -58,6 +58,67 @@ static inline GtkWidget * gtk_font_choos
 #define GDK_IS_QUARTZ_WINDOW(window) TRUE
 #endif
 
+static inline GtkWidget *
+gtk_box_new(GtkOrientation orientation, gint spacing)
+{
+	g_return_val_if_fail(orientation == GTK_ORIENTATION_HORIZONTAL ||
+		orientation == GTK_ORIENTATION_VERTICAL, NULL);
+
+	if (orientation == GTK_ORIENTATION_HORIZONTAL)
+		return gtk_hbox_new(FALSE, spacing);
+	else /* GTK_ORIENTATION_VERTICAL */
+		return gtk_vbox_new(FALSE, spacing);
+}
+
+static inline GtkWidget *
+gtk_separator_new(GtkOrientation orientation)
+{
+	g_return_val_if_fail(orientation == GTK_ORIENTATION_HORIZONTAL ||
+		orientation == GTK_ORIENTATION_VERTICAL, NULL);
+
+	if (orientation == GTK_ORIENTATION_HORIZONTAL)
+		return gtk_hseparator_new();
+	else /* GTK_ORIENTATION_VERTICAL */
+		return gtk_vseparator_new();
+}
+
+static inline GtkWidget *
+gtk_button_box_new(GtkOrientation orientation)
+{
+	g_return_val_if_fail(orientation == GTK_ORIENTATION_HORIZONTAL ||
+		orientation == GTK_ORIENTATION_VERTICAL, NULL);
+
+	if (orientation == GTK_ORIENTATION_HORIZONTAL)
+		return gtk_hbutton_box_new();
+	else /* GTK_ORIENTATION_VERTICAL */
+		return gtk_vbutton_box_new();
+}
+
+static inline GtkWidget *
+gtk_paned_new(GtkOrientation orientation)
+{
+	g_return_val_if_fail(orientation == GTK_ORIENTATION_HORIZONTAL ||
+		orientation == GTK_ORIENTATION_VERTICAL, NULL);
+
+	if (orientation == GTK_ORIENTATION_HORIZONTAL)
+		return gtk_hpaned_new();
+	else /* GTK_ORIENTATION_VERTICAL */
+		return gtk_vpaned_new();
+}
+
+static inline GtkWidget *
+gtk_scale_new_with_range(GtkOrientation orientation, gdouble min, gdouble max,
+	gdouble step)
+{
+	g_return_val_if_fail(orientation == GTK_ORIENTATION_HORIZONTAL ||
+		orientation == GTK_ORIENTATION_VERTICAL, NULL);
+
+	if (orientation == GTK_ORIENTATION_HORIZONTAL)
+		return gtk_hscale_new_with_range(min, max, step);
+	else /* GTK_ORIENTATION_VERTICAL */
+		return gtk_vscale_new_with_range(min, max, step);
+}
+
 #if !GTK_CHECK_VERSION(2,24,0)
 
 #define gdk_x11_set_sm_client_id gdk_set_sm_client_id
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -615,7 +615,7 @@ add_login_options(AccountPrefsDialog *di
 	gtk_widget_show(dialog->login_frame);
 
 	/* Main vbox */
-	vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PIDGIN_HIG_BOX_SPACE);
 	gtk_container_add(GTK_CONTAINER(frame), vbox);
 	gtk_widget_show(vbox);
 
@@ -803,7 +803,7 @@ add_user_options(AccountPrefsDialog *dia
 	gtk_widget_show(dialog->user_frame);
 
 	/* Main vbox */
-	vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, PIDGIN_HIG_BOX_SPACE);
 	gtk_container_add(GTK_CONTAINER(frame), vbox);
 	gtk_widget_show(vbox);
 
@@ -823,7 +823,7 @@ add_user_options(AccountPrefsDialog *dia
 	gtk_widget_show(dialog->icon_check);
 	gtk_box_pack_start(GTK_BOX(vbox), dialog->icon_check, FALSE, FALSE, 0);
 
-	dialog->icon_hbox = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+	dialog->icon_hbox = hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_BOX_SPACE);
 	gtk_widget_set_sensitive(hbox, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check)));
 	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 	gtk_widget_show(hbox);
@@ -846,11 +846,11 @@ add_user_options(AccountPrefsDialog *dia
 	purple_imgstore_unref(dialog->icon_img);
 	dialog->icon_img = NULL;
 
-	vbox2 = gtk_vbox_new(FALSE, 0);
+	vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
 	gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0);
 	gtk_widget_show(vbox2);
 
-	hbox2 = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+	hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_BOX_SPACE);
 	gtk_box_pack_start(GTK_BOX(vbox2), hbox2, FALSE, FALSE, PIDGIN_HIG_BORDER);
 	gtk_widget_show(hbox2);
 
@@ -949,7 +949,7 @@ add_account_options(AccountPrefsDialog *



More information about the Commits mailing list