aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar Robert Manea <gotmor@gmail.com>2009-04-30 13:36:54 +0200
committerGravatar Robert Manea <gotmor@gmail.com>2009-04-30 13:36:54 +0200
commitdcc31c585fa491cacc924c5c66db0db86d26d1ab (patch)
treea1c06f83e846ea8f726fa7f6024905cf5516fa6b /uzbl.c
parent03780ad88185aec3a39fbe9c1c9a0be7bccf1e06 (diff)
display instance name in the title and statusbar if set
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/uzbl.c b/uzbl.c
index 5219a0a..1cfd1e7 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -553,6 +553,19 @@ static void
update_title (GtkWindow* window) {
GString* string_long = g_string_new ("");
GString* string_short = g_string_new ("");
+ char* iname = NULL;
+ int iname_len;
+
+ if(instance_name) {
+ iname_len = strlen(instance_name)+4;
+ iname = malloc(iname_len);
+ snprintf(iname, iname_len, "<%s> ", instance_name);
+
+ g_string_prepend(string_long, iname);
+ g_string_prepend(string_short, iname);
+ free(iname);
+ }
+
if (!always_insert_mode)
g_string_append (string_long, (insert_mode ? "[I] " : "[C] "));
g_string_append (string_long, main_title);