Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 02 Dec 2012 16:52:23 UTC Commit: df030d06141506d6e7063d666566244b1d353277 https://github.com/geany/geany-plugins/commit/df030d06141506d6e7063d66656624...
Log Message: ----------- WebHelper: Show the currently hovered link in the statusbar
Modified Paths: -------------- webhelper/src/gwh-browser.c
Modified: webhelper/src/gwh-browser.c 22 files changed, 22 insertions(+), 0 deletions(-) =================================================================== @@ -30,6 +30,7 @@ #include "gwh-utils.h" #include "gwh-settings.h" #include "gwh-keybindings.h" +#include "gwh-plugin.h"
#if ! GTK_CHECK_VERSION (2, 18, 0) @@ -883,6 +884,25 @@ static void inspector_set_detached (GwhBrowser *self, }
static void +on_web_view_hovering_over_link (WebKitWebView *view, + gchar *title, + gchar *uri, + GwhBrowser *self) +{ + static guint id = 0; + + if (id == 0) { + id = gtk_statusbar_get_context_id (GTK_STATUSBAR (ui_widgets.statusbar), + "gwh-browser-hovered-link"); + } + + gtk_statusbar_pop (GTK_STATUSBAR (ui_widgets.statusbar), id); + if (uri && *uri) { + gtk_statusbar_push (GTK_STATUSBAR (ui_widgets.statusbar), id, uri); + } +} + +static void gwh_browser_init (GwhBrowser *self) { GtkWidget *scrolled; @@ -956,6 +976,8 @@ static void inspector_set_detached (GwhBrowser *self, G_CALLBACK (on_web_view_populate_popup), self); g_signal_connect (G_OBJECT (self->priv->web_view), "scroll-event", G_CALLBACK (on_web_view_scroll_event), self); + g_signal_connect (G_OBJECT (self->priv->web_view), "hovering-over-link", + G_CALLBACK (on_web_view_hovering_over_link), self);
g_signal_connect (self->priv->web_view, "key-press-event", G_CALLBACK (gwh_keybindings_handle_event), self);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).