2004-09-09 [colin] 0.9.12cvs99.2
authorColin Leroy <colin@colino.net>
Thu, 9 Sep 2004 08:09:39 +0000 (08:09 +0000)
committerColin Leroy <colin@colino.net>
Thu, 9 Sep 2004 08:09:39 +0000 (08:09 +0000)
* src/action.c
Fix progress bar (displaying "Completed %v/%u")
Patch by Alfons.

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/action.c

index 4bfaedb2b3318daf211a4849c142b1651742460c..2cf097c99769b3cad2a453a1f5133fe335c1cdb3 100644 (file)
@@ -1,3 +1,9 @@
+2004-09-09 [colin]     0.9.12cvs99.2
+
+       * src/action.c
+               Fix progress bar (displaying "Completed %v/%u")
+               Patch by Alfons.
+
 2004-09-08 [colin]     0.9.12cvs99.1
 
        * src/account.c
index 3f406df5778dbeb8fd26c18063d0fd6e6ba044d2..81cc127e333b856025cec5becd7256fd60f0a1e3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.2504.2.18 -r 1.2504.2.19 ChangeLog.claws; cvs diff -u -r 1.149.2.13 -r 1.149.2.14 src/inc.c; ) > 0.9.12cvs97.1.patchset
 ( cvs diff -u -r 1.395.2.32 -r 1.395.2.33 src/summaryview.c; ) > 0.9.12cvs97.2.patchset
 ( cvs diff -u -r 1.61.2.10 -r 1.61.2.11 src/account.c; cvs diff -u -r 1.213.2.15 -r 1.213.2.16 src/folder.c; cvs diff -u -r 1.150.2.8 -r 1.150.2.9 src/procmsg.c; cvs diff -u -r 1.60.2.7 -r 1.60.2.8 src/procmsg.h; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/pgpmime/pgpmime.c; ) > 0.9.12cvs99.1.patchset
+( cvs diff -u -r 1.12.2.10 -r 1.12.2.11 src/action.c; ) > 0.9.12cvs99.2.patchset
index b1a748cab6583d0aea5f0ac6789048be6394f894..9b9078ec4c1bc29cfe3ee11f54d26ca8d8762ed7 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=99
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.1
+EXTRA_GTK2_VERSION=.2
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 1e3618e5d44ebb2abd1b8e32c9dba5a5918ba9ab..242d4b49449291b554932835e486643e4490523c 100644 (file)
@@ -1048,6 +1048,19 @@ static void update_io_dialog(Children *children)
 
        debug_print("Updating actions input/output dialog.\n");
 
+       if (children->progress_bar) {
+               gchar *text;
+               
+               gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(children->progress_bar),
+                                             (gdouble) (children->initial_nb - children->nb) /
+                                             (gdouble) children->initial_nb);
+               text = g_strdup_printf("%s %d/%d", _("Completed"), 
+                                      children->initial_nb - children->nb,
+                                      children->initial_nb);
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(children->progress_bar), text);
+               g_free(text);
+       }                                             
+
        if (!children->nb) {
                gtk_widget_set_sensitive(children->abort_btn, FALSE);
                gtk_widget_set_sensitive(children->close_btn, TRUE);
@@ -1179,12 +1192,16 @@ static void create_io_dialog(Children *children)
        }
 
        if (children->initial_nb > 1) {
+               gchar * text;
+               
                progress_bar = gtk_progress_bar_new();
                gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress_bar),
                                GTK_PROGRESS_LEFT_TO_RIGHT);
+               text = g_strdup_printf("%s 0/%d\n", _("Completed"), 
+                                      children->initial_nb);
                gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar),
-                                         _("Completed %v/%u"));
-
+                                         text);
+               g_free(text);
                gtk_box_pack_start(GTK_BOX(vbox), progress_bar, FALSE, FALSE, 0);
                gtk_widget_show(progress_bar);
        }