]> git.pld-linux.org Git - packages/balsa.git/blame - balsa-gtkhtml4.patch
- updated gettext BR
[packages/balsa.git] / balsa-gtkhtml4.patch
CommitLineData
ea6ff3fb 1--- balsa-2.4.9/configure.in~ 2010-11-18 23:18:23.000000000 +0100
2+++ balsa-2.4.9/configure.in 2011-04-07 21:27:32.583333339 +0200
3@@ -124,10 +124,10 @@
9f9b6cec 4 [with_gss=$withval],[with_gss=no])
ea6ff3fb 5
9f9b6cec 6 AC_ARG_WITH(html-widget,
7- AC_HELP_STRING([--with-html-widget=(no|gtkhtml2|gtkhtml3|webkit)],
ea6ff3fb 8- [select the HTML renderer (default gtkhtml3)]),
8d3051a1 9+ AC_HELP_STRING([--with-html-widget=(no|gtkhtml2|gtkhtml4|webkit)],
ea6ff3fb 10+ [select the HTML renderer (default gtkhtml4)]),
9f9b6cec 11 [use_html_widget=$withval],
ea6ff3fb 12- [use_html_widget=gtkhtml3])
13+ [use_html_widget=gtkhtml4])
14
15 AC_ARG_WITH([gtksourceview],
16 AC_HELP_STRING([--with-gtksourceview],
8d3051a1 17@@ -380,10 +380,13 @@
18 PKG_CHECK_MODULES(HTML, [ libgtkhtml-2.0 ])
19 AC_DEFINE(HAVE_GTKHTML2,1,[Defined when GtkHtml-2 can be used.])
9f9b6cec 20 ;;
8d3051a1 21- gtkhtml3)
9f9b6cec 22+ gtkhtml4)
8d3051a1 23 AC_MSG_RESULT([$use_html_widget])
24- PKG_CHECK_MODULES(HTML, [ libgtkhtml-3.14 ])
25- AC_DEFINE(HAVE_GTKHTML3,1,[Defined when GtkHtml-3 can be used.])
ea6ff3fb 26+ PKG_CHECK_MODULES(HTML, [ libgtkhtml-4.0 ], [],
27+ [PKG_CHECK_MODULES(HTML, [ libgtkhtml-4.0 ],[],
28+ [AC_MSG_ERROR([*** You enabled gtkhtml4 but it was not
29+ found.])])])
30+ AC_DEFINE(HAVE_GTKHTML4,1,[Defined when GtkHtml-4 can be used.])
8d3051a1 31 ;;
9f9b6cec 32 webkit)
33 AC_MSG_RESULT([$use_html_widget])
9f9b6cec 34--- balsa-2.4.9/libbalsa/html.c~ 2010-11-18 21:55:32.000000000 +0100
8d3051a1 35+++ balsa-2.4.9/libbalsa/html.c 2011-04-07 17:55:00.813390756 +0200
36@@ -23,13 +23,13 @@
37 /*
38 * Support for HTML mail parts.
39 *
40- * Balsa supports three HTML engines: GtkHtml-2, GtkHTML-3, and WebKit.
41+ * Balsa supports three HTML engines: GtkHtml-2, GtkHTML-4, and WebKit.
42 * The symbol HAVE_HTML_WIDGET is defined if HTML support is requested at
43 * configure time, and the requested engine is available.
44 *
45 * This file contains all code that depends on which widget is being
46 * used. Elsewhere, HTML support code should be conditional on
47- * HAVE_HTML_WIDGET, but none of HAVE_GTKHTML2, HAVE_GTKHTML3, or
48+ * HAVE_HTML_WIDGET, but none of HAVE_GTKHTML2, HAVE_GTKHTML4, or
49 * HAVE_WEBKIT should be referenced outside this file.
50 *
51 * As of this writing (2010-01), WebKit offers the most complete API,
52@@ -731,23 +731,9 @@
53 (*info->hover_cb) (uri);
9f9b6cec 54 }
55
8d3051a1 56-static void
57-lbh_size_request_cb(GtkWidget * widget,
58- GtkRequisition * requisition,
59- gpointer data)
60-{
61- GtkLayout *layout = GTK_LAYOUT(widget);
62- GtkAdjustment *adjustment;
63-
64- adjustment = gtk_layout_get_hadjustment(layout);
65- requisition->width = gtk_adjustment_get_upper(adjustment);
66- adjustment = gtk_layout_get_vadjustment(layout);
67- requisition->height = gtk_adjustment_get_upper(adjustment);
68-}
69-
9f9b6cec 70-# ifdef HAVE_GTKHTML3
8d3051a1 71+# ifdef HAVE_GTKHTML4
9f9b6cec 72
73-/* Code for GtkHTML-3 */
8d3051a1 74+/* Code for GtkHTML-4 */
9f9b6cec 75
76 # include <gtkhtml/gtkhtml.h>
77 # include <gtkhtml/gtkhtml-stream.h>
8d3051a1 78@@ -870,9 +856,6 @@
79 G_CALLBACK(libbalsa_html_url_requested),
80 body->message);
81
82- g_signal_connect(widget, "size-request",
83- G_CALLBACK(lbh_size_request_cb), info);
84-
85 return widget;
86 }
87
88@@ -974,7 +957,7 @@
89 g_object_unref(operation);
90 }
91
92-# else /* HAVE_GTKHTML3 */
93+# else /* HAVE_GTKHTML4 */
94
95 /* Code for GtkHtml-2 */
96
97@@ -993,6 +976,19 @@
98 html_stream_close(stream);
99 }
100
101+static void
102+lbh_size_request_cb(GtkWidget * widget
103+ GtkRequisition * requisition,
104+ gpointer data)
105+{
106+ GtkAdjustment *hadjustment, *vadjustment;
107+
108+ g_object_get(G_OBJECT(widget), "hadjustment", &hadjustment,
109+ "vadjustment", &vadjustment, NULL);
110+ requisition->width = gtk_adjustment_get_upper(hadjustment);
111+ requisition->height = gtk_adjustment_get_upper(vadjustment);
112+}
113+
114 /* Create a new HtmlView widget:
115 * text the HTML source;
116 * len length of text;
117@@ -1130,7 +1126,7 @@
118 {
119 }
120
121-# endif /* HAVE_GTKHTML3 */
122+# endif /* HAVE_GTKHTML4 */
123
124 /* Common code for both widgets. */
125
This page took 0.047952 seconds and 4 git commands to generate.