talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 8f865353a44c199080aa4d413536f84763dc98ba
parent af6c3fb682b5293e4e83226bd2f8f77a63d55c3d
Author: Tristan Chabredier <wwp@claws-mail.org>
Date:   Tue,  2 Nov 2010 15:36:38 +0000

2010-11-02 [wwp]	3.7.6cvs60

	* src/action.c
	* src/statusbar.c
	* src/toolbar.c
		Enlarge the progress bar (main window) a bit when compiling
		for UMPCs like maemo: this solves truncated text that might
		appear in the progress bar while processing messages.
		Also use a more compact string format when displaying
		progress like 'number/total', still for UMPCs, this fixes
		a previous inconsistency with these format strings where
		no space around the / were used sometimes.

Diffstat:
MChangeLog | 13+++++++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/action.c | 20++++++++++++++++----
Msrc/statusbar.c | 8+++++++-
Msrc/toolbar.c | 2+-
6 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,16 @@ +2010-11-02 [wwp] 3.7.6cvs60 + + * src/action.c + * src/statusbar.c + * src/toolbar.c + Enlarge the progress bar (main window) a bit when compiling + for UMPCs like maemo: this solves truncated text that might + appear in the progress bar while processing messages. + Also use a more compact string format when displaying + progress like 'number/total', still for UMPCs, this fixes + a previous inconsistency with these format strings where + no space around the / were used sometimes. + 2010-10-26 [ticho] 3.7.6cvs59 * src/news.c diff --git a/PATCHSETS b/PATCHSETS @@ -4055,3 +4055,4 @@ ( cvs diff -u -r 1.12.2.60 -r 1.12.2.61 src/action.c; cvs diff -u -r 1.6.10.22 -r 1.6.10.23 src/addrharvest.c; cvs diff -u -r 1.17.2.41 -r 1.17.2.42 src/alertpanel.c; cvs diff -u -r 1.60.2.54 -r 1.60.2.55 src/filtering.c; cvs diff -u -r 1.18.2.30 -r 1.18.2.31 src/jpilot.c; cvs diff -u -r 1.3.2.66 -r 1.3.2.67 src/prefs_themes.c; cvs diff -u -r 1.49.2.133 -r 1.49.2.134 src/procmime.c; cvs diff -u -r 1.96.2.224 -r 1.96.2.225 src/textview.c; cvs diff -u -r 1.5.2.92 -r 1.5.2.93 src/gtk/gtkutils.c; cvs diff -u -r 1.1.2.97 -r 1.1.2.98 src/gtk/quicksearch.c; cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/gtk/quicksearch.h; cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/plugins/pgpcore/passphrase.c; cvs diff -u -r 1.4.2.7 -r 1.4.2.8 src/plugins/spamassassin/libspamc.c; ) > 3.7.6cvs57.patchset ( cvs diff -u -r 1.1.2.64 -r 1.1.2.65 src/imap_gtk.c; cvs diff -u -r 1.2.2.37 -r 1.2.2.38 src/mh_gtk.c; ) > 3.7.6cvs58.patchset ( cvs diff -u -r 1.101.2.61 -r 1.101.2.62 src/news.c; ) > 3.7.6cvs59.patchset +( cvs diff -u -r 1.12.2.61 -r 1.12.2.62 src/action.c; cvs diff -u -r 1.5.2.27 -r 1.5.2.28 src/statusbar.c; cvs diff -u -r 1.43.2.120 -r 1.43.2.121 src/toolbar.c; ) > 3.7.6cvs60.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=6 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=59 +EXTRA_VERSION=60 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/action.c b/src/action.c @@ -1243,17 +1243,23 @@ static void update_io_dialog(Children *children) if (children->progress_bar) { gchar *text; +#ifdef GENERIC_UMPC + /* use a more compact format */ + const gchar *format = "%s %d/%d"; +#else + const gchar *format = "%s %d / %d"; +#endif gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(children->progress_bar), (children->initial_nb == 0) ? 0 : (gdouble) (children->initial_nb - children->nb) / (gdouble) children->initial_nb); - text = g_strdup_printf("%s %d/%d", _("Completed"), + text = g_strdup_printf(format, _("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); @@ -1399,12 +1405,18 @@ static void create_io_dialog(Children *children) } if (children->initial_nb > 1) { - gchar * text; + gchar *text; +#ifdef GENERIC_UMPC + /* use a more compact format */ + const gchar *format = "%s 0/%d\n"; +#else + const gchar *format = "%s 0 / %d\n"; +#endif 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"), + text = g_strdup_printf(format, _("Completed"), children->initial_nb); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar), text); diff --git a/src/statusbar.c b/src/statusbar.c @@ -240,7 +240,13 @@ void statusbar_progress_all (gint done, gint total, gint step) gchar buf[32]; if (total && done % step == 0) { - g_snprintf(buf, sizeof(buf), "%d / %d", done, total); +#ifdef GENERIC_UMPC + /* use a more compact format */ + const gchar *format = "%d/%d"; +#else + const gchar *format = "%d / %d"; +#endif + g_snprintf(buf, sizeof(buf), format, done, total); gtk_progress_bar_set_text(progressbar, buf); gtk_progress_bar_set_fraction(progressbar, (total == 0) ? 0 : (gfloat)done / (gfloat)total); diff --git a/src/toolbar.c b/src/toolbar.c @@ -2154,7 +2154,7 @@ Toolbar *toolbar_create(ToolbarType type, item = GTK_WIDGET(gtk_tool_item_new()); gtk_container_add (GTK_CONTAINER (item), progressbar); gtk_widget_show(item); - gtk_widget_set_size_request(progressbar, 70, -1); + gtk_widget_set_size_request(progressbar, 84, -1); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(item), -1); mainwin->progressbar = progressbar; #endif