[yelp/wip/amigadave/webkit2-port: 11/24] yelp-view: Rename WKWebSettings to WKSettings and adapt properties
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp/wip/amigadave/webkit2-port: 11/24] yelp-view: Rename WKWebSettings to WKSettings and adapt properties
- Date: Mon, 16 Feb 2015 20:59:47 +0000 (UTC)
commit e7bb1c550bef01592cbf6539db220f20a2881e88
Author: Marcos ChavarrÃa Teijeiro <chavarria1991 gmail com>
Date: Thu Sep 11 12:08:18 2014 +0200
yelp-view: Rename WKWebSettings to WKSettings and adapt properties
Remove enable-universal-access-from-file-uris that doesn't
exist any more and rename default-encoding to default-charset.
libyelp/yelp-view.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index 2916669..e415687 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -148,7 +148,7 @@ static gint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (YelpView, yelp_view, WEBKIT_TYPE_WEB_VIEW)
#define GET_PRIV(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), YELP_TYPE_VIEW, YelpViewPrivate))
-static WebKitWebSettings *websettings;
+static WebKitSettings *websettings;
typedef struct _YelpActionEntry YelpActionEntry;
struct _YelpActionEntry {
@@ -240,8 +240,6 @@ yelp_view_init (YelpView *view)
{
YelpViewPrivate *priv = GET_PRIV (view);
- g_object_set (view, "settings", websettings, NULL);
-
priv->cancellable = NULL;
priv->prevstate = priv->state = YELP_VIEW_STATE_BLANK;
@@ -387,8 +385,11 @@ yelp_view_class_init (YelpViewClass *klass)
nautilus_sendto = g_find_program_in_path ("nautilus-sendto");
- websettings = webkit_web_settings_new ();
- g_object_set (websettings, "enable-universal-access-from-file-uris", TRUE, NULL);
+ websettings = webkit_settings_new_with_settings (
+ "default-charset", "utf-8",
+ "enable-private-browsing", TRUE,
+ NULL);
+
g_signal_connect (settings,
"fonts-changed",
G_CALLBACK (settings_set_fonts),
@@ -570,7 +571,8 @@ yelp_view_set_property (GObject *object,
GtkWidget *
yelp_view_new (void)
{
- return (GtkWidget *) g_object_new (YELP_TYPE_VIEW, NULL);
+ return GTK_WIDGET (g_object_new (YELP_TYPE_VIEW,
+ "settings", websettings, NULL));
}
void
@@ -1868,11 +1870,6 @@ settings_set_fonts (YelpSettings *settings)
gchar *family;
gint size;
- g_object_set (websettings,
- "default-encoding", "utf-8",
- "enable-private-browsing", TRUE,
- NULL);
-
family = yelp_settings_get_font_family (settings,
YELP_SETTINGS_FONT_VARIABLE);
size = yelp_settings_get_font_size (settings,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]