diff -r 51a6d05c2c84 surf.c --- a/surf.c Mon Mar 26 09:33:42 2012 +0200 +++ b/surf.c Thu May 31 09:52:56 2012 +0200 @@ -63,6 +63,7 @@ static char winid[64]; static char *progname; static gboolean loadimage = 1, plugin = 1, script = 1; +static char toggstat[5]; static char *buildpath(const char *path); static void cleanup(void); @@ -795,16 +796,35 @@ update(c); } +gboolean +get_togglestat(Client *c){ + gboolean value; + WebKitWebSettings *settings + = webkit_web_view_get_settings(c->view); + + toggstat[4] = '\0'; + g_object_get(G_OBJECT(settings), "auto-load-images", &value, NULL); + toggstat[0] = value?'I':'i'; + g_object_get(G_OBJECT(settings), "enable-scripts", &value, NULL); + toggstat[1] = value?'S':'s'; + g_object_get(G_OBJECT(settings), "enable-plugins", &value, NULL); + toggstat[2] = value?'V':'v'; + g_object_get(G_OBJECT(settings), "enable-caret-browsing", &value, NULL); + toggstat[3] = value?'C':'c'; + +} + void update(Client *c) { char *t; + get_togglestat(c); if(c->linkhover) - t = g_strdup(c->linkhover); - else if(c->progress != 100) - t = g_strdup_printf("[%i%%] %s", c->progress, c->title); + t = g_strdup_printf("%s| %s", toggstat, c->linkhover); + else if(c->progress != 100) + t = g_strdup_printf("[%i%%] %s| %s", c->progress, toggstat, c->title); else - t = g_strdup(c->title); + t = g_strdup_printf("%s| %s", toggstat, c->title); drawindicator(c); gtk_window_set_title(GTK_WINDOW(c->win), t); g_free(t);