}
static void
-midori_view_notify_uri_cb (GtkWidget* view,
+midori_view_notify_uri_cb (GtkWidget* widget,
GParamSpec* pspec,
MidoriBrowser* browser)
{
- if (view == midori_browser_get_current_tab (browser))
+ if (widget == midori_browser_get_current_tab (browser))
{
- const gchar* uri = midori_view_get_display_uri (MIDORI_VIEW (view));
+ MidoriView* view = MIDORI_VIEW (widget);
+ const gchar* uri = midori_view_get_display_uri (view);
GtkAction* action = _action_by_name (browser, "Location");
midori_location_action_set_text (MIDORI_LOCATION_ACTION (action), uri);
+ _action_set_sensitive (browser, "Back", midori_view_can_go_back (view));
+ _action_set_sensitive (browser, "Forward", midori_view_can_go_forward (view));
}
}
#endif
#if WEBKIT_CHECK_VERSION (1, 1, 4)
+static void
+webkit_web_view_notify_uri_cb (WebKitWebView* web_view,
+ GParamSpec* pspec,
+ MidoriView* view)
+{
+ katze_assign (view->uri, g_strdup (webkit_web_view_get_uri (web_view)));
+ g_object_notify (G_OBJECT (view), "uri");
+}
+
static void
webkit_web_view_notify_title_cb (WebKitWebView* web_view,
GParamSpec* pspec,
midori_web_view_notify_icon_uri_cb, view,
#endif
#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