summaryrefslogtreecommitdiff
path: root/src/dialogs
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-05-19 23:42:11 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-05-19 23:42:11 (GMT)
commit44478b28bc5c4a8f9b064d0ae6936662e9ad11a9 (patch)
tree00d965f1614e232da3e09699e43e26ebc297c010 /src/dialogs
parent6511f2fe4551c2ea231115d6c659c99e15b3a23b (diff)
Fixed a bug: make sure all figures of revision are displayed.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@161 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/about.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dialogs/about.c b/src/dialogs/about.c
index 4f34a2c..e182f8f 100644
--- a/src/dialogs/about.c
+++ b/src/dialogs/about.c
@@ -59,6 +59,7 @@ GtkWidget *create_about_dialog(GtkWindow *parent)
GtkWidget *image; /* Image chargée */
unsigned int revision; /* Numéro de révision */
unsigned int i; /* Boucle de parcours */
+ unsigned int max; /* Nbre. de boucles à effectuer*/
unsigned int level; /* Unité la plus importante */
char buffer[16]; /* Nom d'image à forger */
GtkWidget *label; /* Etiquette inférieure */
@@ -98,11 +99,11 @@ GtkWidget *create_about_dialog(GtkWindow *parent)
gtk_widget_set_size_request(image, 14, 18);
revision = REVISION;
+ max = log(revision) / log(10);
- for (i = 0; revision > 0; i++)
+ for (i = 0; i <= max; i++)
{
- level = log(revision) / log(10);
- level = pow(10, level);
+ level = pow(10, max - i);
snprintf(buffer, 16, "revision_%u.png", revision / level);