[gnome-initial-setup] privacy: Use Webkit2
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] privacy: Use Webkit2
- Date: Wed, 4 Mar 2015 22:15:08 +0000 (UTC)
commit 5af8b2a7416dd1a2c516c00bcc9094ce7a142a23
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Feb 21 11:53:44 2015 -0600
privacy: Use Webkit2
Use webkit2, to avoid linking in two webkits (now that goa
is using webkit2).
https://bugzilla.gnome.org/show_bug.cgi?id=744958
configure.ac | 2 +-
gnome-initial-setup/gnome-initial-setup.c | 3 --
.../pages/privacy/gis-privacy-page.c | 21 +++++--------------
3 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a9c708a..88f992f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,7 @@ PKG_CHECK_MODULES(INITIAL_SETUP,
json-glib-1.0
libsecret-1
pwquality
- webkitgtk-3.0)
+ webkit2gtk-4.0)
GEOCLUE_DBUS_INTERFACE_XML=`pkg-config --variable=dbus_interface geoclue-2.0`
if test "x$GEOCLUE_DBUS_INTERFACE_XML" = "x"; then
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index 4837a34..ce9b679 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -197,9 +197,6 @@ main (int argc, char *argv[])
{ NULL }
};
- /* FIXME: remove this when GOA uses WebKit2 */
- g_setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0", FALSE);
-
g_unsetenv ("GIO_USE_VFS");
context = g_option_context_new (_("- GNOME initial setup"));
diff --git a/gnome-initial-setup/pages/privacy/gis-privacy-page.c
b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
index 6f0ac8a..4c146fe 100644
--- a/gnome-initial-setup/pages/privacy/gis-privacy-page.c
+++ b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
@@ -27,7 +27,7 @@
#include "privacy-resources.h"
#include "gis-privacy-page.h"
-#include <webkit/webkit.h>
+#include <webkit2/webkit2.h>
#include <locale.h>
#include <gtk/gtk.h>
@@ -215,7 +215,7 @@ notify_progress_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
WebKitWebView *web_view = WEBKIT_WEB_VIEW (object);
gdouble progress;
- progress = webkit_web_view_get_progress (web_view);
+ progress = webkit_web_view_get_estimated_load_progress (web_view);
if (progress == 1.0)
gtk_widget_hide (progress_bar);
@@ -232,7 +232,6 @@ activate_link (GtkLabel *label,
{
GtkWidget *dialog;
GtkWidget *overlay;
- GtkWidget *scrolled_window;
GtkWidget *view;
GtkWidget *progress_bar;
@@ -244,16 +243,8 @@ activate_link (GtkLabel *label,
NULL);
overlay = gtk_overlay_new ();
- scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_set_size_request (scrolled_window, 600, 500);
- gtk_widget_set_hexpand (scrolled_window, TRUE);
- gtk_widget_set_vexpand (scrolled_window, TRUE);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), overlay);
- gtk_container_add (GTK_CONTAINER (overlay), scrolled_window);
+
progress_bar = gtk_progress_bar_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (progress_bar), GTK_STYLE_CLASS_OSD);
gtk_widget_set_halign (progress_bar, GTK_ALIGN_FILL);
@@ -261,11 +252,11 @@ activate_link (GtkLabel *label,
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), progress_bar);
view = webkit_web_view_new ();
-
- g_signal_connect (view, "notify::progress",
+ gtk_widget_set_size_request (view, 600, 500);
+ g_signal_connect (view, "notify::estimated-load-progress",
G_CALLBACK (notify_progress_cb), progress_bar);
- gtk_container_add (GTK_CONTAINER (scrolled_window), view);
+ gtk_container_add (GTK_CONTAINER (overlay), view);
gtk_widget_show_all (overlay);
gtk_window_present (GTK_WINDOW (dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]