[gnome-maps] Make sure we do ensure_type of WebKit only once
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Make sure we do ensure_type of WebKit only once
- Date: Wed, 10 Feb 2016 18:34:03 +0000 (UTC)
commit bcfa1f08c1737ada133e60c724cd45f1fd47c76f
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Wed Feb 10 19:32:40 2016 +0100
Make sure we do ensure_type of WebKit only once
I got warnings of the type:
GLib-GObject-WARNING **: cannot register existing type 'WebKitWebView'
This fixes it!
src/application.js | 4 ++++
src/osmAccountDialog.js | 1 -
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 85cdeda..8dd7b1e 100644
--- a/src/application.js
+++ b/src/application.js
@@ -26,6 +26,7 @@ const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const GtkClutter = imports.gi.GtkClutter;
const Lang = imports.lang;
+const WebKit2 = imports.gi.WebKit2;
const CheckIn = imports.checkIn;
const ContactPlace = imports.contactPlace;
@@ -80,6 +81,9 @@ const Application = new Lang.Class({
GLib.set_application_name(_("Maps"));
GLib.set_prgname('gnome-maps');
+ /* Needed to be able to use in UI files */
+ GObject.type_ensure(WebKit2.WebView);
+
this.parent({ application_id: 'org.gnome.Maps',
flags: Gio.ApplicationFlags.HANDLES_OPEN });
this._connected = false;
diff --git a/src/osmAccountDialog.js b/src/osmAccountDialog.js
index 0163ed9..0e695e9 100644
--- a/src/osmAccountDialog.js
+++ b/src/osmAccountDialog.js
@@ -52,7 +52,6 @@ const OSMAccountDialog = new Lang.Class({
_init: function(params) {
/* This is a construct-only property and cannot be set by GtkBuilder */
params.use_header_bar = true;
- GObject.type_ensure(WebKit2.WebView);
this._closeOnSignIn = params.closeOnSignIn;
delete params.closeOnSignIn;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]