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