Added feature to enable/disable progress in window title.
authorDaniel Carl <danielcarl@gmx.de>
Tue, 22 Oct 2013 18:59:16 +0000 (20:59 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Tue, 22 Oct 2013 19:02:43 +0000 (21:02 +0200)
src/config.def.h
src/main.c

index 6b65997..40bf602 100644 (file)
 
 
 /* features */
+/* enable cookie support */
 #define FEATURE_COOKIE
+/* highlich search reasults */
 #define FEATURE_SEARCH_HIGHLIGHT
+/* disable scrollbars */
 #define FEATURE_NO_SCROLLBARS
+/* show page title in url completions */
 #define FEATURE_TITLE_IN_COMPLETION
+/* enable the read it later queue */
 #define FEATURE_QUEUE
+/* show load progress in window title */
+#define FEATURE_TITLE_PROGRESS
 /* should the history indicator [+-] be shown in status bar after url */
 #define FEATURE_HISTORY_INDICATOR
 
index 72f205d..21d0618 100644 (file)
@@ -865,15 +865,18 @@ static void title_changed_cb(WebKitWebView *webview, WebKitWebFrame *frame, cons
 
 static void update_title(void)
 {
-    char *title;
+#ifdef FEATURE_TITLE_PROGRESS
     /* show load status of page or the downloads */
     if (vb.state.progress != 100) {
-        title = g_strdup_printf("[%i%%] %s", vb.state.progress, vb.state.title);
+        char *title = g_strdup_printf("[%i%%] %s", vb.state.progress, vb.state.title);
         gtk_window_set_title(GTK_WINDOW(vb.gui.window), title);
         g_free(title);
     } else {
         gtk_window_set_title(GTK_WINDOW(vb.gui.window), vb.state.title);
     }
+#else
+    gtk_window_set_title(GTK_WINDOW(vb.gui.window), vb.state.title);
+#endif
 }
 
 static gboolean mimetype_decision_cb(WebKitWebView *webview,