[balsa] New configuration of HTML widget
- From: Peter Bloomfield <PeterB src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [balsa] New configuration of HTML widget
- Date: Sat, 6 Feb 2010 03:35:19 +0000 (UTC)
commit 63dcbf26379e918ff00db66eb68ec35c6e5e7b40
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Feb 5 22:34:23 2010 -0500
New configuration of HTML widget
* configure.in: use a case statement to configure html-widget.
* libbalsa/html.c: test for HAVE_HTML_WIDGET.
* libbalsa/html.h: ditto.
* libbalsa/mime.c (process_mime_part): ditto.
* src/balsa-message.c (bm_find_entry_changed_cb), (bm_find_again),
(preferred_part), (balsa_message_can_select),
(balsa_message_find_in_message): ditto.
* src/balsa-message.h: ditto.
* src/balsa-mime-widget-text.c (balsa_mime_widget_new_text):
ditto.
* src/main-window.c: ditto.
* src/message-window.c (mw_select_part_cb): ditto.
ChangeLog | 15 ++++++
configure.in | 103 +++++++++++++++---------------------------
libbalsa/html.c | 26 ++++++-----
libbalsa/html.h | 4 +-
libbalsa/mime.c | 4 +-
src/balsa-message.c | 28 ++++++------
src/balsa-message.h | 4 +-
src/balsa-mime-widget-text.c | 8 ++--
src/main-window.c | 44 +++++++++---------
src/message-window.c | 20 ++++----
10 files changed, 122 insertions(+), 134 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5e34383..08cc1a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2010-02-05 Peter Bloomfield
+ * configure.in: use a case statement to configure html-widget.
+ * libbalsa/html.c: test for HAVE_HTML_WIDGET.
+ * libbalsa/html.h: ditto.
+ * libbalsa/mime.c (process_mime_part): ditto.
+ * src/balsa-message.c (bm_find_entry_changed_cb), (bm_find_again),
+ (preferred_part), (balsa_message_can_select),
+ (balsa_message_find_in_message): ditto.
+ * src/balsa-message.h: ditto.
+ * src/balsa-mime-widget-text.c (balsa_mime_widget_new_text):
+ ditto.
+ * src/main-window.c: ditto.
+ * src/message-window.c (mw_select_part_cb): ditto.
+
+2010-02-05 Peter Bloomfield
+
* src/balsa-app.h: new boolean mark_quoted.
* src/balsa-mime-widget-text.c (balsa_mime_widget_new_text):
respect it.
diff --git a/configure.in b/configure.in
index a85d3a3..452d638 100644
--- a/configure.in
+++ b/configure.in
@@ -123,10 +123,11 @@ AC_ARG_WITH(gss,
[Enable GSS (default=no)]),
[with_gss=$withval],[with_gss=no])
-AC_ARG_WITH([gtkhtml],
- AC_HELP_STRING([--with-gtkhtml],
- [Preferred GtkHTML version, 2 or 3 (default=3)]),
- [use_gtkhtml=$withval],[use_gtkhtml=3])
+AC_ARG_WITH(html-widget,
+ AC_HELP_STRING([--with-html-widget=(no|gtkhtml2|gtkhtml3|webkit)],
+ [select the HTML renderer (default gtkhtml3)]),
+ [use_html_widget=$withval],
+ [use_html_widget=gtkhtml3])
AC_ARG_WITH([gtksourceview],
AC_HELP_STRING([--with-gtksourceview],
@@ -192,12 +193,6 @@ AC_ARG_WITH(unique,
[Use libUnique instead of BonoboActivation (default=no)]),
[with_unique=$withval],[with_unique=no])
-AC_ARG_WITH([webkit],
- AC_HELP_STRING([--with-webkit],
- [Use WebKit if available (default=no)]),
- [use_webkit=$withval],[use_webkit=no])
-
-
AC_ARG_ENABLE(more-warnings,
AC_HELP_STRING([--enable-more-warnings],
[Enable maximum compiler warnings (default=yes)]),
@@ -365,64 +360,41 @@ AC_SUBST(BALSA_LIBS)
AC_SUBST(BALSA_AB_LIBS)
AC_SUBST(BALSA_DEFS)
-# WebKit
+# HTML widget
#
-AC_MSG_CHECKING(whether to use WebKit)
-if test x"$use_webkit" != xno ; then
- if $PKG_CONFIG --atleast-version=1.1.14 webkit-1.0; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_ERROR([WebKitGTK+ version 1.1.14 or newer is required.])
- fi
- if test x"$use_threads" = xno ; then
- AC_MSG_ERROR([WebKit cannot be used with threads disabled.])
- fi
- PKG_CHECK_MODULES(WEBKIT, [webkit-1.0])
- AC_DEFINE(HAVE_WEBKIT,1,[Defined when WebKit can be used.])
- AC_DEFINE(HAVE_GTKHTML,1,[Defined when GtkHtml can be used.])
- BALSA_CFLAGS="$BALSA_CFLAGS $WEBKIT_CFLAGS"
- BALSA_LIBS="$BALSA_LIBS $WEBKIT_LIBS"
- BALSA_AB_LIBS="$BALSA_AB_LIBS $WEBKIT_LIBS"
-else
- AC_MSG_RESULT([no])
-fi
-
-# GtkHtml library.
-#
-if test x"$use_gtkhtml" != xno ; then
- if test x"$use_webkit" != xno ; then
- AC_MSG_ERROR([--with-webkit and --with-gtkhtml are mutually exclusive.])
- fi
- case "$use_gtkhtml" in
- 2) check_pkgs="2.0 3.14 3.8 3.6 3.1 3.0";;
- *) check_pkgs="3.14 3.8 3.6 3.1 3.0 2.0";;
- esac
- use_gtkhtml=no
- for i in $check_pkgs; do
- if $PKG_CONFIG --exists libgtkhtml-$i ; then
- PKG_CHECK_MODULES(HTML, [ libgtkhtml-$i ])
- if test x"$i" = x2.0; then
- AC_DEFINE(HAVE_GTKHTML2,1,[Defined when GtkHtml-2 can be used.])
- else
- AC_DEFINE(HAVE_GTKHTML3,1,[Defined when GtkHtml-3 can be used.])
- CFLAGS="$CFLAGS $HTML_CFLAGS"
- LIBS="$LIBS $HTML_LIBS"
- AC_CHECK_LIB(gtkhtml-$i, gtk_html_print_page_with_header_footer,
- AC_DEFINE(HAVE_GTKHTML3_GTKPRINT,1,
- [Defined when GtkHtml-3 supports GtkPrint.]))
+AC_MSG_CHECKING(whether to use an HTML widget)
+case "$use_html_widget" in
+ gtkhtml2)
+ PKG_CHECK_MODULES(HTML, [ libgtkhtml-2.0 ])
+ AC_DEFINE(HAVE_GTKHTML2,1,[Defined when GtkHtml-2 can be used.])
+ ;;
+ gtkhtml3)
+ PKG_CHECK_MODULES(HTML, [ libgtkhtml-3.14 ])
+ AC_DEFINE(HAVE_GTKHTML3,1,[Defined when GtkHtml-3 can be used.])
+ ;;
+ webkit)
+ if ! $PKG_CONFIG --atleast-version=1.1.14 webkit-1.0; then
+ AC_MSG_ERROR([WebKitGTK+ version 1.1.14 or newer is required.])
fi
- AC_DEFINE(HAVE_GTKHTML,1,[Defined when GtkHtml can be used.])
- BALSA_CFLAGS="$BALSA_CFLAGS $HTML_CFLAGS"
- BALSA_LIBS="$BALSA_LIBS $HTML_LIBS"
- use_gtkhtml=$i
- break
- fi
- done
-else
- AC_MSG_CHECKING(whether to use GtkHTML)
- AC_MSG_RESULT(disabled)
+ if test x"$use_threads" = xno ; then
+ AC_MSG_ERROR([WebKit cannot be used with threads disabled.])
+ fi
+ PKG_CHECK_MODULES(HTML, [webkit-1.0])
+ AC_DEFINE(HAVE_WEBKIT,1,[Defined when WebKit can be used.])
+ ;;
+ no) ;;
+ *) AC_MSG_ERROR([bad option]) ;;
+esac
+
+AC_MSG_RESULT([$use_html_widget])
+
+if test x"$use_html_widget" != xno ; then
+ AC_DEFINE(HAVE_HTML_WIDGET,1,[Defined when any HTML widget can be used.])
+ BALSA_CFLAGS="$BALSA_CFLAGS $HTML_CFLAGS"
+ BALSA_LIBS="$BALSA_LIBS $HTML_LIBS"
fi
+
# GPGME detection.
# We don't use the std macro AM_PATH_GPGME here to avoid dependencies.
@@ -1014,11 +986,10 @@ echo " Installing into prefix: $prefix"
echo " Using multithreading: $use_threads"
echo " Enable compile warnings: $set_more_warnings"
echo " Use ESMTP : $with_esmtp"
-echo " Use WebKit (experimental): $use_webkit"
+echo " HTML widget: $use_html_widget"
echo " Use Unique (experimental): $with_unique"
echo " Use GNOME: $with_gnome"
echo " Use Canberra: $with_canberra"
-echo " Use GtkHTML: $use_gtkhtml"
echo " Use GPGME: $gpgmecfg"
echo " Use LDAP: $with_ldap"
echo " Use GSS: $with_gss"
diff --git a/libbalsa/html.c b/libbalsa/html.c
index 3b3ce1f..a332674 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -23,16 +23,18 @@
/*
* Support for HTML mail parts.
*
- * Balsa supports both GtkHtml-2 and GtkHTML-3. Code in configure.in
- * defines the symbol HAVE_GTKHTML if either is detected, and
- * HAVE_GTKHTML3 if GtkHTML-3 is detected. This file contains all code
- * that depends on which widget is being used. Elsewhere, HTML support
- * code should be conditional on HAVE_GTKHTML, but neither HAVE_GTKHTML2
- * nor HAVE_GTKHTML3 should be referenced outside this file.
+ * Balsa supports three HTML engines: GtkHtml-2, GtkHTML-3, and WebKit.
+ * The symbol HAVE_HTML_WIDGET is defined if HTML support is requested at
+ * configure time, and the requested engine is available.
*
- * As of this writing (2003-07), GtkHtml-2 has the more elegant design,
- * with separate concepts of document and view, but GtkHTML-3 has a far
- * more complete API.
+ * This file contains all code that depends on which widget is being
+ * used. Elsewhere, HTML support code should be conditional on
+ * HAVE_HTML_WIDGET, but none of HAVE_GTKHTML2, HAVE_GTKHTML3, or
+ * HAVE_WEBKIT should be referenced outside this file.
+ *
+ * As of this writing (2010-01), WebKit offers the most complete API,
+ * with string search, message part printing, and user control over
+ * downloading of images from remote servers.
*/
#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
@@ -44,7 +46,7 @@
#include <string.h>
#include <glib/gi18n.h>
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
/*
* Used by all HTML widgets
@@ -1254,7 +1256,7 @@ libbalsa_html_type(const gchar * mime_type)
return LIBBALSA_HTML_TYPE_NONE;
}
-#else /* HAVE_GTKHTML */
+#else /* HAVE_HTML_WIDGET */
LibBalsaHTMLType
libbalsa_html_type(const gchar * mime_type)
@@ -1264,4 +1266,4 @@ libbalsa_html_type(const gchar * mime_type)
return LIBBALSA_HTML_TYPE_NONE;
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
diff --git a/libbalsa/html.h b/libbalsa/html.h
index 135fdf0..6ce686f 100644
--- a/libbalsa/html.h
+++ b/libbalsa/html.h
@@ -43,7 +43,7 @@ typedef enum {
LIBBALSA_HTML_TYPE_RICHTEXT
} LibBalsaHTMLType;
-# ifdef HAVE_GTKHTML
+# ifdef HAVE_HTML_WIDGET
typedef void (*LibBalsaHtmlCallback) (const gchar * uri);
@@ -70,7 +70,7 @@ GtkWidget *libbalsa_html_popup_menu_widget(GtkWidget * widget);
gboolean libbalsa_html_can_print(GtkWidget * widget);
void libbalsa_html_print(GtkWidget * widget);
-# endif /* HAVE_GTKHTML */
+# endif /* HAVE_HTML_WIDGET */
LibBalsaHTMLType libbalsa_html_type(const gchar * mime_type);
diff --git a/libbalsa/mime.c b/libbalsa/mime.c
index 0bd052e..2cf8fdd 100644
--- a/libbalsa/mime.c
+++ b/libbalsa/mime.c
@@ -82,12 +82,12 @@ process_mime_part(LibBalsaMessage * message, LibBalsaMessageBody * body,
if (!res)
return NULL;
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
if (html_type) {
allocated = libbalsa_html_filter(html_type, &res, allocated);
libbalsa_html_to_string(&res, allocated);
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
if (flow && libbalsa_message_body_is_flowed(body)) {
/* we're making a `format=flowed' message, and the
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 1915d5b..586e089 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -505,7 +505,7 @@ bm_find_entry_changed_cb(GtkEditable * editable, gpointer data)
&match_begin, &match_end);
bm->find_iter = match_begin;
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
} else if (libbalsa_html_can_search(widget)) {
found = libbalsa_html_search_text(widget, text,
bm->find_forward, TRUE);
@@ -516,7 +516,7 @@ bm_find_entry_changed_cb(GtkEditable * editable, gpointer data)
&selection_bounds);
bm_find_scroll_to_rectangle(bm, widget, &selection_bounds);
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
} else
g_assert_not_reached();
@@ -560,7 +560,7 @@ bm_find_again(BalsaMessage * bm, gboolean find_forward)
bm_find_scroll_to_selection(bm, text_view,
&match_begin, &match_end);
bm->find_iter = match_begin;
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
} else if (libbalsa_html_can_search(widget)) {
GdkRectangle selection_bounds;
@@ -569,7 +569,7 @@ bm_find_again(BalsaMessage * bm, gboolean find_forward)
libbalsa_html_search_text(widget, text, find_forward, TRUE);
libbalsa_html_get_selection_bounds(widget, &selection_bounds);
bm_find_scroll_to_rectangle(bm, widget, &selection_bounds);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
} else
g_assert_not_reached();
@@ -1990,7 +1990,7 @@ balsa_message_has_previous_part(BalsaMessage * bmessage)
return FALSE;
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static gboolean
libbalsa_can_display(LibBalsaMessageBody *part)
{
@@ -2005,7 +2005,7 @@ libbalsa_can_display(LibBalsaMessageBody *part)
g_free(content_type);
return res;
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
/** Determines whether given part can be displayed. We display plain
text, parts html/rtf parts unless it has been disabled in the
@@ -2033,10 +2033,10 @@ preferred_part(LibBalsaMessageBody *parts)
if (g_ascii_strcasecmp(content_type, "text/plain") == 0 ||
g_ascii_strcasecmp(content_type, "text/calendar") == 0)
preferred = body;
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
else if (libbalsa_can_display(body))
preferred = body;
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
g_free(content_type);
}
@@ -2323,9 +2323,9 @@ balsa_message_can_select(BalsaMessage * bmessage)
return FALSE;
return GTK_IS_EDITABLE(w) || GTK_IS_TEXT_VIEW(w)
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
|| libbalsa_html_can_select(w)
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
;
}
@@ -2626,7 +2626,7 @@ mdn_dialog_response(GtkWidget * dialog, gint response, gpointer user_data)
gtk_widget_destroy(dialog);
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
/* Does the current part support zoom? */
gboolean
balsa_message_can_zoom(BalsaMessage * bm)
@@ -2657,7 +2657,7 @@ balsa_message_zoom(BalsaMessage * bm, gint in_out)
libbalsa_html_zoom(bm->current_part->mime_widget->widget, in_out);
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
#ifdef HAVE_GPGME
@@ -3279,9 +3279,9 @@ balsa_message_find_in_message(BalsaMessage * bm)
if (bm->current_part
&& (w = bm->current_part->mime_widget->widget)
&& (GTK_IS_TEXT_VIEW(w)
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
|| libbalsa_html_can_search(w)
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
)) {
if (GTK_IS_TEXT_VIEW(w)) {
GtkTextView *text_view = (GtkTextView *) w;
diff --git a/src/balsa-message.h b/src/balsa-message.h
index e659eed..f694320 100644
--- a/src/balsa-message.h
+++ b/src/balsa-message.h
@@ -129,11 +129,11 @@ gchar * balsa_message_sender_to_gchar(InternetAddressList * list, gint which);
GtkWidget *balsa_message_current_part_widget(BalsaMessage * bmessage);
GtkWindow *balsa_get_parent_window(GtkWidget *widget);
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
#define BALSA_MESSAGE_ZOOM_KEY "balsa-message-zoom"
gboolean balsa_message_can_zoom(BalsaMessage * bm);
void balsa_message_zoom(BalsaMessage * bm, gint in_out);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
#ifdef HAVE_GPGME
void balsa_message_perform_crypto(LibBalsaMessage * message,
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index 3ec2e42..6da1eb3 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -55,7 +55,7 @@ static gboolean fix_text_widget(GtkWidget *widget, gpointer data);
static void text_view_populate_popup(GtkTextView *textview, GtkMenu *menu,
LibBalsaMessageBody * mime_body);
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static BalsaMimeWidget *bm_widget_new_html(BalsaMessage * bm,
LibBalsaMessageBody *
mime_body);
@@ -155,7 +155,7 @@ balsa_mime_widget_new_text(BalsaMessage * bm, LibBalsaMessageBody * mime_body,
if (html_type) {
BalsaMimeWidget *html_widget = NULL;
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
/* Force vertical scrollbar while we render the html, otherwise
* the widget will make itself too wide to accept one, forcing
* otherwise unnecessary horizontal scrolling. */
@@ -1144,7 +1144,7 @@ bm_widget_on_url(const gchar *url)
gtk_statusbar_pop(statusbar, context_id);
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static void
bm_zoom_in(BalsaMessage * bm)
{
@@ -1279,7 +1279,7 @@ bm_widget_new_html(BalsaMessage * bm, LibBalsaMessageBody * mime_body)
return mw;
}
-#endif /* defined HAVE_GTKHTML */
+#endif /* defined HAVE_HTML_WIDGET */
#define TABLE_ATTACH(t,str,label) \
if(str) { GtkWidget *lbl = gtk_label_new(label); \
diff --git a/src/main-window.c b/src/main-window.c
index 842769f..3713214 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -153,9 +153,9 @@ static gboolean bw_imap_check_test(const gchar * path);
static void bw_enable_mailbox_menus(BalsaWindow * window, BalsaIndex * index);
static void bw_enable_message_menus(BalsaWindow * window, guint msgno);
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static void bw_enable_view_menus(BalsaWindow * window, BalsaMessage * bm);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
static void bw_register_open_mailbox(LibBalsaMailbox *m);
static void bw_unregister_open_mailbox(LibBalsaMailbox *m);
static gboolean bw_is_open_mailbox(LibBalsaMailbox *m);
@@ -207,11 +207,11 @@ static void bw_empty_trash_cb (GtkAction * action, gpointer data);
static void bw_header_activate_cb (GtkAction * action, gpointer data);
static void bw_expand_all_cb (GtkAction * action, gpointer data);
static void bw_collapse_all_cb (GtkAction * action, gpointer data);
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static void bw_zoom_in_cb (GtkAction * action, gpointer data);
static void bw_zoom_out_cb (GtkAction * action, gpointer data);
static void bw_zoom_100_cb (GtkAction * action, gpointer data);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
static void bw_copy_cb (GtkAction * action, gpointer data);
static void bw_select_all_cb (GtkAction * action, gpointer data);
@@ -429,7 +429,7 @@ static const GtkActionEntry entries[] = {
N_("Expand all threads"), G_CALLBACK(bw_expand_all_cb)},
{"CollapseAll", NULL, N_("_Collapse All"), "<control>L",
N_("Collapse all expanded threads"), G_CALLBACK(bw_collapse_all_cb)},
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
{"ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _In"), "<control>plus",
N_("Increase magnification"), G_CALLBACK(bw_zoom_in_cb)},
{"ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "<control>minus",
@@ -438,7 +438,7 @@ static const GtkActionEntry entries[] = {
/* xgettext:no-c-format */
{"Zoom100", GTK_STOCK_ZOOM_100, N_("Zoom _100%"), NULL,
N_("No magnification"), G_CALLBACK(bw_zoom_100_cb)},
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
/* Mailbox menu item that does not require a mailbox */
{"NextUnread", BALSA_PIXMAP_NEXT_UNREAD, N_("Next Unread Message"),
"<control>N", N_("Next Unread Message"),
@@ -746,12 +746,12 @@ static const char *ui_description =
" <separator/>"
" <menuitem action='ExpandAll'/>"
" <menuitem action='CollapseAll'/>"
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
" <separator/>"
" <menuitem action='ZoomIn'/>"
" <menuitem action='ZoomOut'/>"
" <menuitem action='Zoom100'/>"
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
" </menu>"
" <menu action='MailboxMenu'>"
" <menuitem action='NextMessage'/>"
@@ -861,12 +861,12 @@ static const char *ui_description =
" <menuitem action='NextUnread'/>"
" <menuitem action='NextMessage'/>"
" <menuitem action='PreviousMessage'/>"
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
" <separator/>"
" <menuitem action='ZoomIn'/>"
" <menuitem action='ZoomOut'/>"
" <menuitem action='Zoom100'/>"
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
" <separator/>"
" <menu action='ViewMoreMenu'>"
" <menuitem action='NextFlagged'/>"
@@ -1835,9 +1835,9 @@ balsa_window_new()
balsa_window_update_book_menus(window);
bw_enable_mailbox_menus(window, NULL);
bw_enable_message_menus(window, 0);
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
bw_enable_view_menus(window, NULL);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
#if !defined(ENABLE_TOUCH_UI)
balsa_window_enable_continue(window);
#endif /*ENABLE_TOUCH_UI */
@@ -2027,12 +2027,12 @@ bw_enable_edit_menus(BalsaWindow * window, BalsaMessage * bm)
bw_set_sensitive(window, "CopyMessage", enable);
bw_set_sensitive(window, "SelectText", enable);
#endif /* ENABLE_TOUCH_UI */
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
bw_enable_view_menus(window, bm);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
/*
* Enable/disable the Zoom menu items on the View menu.
*/
@@ -2045,7 +2045,7 @@ bw_enable_view_menus(BalsaWindow * window, BalsaMessage * bm)
bw_set_sensitive(window, "ZoomOut", enable);
bw_set_sensitive(window, "Zoom100", enable);
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
/*
* Enable/disable menu items/toolbar buttons which depend
@@ -3773,10 +3773,10 @@ bw_copy_cb(GtkAction * action, gpointer data)
G_TYPE_FROM_INSTANCE(focus_widget));
if (signal_id)
g_signal_emit(focus_widget, signal_id, (GQuark) 0);
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
else if (libbalsa_html_can_select(focus_widget))
libbalsa_html_copy(focus_widget);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
}
static void
@@ -4130,7 +4130,7 @@ bw_collapse_all_cb(GtkAction * action, gpointer data)
balsa_index_update_tree(BALSA_INDEX(index), FALSE);
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static void
bw_zoom_in_cb(GtkAction * action, gpointer data)
{
@@ -4151,7 +4151,7 @@ bw_zoom_100_cb(GtkAction * action, gpointer data)
GtkWidget *bm = BALSA_WINDOW(data)->preview;
balsa_message_zoom(BALSA_MESSAGE(bm), 0);
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
#if defined(ENABLE_TOUCH_UI)
static gboolean
@@ -5451,10 +5451,10 @@ balsa_window_select_all(GtkWindow * window)
gtk_tree_selection_select_all(selection);
}
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
} else if (libbalsa_html_can_select(focus_widget)) {
libbalsa_html_select_all(focus_widget);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
}
}
diff --git a/src/message-window.c b/src/message-window.c
index 37b53d9..199ee9b 100644
--- a/src/message-window.c
+++ b/src/message-window.c
@@ -71,11 +71,11 @@ static void next_flagged_cb (GtkAction * action, gpointer);
static void page_setup_cb (GtkAction * action, gpointer data);
static void print_cb (GtkAction * action, gpointer);
static void trash_cb (GtkAction * action, gpointer);
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static void mw_zoom_in_cb (GtkAction * action, MessageWindow * mw);
static void mw_zoom_out_cb (GtkAction * action, MessageWindow * mw);
static void mw_zoom_100_cb (GtkAction * action, MessageWindow * mw);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
static void size_alloc_cb(GtkWidget * window, GtkAllocation * alloc);
static void mw_set_buttons_sensitive(MessageWindow * mw);
@@ -255,7 +255,7 @@ static const GtkActionEntry entries[] = {
{"FindInMessage", NULL, N_("_Find in message"), "slash",
N_("Find a string in this message"),
G_CALLBACK(mw_find_in_message_cb)},
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
{"ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _In"), "<control>plus",
N_("Increase magnification"), G_CALLBACK(mw_zoom_in_cb)},
{"ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "<control>minus",
@@ -264,7 +264,7 @@ static const GtkActionEntry entries[] = {
/* xgettext:no-c-format */
{"Zoom100", GTK_STOCK_ZOOM_100, N_("Zoom _100%"), NULL,
N_("No magnification"), G_CALLBACK(mw_zoom_100_cb)},
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
{"Reply", BALSA_PIXMAP_REPLY, N_("_Reply..."), "R",
N_("Reply to the current message"), G_CALLBACK(replyto_message_cb)},
{"ReplyAll", BALSA_PIXMAP_REPLY_ALL, N_("Reply to _All..."), "A",
@@ -354,12 +354,12 @@ static const char *ui_description =
" <menuitem action='NoHeaders'/>"
" <menuitem action='SelectedHeaders'/>"
" <menuitem action='AllHeaders'/>"
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
" <separator/>"
" <menuitem action='ZoomIn'/>"
" <menuitem action='ZoomOut'/>"
" <menuitem action='Zoom100'/>"
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
" </menu>"
" <menu action='MoveMenu'>"
" </menu>"
@@ -1007,7 +1007,7 @@ reset_show_all_headers(MessageWindow *mw)
}
}
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
static void
mw_zoom_in_cb(GtkAction * action, MessageWindow * mw)
{
@@ -1028,20 +1028,20 @@ mw_zoom_100_cb(GtkAction * action, MessageWindow * mw)
GtkWidget *bm = mw->bmessage;
balsa_message_zoom(BALSA_MESSAGE(bm), 0);
}
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
static void
mw_select_part_cb(BalsaMessage * bm, MessageWindow * mw)
{
gchar *title;
gchar *from;
-#ifdef HAVE_GTKHTML
+#ifdef HAVE_HTML_WIDGET
gboolean enable = bm && balsa_message_can_zoom(bm);
mw_set_sensitive(mw, "ZoomIn", enable);
mw_set_sensitive(mw, "ZoomOut", enable);
mw_set_sensitive(mw, "Zoom100", enable);
-#endif /* HAVE_GTKHTML */
+#endif /* HAVE_HTML_WIDGET */
/* set window title */
if (bm && bm->message) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]