aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar dusanx <ef_dva@yahoo.com>2009-04-24 17:08:46 +0200
committerGravatar dusanx <ef_dva@yahoo.com>2009-04-24 17:08:46 +0200
commit99b367ff6896c6ba5c075d268caeb11b40e31aec (patch)
treeaf63a25ec3753857aba104cde6e42b07a1fdb010 /uzbl.c
parent85b6cad29bff69d3ec24dd9161835e4da25b5e49 (diff)
Hover uri added to title - no status bar needed
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/uzbl.c b/uzbl.c
index c66dd53..c38a662 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -36,6 +36,7 @@ static WebKitWebView* web_view;
static gchar* main_title;
static gint load_progress;
static guint status_context_id;
+static gchar selected_url[500];
@@ -66,6 +67,11 @@ static void update_title (GtkWindow* window)
g_string_append (string, " - Uzbl browser");
if (load_progress < 100)
g_string_append_printf (string, " (%d%%)", load_progress);
+
+ if (selected_url[0]!=0) {
+ g_string_append_printf (string, " -> (%s)", selected_url);
+ }
+
gchar* title = g_string_free (string, FALSE);
gtk_window_set_title (window, title);
g_free (title);
@@ -78,6 +84,14 @@ link_hover_cb (WebKitWebView* page, const gchar* title, const gchar* link, gpoin
gtk_statusbar_pop (main_statusbar, status_context_id);
if (link)
gtk_statusbar_push (main_statusbar, status_context_id, link);
+
+ //ADD HOVER URL TO WINDOW TITLE
+ selected_url[0]='\0';
+ if (link) {
+ strcpy (selected_url,link);
+ }
+ update_title (GTK_WINDOW (main_window));
+
}
static void