[balsa] Add gtkhtml-4.0 support.
- From: Pawel Salek <pawels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Add gtkhtml-4.0 support.
- Date: Fri, 27 May 2011 22:24:53 +0000 (UTC)
commit 09c1ed2c92808edbb5e8b3376c4042bbe46653f6
Author: Pawel Salek <pawsa0 gmail com>
Date: Sat May 28 00:24:33 2011 +0200
Add gtkhtml-4.0 support.
ChangeLog | 5 +++++
configure.in | 30 +++++++-----------------------
libbalsa/mime.c | 9 +++++----
3 files changed, 17 insertions(+), 27 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7d36c51..e1dce0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-28 Pawel Salek
+
+ * libbalsa/mime.c: Correct the conditional compilation regression
+ * configure.in: add gtkhtml-4.0 support.
+
2011-05-27 Pawel Salek
* libbalsa/mime.c:
diff --git a/configure.in b/configure.in
index e0981e6..195c3bb 100644
--- a/configure.in
+++ b/configure.in
@@ -3,23 +3,14 @@ dnl follow section 5.3 of Autoconf, Automake book.
dnl
dnl 1. Boilerplate.
dnl
-AC_PREREQ(2.53)
-AC_INIT(src/balsa-app.h)
+AC_PREREQ(2.59)
dnl ###########################################################################
dnl Boilerplace and versioning
dnl ###########################################################################
-BALSA_MAJOR=2
-BALSA_REVISION=4
-BALSA_PATCHLEVEL=9
-BALSA_VERSION="$BALSA_MAJOR.$BALSA_REVISION.${BALSA_PATCHLEVEL}"
-
-AC_SUBST(BALSA_MAJOR)
-AC_SUBST(BALSA_REVISION)
-AC_SUBST(BALSA_PATCHLEVEL)
-AC_SUBST(BALSA_VERSION)
-
-AM_INIT_AUTOMAKE(balsa, "$BALSA_MAJOR.$BALSA_REVISION.${BALSA_PATCHLEVEL}")
+AC_INIT([balsa], [2.4.10], [])
+AM_INIT_AUTOMAKE
+AC_LANG([C])
# Automake-1.11 option for less verbose output
# configure --disable-silent-rules to restore verbose
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -27,15 +18,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
-
-AC_DEFINE_UNQUOTED(BALSA_MAJOR, $BALSA_MAJOR,
- [Define to the Balsa major version])
-AC_DEFINE_UNQUOTED(BALSA_REVISION, $BALSA_REVISION,
- [Define to the Balsa revision])
-AC_DEFINE_UNQUOTED(BALSA_PATCHLEVEL, $BALSA_PATCHLEVEL,
- [Define to the Balsa patch level])
-AC_DEFINE_UNQUOTED(BALSA_VERSION, "$BALSA_VERSION",
- [Define to the Balsa version])
+AC_DEFINE_UNQUOTED(BALSA_VERSION, "AC_PACKAGE_VERSION",[Defines the Balsa version])
dnl #####################################################################
dnl 2. Options
@@ -406,9 +389,10 @@ case "$use_html_widget" in
;;
gtkhtml3)
AC_MSG_RESULT([$use_html_widget])
+ PKG_CHECK_MODULES(HTML, [ libgtkhtml-4.0 ], [],
PKG_CHECK_MODULES(HTML, [ libgtkhtml-3.14 ], [],
[PKG_CHECK_MODULES(HTML, [ libgtkhtml-3.15 ],[],
- [AC_MSG_ERROR([*** You enabled gtkhtml3 but none of 3.14 or 3.15 libversions were found.])])])
+ [AC_MSG_ERROR([*** You enabled gtkhtml3 but none of 3.14 or 3.15 or or 4.0 libversions were found.])])]))
AC_DEFINE(HAVE_GTKHTML3,1,[Defined when GtkHtml-3 can be used.])
;;
webkit)
diff --git a/libbalsa/mime.c b/libbalsa/mime.c
index 4813701..a7999c5 100644
--- a/libbalsa/mime.c
+++ b/libbalsa/mime.c
@@ -54,6 +54,7 @@ process_mime_part(LibBalsaMessage * message, LibBalsaMessageBody * body,
GString *reply = NULL;
gchar *mime_type;
LibBalsaHTMLType html_type;
+ ssize_t allocated;
switch (libbalsa_message_body_type(body)) {
case LIBBALSA_MESSAGE_BODY_TYPE_OTHER:
@@ -77,13 +78,13 @@ process_mime_part(LibBalsaMessage * message, LibBalsaMessageBody * body,
if (ignore_html && html_type)
break;
- /*allocated =*/ libbalsa_message_body_get_content(body, &res, NULL);
- if (!res)
- return NULL;
+ allocated = libbalsa_message_body_get_content(body, &res, NULL);
+ if (!res || allocated == -1)
+ return NULL;
#ifdef HAVE_HTML_WIDGET
if (html_type) {
- size_t allocated = libbalsa_html_filter(html_type, &res, allocated);
+ allocated = libbalsa_html_filter(html_type, &res, allocated);
libbalsa_html_to_string(&res, allocated);
}
#endif /* HAVE_HTML_WIDGET */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]