[gtranslator] Fix percentage check
- From: Alexandre Franke <afranke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Fix percentage check
- Date: Sun, 4 Dec 2016 20:44:52 +0000 (UTC)
commit f39a9d5812d1283eca279f1506e3ffc7662b50df
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]