diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-12 02:05:29 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-12 02:05:29 (EDT) |
commit | 073c912b1b35d211903d67ab77d06f174960e430 (patch) | |
tree | 9f8b25903d46e0cd5becae0096480f0c796b1aa8 /src | |
parent | f5e0385973e68ec19f28322fb2cb1768a0e6cf71 (diff) | |
download | marquee-073c912b1b35d211903d67ab77d06f174960e430.zip marquee-073c912b1b35d211903d67ab77d06f174960e430.tar.gz marquee-073c912b1b35d211903d67ab77d06f174960e430.tar.bz2 |
MqWebView: Rename "uri" property to "rewritten-uri"
This fixes the infinite loop introduced in commit a88de09.
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 2 | ||||
-rw-r--r-- | src/web-view.c | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 694b2b9..ed47dd6 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -986,7 +986,7 @@ connect_web_view(MqTabChrome *chrome) G_CALLBACK(mouse_target_changed_cb), chrome); g_signal_connect(chrome->web_view, "notify::estimated-load-progress", G_CALLBACK(load_progress_cb), chrome); - g_signal_connect(chrome->web_view, "notify::uri", + g_signal_connect(chrome->web_view, "notify::rewritten-uri", G_CALLBACK(uri_cb), chrome); g_signal_connect(chrome->web_view, "notify::is-loading", G_CALLBACK(loading_cb), chrome); diff --git a/src/web-view.c b/src/web-view.c index 49ffea2..2e8bc40 100644 --- a/src/web-view.c +++ b/src/web-view.c @@ -39,7 +39,7 @@ struct _MqWebView { enum { PROP_TAB = 1, - PROP_URI, + PROP_REWRITTEN_URI, N_PROPERTIES }; @@ -66,7 +66,7 @@ get_property(GObject *object, guint property_id, GValue *value, case PROP_TAB: g_value_set_pointer(value, web_view->tab); break; - case PROP_URI: + case PROP_REWRITTEN_URI: g_value_set_string(value, web_view->uri); /* TODO */ break; default: @@ -88,7 +88,7 @@ set_property(GObject *object, guint property_id, const GValue *value, case PROP_TAB: web_view->tab = g_value_get_pointer(value); break; - case PROP_URI: + case PROP_REWRITTEN_URI: mq_web_view_load_uri(web_view, g_value_get_string(value)); break; @@ -522,7 +522,8 @@ uri_cb(WebKitWebView *wk_web_view, GParamSpec G_GNUC_UNUSED *paramspec) web_view->uri = g_strdup(uri); } - g_object_notify_by_pspec(G_OBJECT(web_view), obj_properties[PROP_URI]); + g_object_notify_by_pspec(G_OBJECT(web_view), + obj_properties[PROP_REWRITTEN_URI]); } static void @@ -652,8 +653,8 @@ mq_web_view_class_init(MqWebViewClass *klass) "tab", "MqTab", "Parent MqTab instance", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB); - obj_properties[PROP_URI] = g_param_spec_string( - "uri", "URI", "URI to load", + obj_properties[PROP_REWRITTEN_URI] = g_param_spec_string( + "rewritten-uri", "URI", "URI to load", "", G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB); @@ -681,7 +682,7 @@ mq_web_view_new(MqTab *tab, const gchar *uri) { return g_object_new(MQ_TYPE_WEB_VIEW, "tab", tab, /* TODO: Use gtk_widget_get_parent() instead? */ - "uri", uri, + "rewritten-uri", uri, "web-context", webkit_web_context_get_default(), NULL); } @@ -715,7 +716,8 @@ mq_web_view_load_uri(MqWebView *web_view, const gchar *uri) webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), uri); } - g_object_notify_by_pspec(G_OBJECT(web_view), obj_properties[PROP_URI]); + g_object_notify_by_pspec(G_OBJECT(web_view), + obj_properties[PROP_REWRITTEN_URI]); } GtkWidget * |