[gtranslator/gtranslator-2-91] Fix percentage check
- From: Alexandre Franke <afranke src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtranslator/gtranslator-2-91] Fix percentage check
- Date: Sun,  4 Dec 2016 20:45:26 +0000 (UTC)
commit 02a8b396ceb4cc6ef3900c94c6403fc38937a0d1
Author: Alexandre Franke <alexandre franke gmail com>
Date:   Sun Dec 4 21:44:33 2016 +0100
    Fix percentage check
 .../gtr-translation-memory-dialog.c                |    2 +-
 src/gtr-statusbar.c                                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/translation-memory/gtr-translation-memory-dialog.c 
b/plugins/translation-memory/gtr-translation-memory-dialog.c
index 2b24716..26edca7 100644
--- a/plugins/translation-memory/gtr-translation-memory-dialog.c
+++ b/plugins/translation-memory/gtr-translation-memory-dialog.c
@@ -182,7 +182,7 @@ add_to_database (gpointer data_pointer)
   /*
    * Set the progress only if the values are reasonable.
    */
-  if (percentage > 0.0 || percentage < 1.0)
+  if (percentage > 0.0 && percentage < 1.0)
     {
       /* Set the progressbar status. */
       gtk_progress_bar_set_fraction (data->progress, percentage);
diff --git a/src/gtr-statusbar.c b/src/gtr-statusbar.c
index fc70031..e602717 100644
--- a/src/gtr-statusbar.c
+++ b/src/gtr-statusbar.c
@@ -345,7 +345,7 @@ gtr_statusbar_update_progress_bar (GtrStatusbar * statusbar,
   /*
    * Set the progress only if the values are reasonable.
    */
-  if (percentage > 0.0 || percentage < 1.0)
+  if (percentage > 0.0 && percentage < 1.0)
     {
       gchar *percentage_str;
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]