[rhythmbox/gobject-introspection] get webkit stuff working with gtk3



commit dc8415c4da682fb13fcf8a6e49ef918d08e7d3cd
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu Jan 6 21:01:47 2011 +1000

    get webkit stuff working with gtk3

 configure.ac                           |    5 ++---
 podcast/rb-podcast-properties-dialog.c |   13 ++++++++-----
 2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 44141d5..70e173d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,8 +64,7 @@ GLIB_GDBUS_REQS=2.25.12
 GNOME_MEDIA_PROFILES_REQS=2.91.0
 LIBNOTIFY_REQS=0.5.1
 BRASERO_MIN_REQS=2.31.5
-dnl XXX webkit version unknown
-WEBKIT_MIN_REQS=99999
+WEBKIT_MIN_REQS=1.3.9
 
 
 
@@ -514,7 +513,7 @@ AC_ARG_WITH(webkit,
 			   [Use WebKit to display HTML]),,
 	    with_webkit=auto)
 if test "x$with_webkit" != xno; then
-	PKG_CHECK_MODULES(WEBKIT, [webkit-1.0 >= $WEBKIT_MIN_REQS], have_webkit=yes, have_webkit=no)
+	PKG_CHECK_MODULES(WEBKIT, [webkitgtk-3.0 >= $WEBKIT_MIN_REQS], have_webkit=yes, have_webkit=no)
 	if test "x$have_webkit" = "xno" -a "x$with_webkit" = "xyes"; then
 		AC_MSG_ERROR([WebKit support explicitly requested, but WebKit could not be found])
 	fi
diff --git a/podcast/rb-podcast-properties-dialog.c b/podcast/rb-podcast-properties-dialog.c
index e61e604..139d8e5 100644
--- a/podcast/rb-podcast-properties-dialog.c
+++ b/podcast/rb-podcast-properties-dialog.c
@@ -216,18 +216,21 @@ static void
 set_webkit_font_from_gtk_style (WebKitWebView *view)
 {
 	WebKitWebSettings *settings;
-	GtkStyle *style;
+	const PangoFontDescription *font_desc;
+	GtkStyleContext *style;
 	int font_size;
 	const char *font_family;
 
-	style = gtk_widget_get_style (GTK_WIDGET (view));
+	style = gtk_widget_get_style_context (GTK_WIDGET (view));
 	settings = webkit_web_view_get_settings (view);
 
-	font_size = pango_font_description_get_size (style->font_desc);
-	if (pango_font_description_get_size_is_absolute (style->font_desc) == FALSE)
+	font_desc = gtk_style_context_get_font (gtk_widget_get_style_context (GTK_WIDGET (view)),
+						GTK_STATE_FLAG_ACTIVE);
+	font_size = pango_font_description_get_size (font_desc);
+	if (pango_font_description_get_size_is_absolute (font_desc) == FALSE)
 		font_size /= PANGO_SCALE;
 
-	font_family = pango_font_description_get_family (style->font_desc);
+	font_family = pango_font_description_get_family (font_desc);
 
 	rb_debug ("setting font settings: %s / %d", font_family, font_size);
 	g_object_set (settings,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]