g_signal_emit (browser, signals[CONTEXT_READY], 0, js_context);
}
+static void
+midori_view_notify_uri_cb (GtkWidget* view,
+ GParamSpec* pspec,
+ MidoriBrowser* browser)
+{
+ const gchar* uri = midori_view_get_display_uri (MIDORI_VIEW (view));
+ GtkAction* action = _action_by_name (browser, "Location");
+ midori_location_action_set_uri (MIDORI_LOCATION_ACTION (action), uri);
+ _midori_browser_update_interface (browser);
+}
+
static void
midori_view_notify_title_cb (GtkWidget* view,
GParamSpec* pspec,
midori_view_notify_progress_cb, browser,
"signal::context-ready",
midori_view_context_ready_cb, browser,
+ "signal::notify::uri",
+ midori_view_notify_uri_cb, browser,
"signal::notify::title",
midori_view_notify_title_cb, browser,
"signal::notify::zoom-level",
g_object_thaw_notify (G_OBJECT (view));
}
+#if WEBKIT_CHECK_VERSION (1, 1, 4)
+static void
+webkit_web_view_notify_uri_cb (WebKitWebView* web_view,
+ GParamSpec* pspec,
+ MidoriView* view)
+{
+ g_object_get (web_view, "uri", &view->uri, NULL);
+ g_object_notify (G_OBJECT (view), "uri");
+}
+
+static void
+webkit_web_view_notify_title_cb (WebKitWebView* web_view,
+ GParamSpec* pspec,
+ MidoriView* view)
+{
+ g_object_get (web_view, "title", &view->title, NULL);
+ g_object_notify (G_OBJECT (view), "title");
+}
+#else
static void
webkit_web_view_title_changed_cb (WebKitWebView* web_view,
WebKitWebFrame* web_frame,
{
g_object_set (view, "title", title, NULL);
}
+#endif
static void
webkit_web_view_statusbar_text_changed_cb (WebKitWebView* web_view,
webkit_web_view_progress_changed_cb, view,
"signal::load-finished",
webkit_web_view_load_finished_cb, view,
+ #if WEBKIT_CHECK_VERSION (1, 1, 4)
+ "signal::notify::uri",
+ webkit_web_view_notify_uri_cb, view,
+ "signal::notify::title",
+ webkit_web_view_notify_title_cb, view,
+ #else
"signal::title-changed",
webkit_web_view_title_changed_cb, view,
+ #endif
"signal::status-bar-text-changed",
webkit_web_view_statusbar_text_changed_cb, view,
"signal::hovering-over-link",