Added gtk progressbar for those who like this.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 8 Jul 2013 20:31:56 +0000 (22:31 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 8 Jul 2013 20:31:56 +0000 (22:31 +0200)
config.mk
src/main.c

index 62d2af7..e9a41e5 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -12,6 +12,7 @@ MANDIR  ?= $(PREFIX)/share/man
 CPPFLAGS += -DFEATURE_COOKIE
 CPPFLAGS += -DFEATURE_SEARCH_HIGHLIGHT
 CPPFLAGS += -DFEATURE_NO_SCROLLBARS
+#CPPFLAGS += -DFEATURE_GTK_PROGRESSBAR
 
 LIBS = libsoup-2.4
 
index 8d29c01..ff7793d 100644 (file)
@@ -275,6 +275,12 @@ void vb_update_statusbar()
     if (vb.state.progress != 100) {
         g_string_append_printf(status, " [%i%%]", vb.state.progress);
     }
+#ifdef FEATURE_GTK_PROGRESSBAR
+    gtk_entry_set_progress_fraction(
+        GTK_ENTRY(vb.gui.inputbox),
+        vb.state.progress == 100 ? 0.0 : vb.state.progress/100.0
+    );
+#endif
 
     /* show the scroll status */
     max = gtk_adjustment_get_upper(vb.gui.adjust_v) - gtk_adjustment_get_page_size(vb.gui.adjust_v);