X-Git-Url: https://git.wpitchoune.net/gitweb/?p=prss.git;a=blobdiff_plain;f=src%2Fwebbrowser.c;h=4f77fed794f8a4d76791cfcf0a442b3b51970c36;hp=ebbfce1e1bc3692196b3637412c3047f96d6e879;hb=2ea30ab741b8b4876bdce2e8dc0772b07cbdcf88;hpb=f12d31760b4945f8b4978e7d629bb036a626beba diff --git a/src/webbrowser.c b/src/webbrowser.c index ebbfce1..4f77fed 100644 --- a/src/webbrowser.c +++ b/src/webbrowser.c @@ -22,7 +22,7 @@ #include "webbrowser.h" static WebKitWebView *view; -static GtkLabel *w_status; +static GtkStatusbar *w_status; static gboolean new_window_requested_cbk(WebKitWebView *view, WebKitWebFrame *frame, @@ -42,10 +42,14 @@ static void hovering_over_link_cbk(WebKitWebView *web_view, gchar *uri, gpointer user_data) { + guint id; + + id = gtk_statusbar_get_context_id(w_status, "info"); + if (uri) - gtk_label_set_label(w_status, uri); + gtk_statusbar_push(w_status, id, uri); else - gtk_label_set_label(w_status, ""); + gtk_statusbar_pop(w_status, id); } GtkWidget *web_get_widget() @@ -70,7 +74,7 @@ void web_load(const char *str) webkit_web_view_load_string(view, str, NULL, "UTF-8", "file://"); } -void webbrowser_init(GtkLabel *status) +void webbrowser_init(GtkStatusbar *status) { w_status = status; }