Revision: 1976 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1976&view=re... Author: colombanw Date: 2011-03-11 02:22:36 +0000 (Fri, 11 Mar 2011)
Log Message: ----------- WebHelper: correctly update history on anchor links
Modified Paths: -------------- trunk/geany-plugins/webhelper/src/gwh-browser.c
Modified: trunk/geany-plugins/webhelper/src/gwh-browser.c =================================================================== --- trunk/geany-plugins/webhelper/src/gwh-browser.c 2011-03-11 02:22:13 UTC (rev 1975) +++ trunk/geany-plugins/webhelper/src/gwh-browser.c 2011-03-11 02:22:36 UTC (rev 1976) @@ -344,6 +344,17 @@ }
static void +update_history (GwhBrowser *self) +{ + WebKitWebView *web_view = WEBKIT_WEB_VIEW (self->priv->web_view); + + gtk_widget_set_sensitive (GTK_WIDGET (self->priv->item_prev), + webkit_web_view_can_go_back (web_view)); + gtk_widget_set_sensitive (GTK_WIDGET (self->priv->item_next), + webkit_web_view_can_go_forward (web_view)); +} + +static void update_load_status (GwhBrowser *self) { gboolean loading = FALSE; @@ -367,10 +378,7 @@ gtk_widget_set_sensitive (GTK_WIDGET (self->priv->item_cancel), loading); gtk_widget_set_visible (GTK_WIDGET (self->priv->item_cancel), loading);
- gtk_widget_set_sensitive (GTK_WIDGET (self->priv->item_prev), - webkit_web_view_can_go_back (web_view)); - gtk_widget_set_sensitive (GTK_WIDGET (self->priv->item_next), - webkit_web_view_can_go_forward (web_view)); + update_history (self); }
static void @@ -403,6 +411,7 @@ uri = webkit_web_view_get_uri (WEBKIT_WEB_VIEW (self->priv->web_view)); gtk_entry_set_text (GTK_ENTRY (self->priv->url_entry), uri); g_object_set (self->priv->settings, "browser-last-uri", uri, NULL); + update_history (self); }
static void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org