/soc/2012/tomkiewicz/gg: 81e772e6ae93: Merge validation feature ...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Mon Aug 6 12:12:22 EDT 2012


Changeset: 81e772e6ae93b2ea70a96fc18a88202334e032c5
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-08-06 18:11 +0200
Branch:	 soc.2012.gg
URL: http://hg.pidgin.im/soc/2012/tomkiewicz/gg/rev/81e772e6ae93

Description:

Merge validation feature for Request API

diffstat:

 COPYRIGHT                                 |    3 +-
 ChangeLog                                 |    8 +
 README                                    |    4 +-
 README.MTN                                |    6 +-
 README.mingw                              |    2 +-
 config.h.mingw                            |    3 -
 configure.ac                              |   96 ++-
 doc/pidgin.1.in                           |    4 +-
 finch/gntrequest.c                        |    7 +-
 libpurple/mediamanager.c                  |    9 +-
 libpurple/protocols/msn/userlist.c        |    1 +
 libpurple/protocols/yahoo/yahoo_picture.c |    3 -
 libpurple/protocols/yahoo/yahoo_profile.c |    4 -
 libpurple/prpl.h                          |   17 +-
 libpurple/request.c                       |  238 ++++++++-
 libpurple/request.h                       |  120 ++++-
 libpurple/util.c                          |   22 +
 libpurple/util.h                          |   11 +
 pidgin/gtk3compat.h                       |  172 ++++++
 pidgin/gtkaccount.c                       |   67 +-
 pidgin/gtkblist-theme-loader.c            |    2 +
 pidgin/gtkblist.c                         |  432 +++++++++++-----
 pidgin/gtkblist.h                         |    8 +-
 pidgin/gtkcellrendererexpander.c          |  136 +++-
 pidgin/gtkcertmgr.c                       |    4 +
 pidgin/gtkconv.c                          |  612 +++++++++++++----------
 pidgin/gtkconvwin.h                       |    2 +
 pidgin/gtkdebug.c                         |  762 +++++++++++------------------
 pidgin/gtkdialogs.c                       |   47 +-
 pidgin/gtkdialogs.h                       |    3 -
 pidgin/gtkdnd-hints.c                     |   82 ++-
 pidgin/gtkdocklet.c                       |   54 +-
 pidgin/gtkft.c                            |   31 +-
 pidgin/gtkimhtml.c                        |  285 +++++++---
 pidgin/gtkimhtml.h                        |    6 +-
 pidgin/gtkimhtmltoolbar.c                 |  105 ++-
 pidgin/gtklog.c                           |   18 +-
 pidgin/gtkmedia.c                         |   12 +-
 pidgin/gtkmenutray.c                      |   74 ++-
 pidgin/gtkmenutray.h                      |    3 -
 pidgin/gtknotify.c                        |   41 +-
 pidgin/gtkplugin.c                        |   30 +-
 pidgin/gtkpluginpref.c                    |   41 +-
 pidgin/gtkpounce.c                        |   69 +-
 pidgin/gtkprefs.c                         |   34 +-
 pidgin/gtkprivacy.c                       |   10 +-
 pidgin/gtkrequest.c                       |  147 ++---
 pidgin/gtkroomlist.c                      |   69 ++-
 pidgin/gtksavedstatuses.c                 |   38 +-
 pidgin/gtkscrollbook.c                    |    4 +-
 pidgin/gtksession.c                       |    4 +-
 pidgin/gtksmiley.c                        |   21 +-
 pidgin/gtksourceundomanager.c             |    2 +
 pidgin/gtkstatusbox.c                     |  281 ++++++----
 pidgin/gtkutils.c                         |  242 +++++----
 pidgin/gtkutils.h                         |    1 -
 pidgin/gtkwebview.c                       |  494 ++++++++++++++++---
 pidgin/gtkwebview.h                       |   43 +-
 pidgin/gtkwebviewtoolbar.c                |   80 ++-
 pidgin/gtkwhiteboard.c                    |  147 +++--
 pidgin/gtkwhiteboard.h                    |   21 +-
 pidgin/minidialog.c                       |    7 +-
 pidgin/pidginstock.c                      |    2 +-
 pidgin/pidgintooltip.c                    |   30 +-
 pidgin/pidgintooltip.h                    |    4 +-
 pidgin/plugins/contact_priority.c         |   11 +-
 pidgin/plugins/convcolors.c               |    4 +-
 pidgin/plugins/disco/gtkdisco.c           |   18 +-
 pidgin/plugins/gestures/stroke-draw.c     |    6 +-
 pidgin/plugins/history.c                  |    3 +
 pidgin/plugins/themeedit.c                |    3 -
 pidgin/plugins/ticker/gtkticker.c         |  174 ++++--
 pidgin/plugins/timestamp.c                |    2 +-
 pidgin/plugins/timestamp_format.c         |    2 +-
 pidgin/plugins/vvconfig.c                 |    4 +-
 pidgin/plugins/xmppconsole.c              |   74 +-
 po/de.po                                  |   14 +-
 77 files changed, 3600 insertions(+), 2052 deletions(-)

diffs (truncated from 11270 to 300 lines):

diff --git a/COPYRIGHT b/COPYRIGHT
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -15,7 +15,7 @@ If concerns are raised as to the copyrig
 piece of code, then that code should be traced through our version
 control system to see from where it came and who has modified it.
 
-Copyright (C) 1998-2011 by the following:
+Copyright (C) 1998-2012 by the following:
 
 Saleem Abdulrasool
 Jakub Adam
@@ -40,6 +40,7 @@ R. Tyler Ballance
 Chris Banal
 Luca Barbato
 Levi Bard
+Mark Barfield
 Ryan Barrett
 Kevin Barry
 Lukas Barth
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,14 @@ version 3.0.0 (??/??/????):
 	* The Offline Message Emulation plugin now adds a note that the message
 	  was an offline message. (Flavius Anton) (#2497)
 
+	MSN:
+	* Fix a crash when removing a user before its icon is loaded. (Mark
+	  Barfield) (#15217)
+
+	Yahoo!:
+	* Fix a double-free in profile/picture loading code. (Mihai Serban)
+	  (#15053)
+
 version 2.10.6 (07/06/2012):
 	Pidgin:
 	* Fix a bug that requires a triple-click to open a conversation
diff --git a/README b/README
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ libpurple is a library intended to be us
 to write an IM client that connects to many IM networks.  It supports
 AIM, ICQ, XMPP, MSN and Yahoo!, among others.
 
-Pidgin is an graphical IM client written in C which uses the GTK+
+Pidgin is a graphical IM client written in C which uses the GTK+
 toolkit.
 
 Finch is a text-based IM client written in C which uses the ncurses
@@ -43,7 +43,7 @@ you only need to run 'pidgin' or 'finch'
 
 To get started, simply add a new account.
 
-If you come across a bug, please report it at: http://pidgin.im
+If you come across a bug, please report it at: http://developer.pidgin.im
 
 PLUGINS
 =======
diff --git a/README.MTN b/README.hg
rename from README.MTN
rename to README.hg
--- a/README.MTN
+++ b/README.hg
@@ -1,13 +1,13 @@
-If you plan to use Pidgin, Finch and libpurple from our Monotone repository,
+If you plan to use Pidgin, Finch and libpurple from our Mercurial repository,
 PLEASE read this message in its entirety!
 
 Pidgin, Finch, and libpurple are a fast-moving project with a somewhat regular
-release schedule.  Due to the rate of development, the code in our Monotone
+release schedule.  Due to the rate of development, the code in our Mercurial
 repository undergoes frequent bursts of massive changes, often leaving behind
 brokenness and partial functionality while the responsible developers rewrite
 some portion of code or seek to add new features.
 
-What this all boils down to is that the code in our Monotone repository _WILL_
+What this all boils down to is that the code in our Mercurial repository _WILL_
 sometimes be broken.  Because of this, we ask that users who are not interested
 in personally tracking down bugs and fixing them (without a lot of
 assistance from the developers!) use only released versions.  Since releases
diff --git a/README.mingw b/README.mingw
--- a/README.mingw
+++ b/README.mingw
@@ -1,5 +1,5 @@
 How to build Pidgin for Windows using MinGW
-=============================
+===========================================
 
 For the latest build instructions, please refer to:
 
diff --git a/config.h.mingw b/config.h.mingw
--- a/config.h.mingw
+++ b/config.h.mingw
@@ -180,9 +180,6 @@
 /* Define to 1 if you have the `random' function. */
 /* #define HAVE_RANDOM 1 */
 
-/* Define to 1 if you have the <regex.h> header file. */
-/* #define HAVE_REGEX_H 1 */
-
 /* Define to 1 if you have the `setlocale' function. */
 #define HAVE_SETLOCALE 1
 
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
+AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -372,6 +372,9 @@ AC_ARG_WITH(x, [],
 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
 		[compile without GTK+ user interface])],
 	enable_gtkui="$enableval", enable_gtkui="yes")
+AC_ARG_WITH(gtk, [AC_HELP_STRING([--with-gtk=<version>],
+		[compile with GTK+ 2 or 3 user interface (default: auto)])],
+	with_gtk="$withval", with_gtk="auto")
 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
 		[compile without console user interface])],
 	[enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
@@ -428,15 +431,35 @@ else
 fi
 
 if test "x$enable_gtkui" = "xyes" ; then
-	PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
-		AC_MSG_RESULT(no)
-		AC_MSG_ERROR([
-
+	if test "x$with_gtk" = "x3"; then
+		PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0], , [
+			AC_MSG_RESULT(no)
+			AC_MSG_ERROR([
+You must have GTK+ 3.0.0 or newer development headers installed to compile
+Pidgin.  If you want to build only Finch then specify --disable-gtkui when
+running configure.
+])])
+	elif test "x$with_gtk" = "x2"; then
+		PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
+			AC_MSG_RESULT(no)
+			AC_MSG_ERROR([
 You must have GTK+ 2.10.0 or newer development headers installed to compile
 Pidgin.  If you want to build only Finch then specify --disable-gtkui when
 running configure.
 ])])
-
+	elif test "x$with_gtk" = "xauto"; then
+		PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0], [with_gtk=3], [
+			AC_MSG_RESULT(no)
+			PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], [with_gtk=2], [
+				AC_MSG_RESULT(no)
+				AC_MSG_ERROR([
+You must have GTK+ 2.10.0 or newer development headers installed to compile
+Pidgin.  If you want to build only Finch then specify --disable-gtkui when
+running configure.
+])])])
+	else
+		AC_MSG_ERROR([--with-gtk must specify one of 2, 3 or auto.])
+	fi
 	AC_SUBST(GTK_CFLAGS)
 	AC_SUBST(GTK_LIBS)
 
@@ -444,13 +467,24 @@ running configure.
 	PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
 			AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
 
-	PKG_CHECK_MODULES(WEBKIT, [webkit-1.0 >= 1.1.1], , [
-		AC_MSG_RESULT(no)
-		AC_MSG_ERROR([
-You must have WebKit 1.1.1 or newer development headers installed to compile
-Pidgin.  If you want to build only Finch then specify --disable-gtkui when
-running configure.
+	WEBKIT_VERSION=1.1.1
+	if test "x$with_gtk" = "x3"; then
+		PKG_CHECK_MODULES(WEBKIT, [webkitgtk-3.0 >= $WEBKIT_VERSION], , [
+			AC_MSG_RESULT(no)
+			AC_MSG_ERROR([
+You must have WebKit for GTK+3 $WEBKIT_VERSION or newer development headers
+installed to compile Pidgin.  If you want to build only Finch then specify
+--disable-gtkui when running configure.
 ])])
+	else
+		PKG_CHECK_MODULES(WEBKIT, [webkit-1.0 >= $WEBKIT_VERSION], , [
+			AC_MSG_RESULT(no)
+			AC_MSG_ERROR([
+You must have WebKit for GTK+2 $WEBKIT_VERSION or newer development headers
+installed to compile Pidgin.  If you want to build only Finch then specify
+--disable-gtkui when running configure.
+])])
+	fi
 	AC_SUBST(WEBKIT_CFLAGS)
 	AC_SUBST(WEBKIT_LIBS)
 
@@ -565,6 +599,10 @@ Use --disable-sm if you do not need sess
 	dnl #######################################################################
 	dnl # Check for GtkSpell
 	dnl #######################################################################
+	dnl GtkSpell is not GTK+3 compatible yet
+	if test "x$with_gtk" = "x3"; then
+		enable_gtkspell="no"
+	fi
 	if test "x$enable_gtkspell" = "xyes" ; then
 		PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
 			AC_MSG_RESULT(no)
@@ -629,16 +667,29 @@ Use --disable-cap if you do not need the
 	dnl # Check for GCR for its certificate widgets
 	dnl #######################################################################
 	if test "x$enable_gcr" = "xyes"; then
-		PKG_CHECK_MODULES(GCR, gcr-0, [
-			AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
-			AC_MSG_RESULT(no)
-			enable_gcr="no"
-			if test "x$force_deps" = "xyes" ; then
-				AC_MSG_ERROR([
-GCR development headers not found.
+		if test "x$with_gtk" = "x3"; then
+			PKG_CHECK_MODULES(GCR, gcr-3, [
+				AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
+				AC_MSG_RESULT(no)
+				enable_gcr="no"
+				if test "x$force_deps" = "xyes" ; then
+					AC_MSG_ERROR([
+GCR for GTK+3 development headers not found.
 Use --disable-gcr if you do not need GCR certificate widgets.
 ])
-			fi])
+				fi])
+		else
+			PKG_CHECK_MODULES(GCR, gcr-0, [
+				AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
+				AC_MSG_RESULT(no)
+				enable_gcr="no"
+				if test "x$force_deps" = "xyes" ; then
+					AC_MSG_ERROR([
+GCR for GTK+2 development headers not found.
+Use --disable-gcr if you do not need GCR certificate widgets.
+])
+				fi])
+		fi
 	fi
 
 
@@ -2612,7 +2663,10 @@ echo
 echo $PACKAGE $VERSION
 
 echo
-echo Build GTK+ 2.x UI............. : $enable_gtkui
+echo Build GTK+ UI................. : $enable_gtkui
+if test "x$enable_gtkui" = "xyes"; then
+	echo Build for GTK+ version........ : $with_gtk
+fi
 echo Build console UI.............. : $enable_consoleui
 echo Build for X11................. : $with_x
 echo
diff --git a/doc/pidgin.1.in b/doc/pidgin.1.in
--- a/doc/pidgin.1.in
+++ b/doc/pidgin.1.in
@@ -218,9 +218,7 @@ animation, otherwise only the first fram
 .TP
 .B Notify buddies that you are typing to them
 Some protocols allow clients to tell their buddies when they are typing.
-This option enables this feature for protocols that supports it.  For XMPP,
-this also enables sending the "User has left the conversation" message
-when ending the conversation.
+This option enables this feature for protocols that supports it.
 
 .TP
 .B Default Formatting
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -388,10 +388,11 @@ request_fields_cb(GntWidget *button, Pur
 	purple_notify_close_with_handle(button);
 
 	if (!g_object_get_data(G_OBJECT(button), "cancellation-function") &&
-			!purple_request_fields_all_required_filled(fields)) {
+			(!purple_request_fields_all_required_filled(fields) ||
+			!purple_request_fields_all_valid(fields))) {
 		purple_notify_error(button, _("Error"),
-				_("You must fill all the required fields."),
-				_("The required fields are underlined."));
+			_("You must properly fill all the required fields."),
+			_("The required fields are underlined."));
 		return;
 	}
 
diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c
--- a/libpurple/mediamanager.c
+++ b/libpurple/mediamanager.c
@@ -742,8 +742,13 @@ window_id_cb(GstBus *bus, GstMessage *ms
 			| G_SIGNAL_MATCH_DATA, 0, 0, NULL,
 			window_id_cb, ow);
 
-	gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(
-			GST_MESSAGE_SRC(msg)), ow->window_id);



More information about the Commits mailing list