2004-09-09 [colin] 0.9.12cvs99.2
* src/action.c Fix progress bar (displaying "Completed %v/%u") Patch by Alfons.
This commit is contained in:
parent
4c9f0fb8f8
commit
9259294504
4 changed files with 27 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -165,3 +165,4 @@
|
|||
( 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
|
||||
|
|
|
@ -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}
|
||||
|
|
21
src/action.c
21
src/action.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue