aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2006-11-11 08:57:58 +0000
committerJason Woodward2006-11-11 08:57:58 +0000
commit5a6eeda3eb1737910f1eb98f2f8496bdfbb71a08 (patch)
treed45d8930f0d5e5061130557f1982ce5bfb46d57f
parenta46f0437b3dcfef136ddc2381d1adaa4f6dae579 (diff)
downloadgslapt-5a6eeda3eb1737910f1eb98f2f8496bdfbb71a08.tar.gz
more granular with the download speed
-rw-r--r--po/bg.po4
-rw-r--r--po/de.po4
-rw-r--r--po/en.po4
-rw-r--r--po/es.po4
-rw-r--r--po/fr.po4
-rw-r--r--po/gslapt.pot4
-rw-r--r--po/id.po4
-rw-r--r--po/it.po4
-rw-r--r--po/ja.po4
-rw-r--r--po/nl.po4
-rw-r--r--po/pl.po4
-rw-r--r--po/pt.po4
-rw-r--r--po/pt_BR.po4
-rw-r--r--po/ru.po4
-rw-r--r--po/sk.po4
-rw-r--r--po/sv.po4
-rw-r--r--po/uk.po4
-rw-r--r--po/vi.po4
-rw-r--r--po/zh_CN.po4
-rw-r--r--src/callbacks.c11
20 files changed, 44 insertions, 43 deletions
diff --git a/po/bg.po b/po/bg.po
index 38de86d..1186a7d 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -475,6 +475,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/de.po b/po/de.po
index fc941d5..9486062 100644
--- a/po/de.po
+++ b/po/de.po
@@ -474,6 +474,6 @@ msgstr "Markiere veraltete Pakete"
msgid "Mark all obsolete packages"
msgstr "Markiere ALLE veralteten Pakete"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/en.po b/po/en.po
index 6c3fd9b..e2be29f 100644
--- a/po/en.po
+++ b/po/en.po
@@ -470,6 +470,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/es.po b/po/es.po
index 53b56f2..112e11d 100644
--- a/po/es.po
+++ b/po/es.po
@@ -470,6 +470,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/fr.po b/po/fr.po
index e9e2a48..3d6603c 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -478,6 +478,6 @@ msgstr "Marquer les paquets obsolètes"
msgid "Mark all obsolete packages"
msgstr "Marquer tous les packets obsolètes"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/gslapt.pot b/po/gslapt.pot
index f77bda1..80f2637 100644
--- a/po/gslapt.pot
+++ b/po/gslapt.pot
@@ -477,6 +477,6 @@ msgstr ""
msgid "Mark all obsolete packages"
msgstr ""
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/id.po b/po/id.po
index 5c750ea..2b59cc1 100644
--- a/po/id.po
+++ b/po/id.po
@@ -475,6 +475,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/it.po b/po/it.po
index ece5279..2a1f7cd 100644
--- a/po/it.po
+++ b/po/it.po
@@ -479,6 +479,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/ja.po b/po/ja.po
index 25b414d..ade0ff2 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -478,6 +478,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/nl.po b/po/nl.po
index c8891ea..1f00107 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -477,6 +477,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/pl.po b/po/pl.po
index 6cd55bc..1d17458 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -446,6 +446,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/pt.po b/po/pt.po
index 72c4268..76b2efd 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -466,6 +466,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 44c5810..53c4d7e 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -476,6 +476,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/ru.po b/po/ru.po
index 82bc55b..2db80e9 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -441,6 +441,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/sk.po b/po/sk.po
index 5384b8d..3354166 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -470,6 +470,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/sv.po b/po/sv.po
index 32b4285..8be11d4 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -470,6 +470,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/uk.po b/po/uk.po
index f2e33b9..1c8bed8 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -441,6 +441,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/vi.po b/po/vi.po
index 4d64c6a..42745b1 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -470,6 +470,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 94563cd..2e2c97a 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -477,6 +477,6 @@ msgstr "Mark Obsolete"
msgid "Mark all obsolete packages"
msgstr "Mark all obsolete packages"
-msgid "Download rate: %d%s/s"
-msgstr "Download rate: %d%s/s"
+msgid "Download rate: %.0f%s/s"
+msgstr "Download rate: %.0f%s/s"
diff --git a/src/callbacks.c b/src/callbacks.c
index 254533a..01dba07 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -1191,8 +1191,8 @@ int gtk_progress_callback(void *data, double dltotal, double dlnow,
double perc = 1.0;
struct slapt_progress_data *cb_data = (struct slapt_progress_data *)data;
time_t now = time(NULL);
- size_t elapsed = now - cb_data->start;
- size_t speed = dlnow / (elapsed > 0 ? elapsed : 1) / 1000;
+ double elapsed = now - cb_data->start;
+ double speed = dlnow / (elapsed > 0 ? elapsed : 1);
gchar *status = NULL;
if (_cancelled == 1) {
@@ -1202,8 +1202,9 @@ int gtk_progress_callback(void *data, double dltotal, double dlnow,
if ( dltotal != 0.0 )
perc = ((dlnow * 100)/dltotal)/100;
- status = g_strdup_printf("Download rate: %d%s/s",
- speed, (speed > 1024) ? "M" : "k");
+ status = g_strdup_printf((gchar *)_("Download rate: %.0f%s/s"),
+ (speed > 1000) ? (speed > 1000000) ? speed / 1000000 : speed / 1000 : speed,
+ (speed > 1000) ? (speed > 1000000) ? "M" : "k" : "b");
gdk_threads_enter();
gtk_progress_bar_set_fraction(p_bar,perc);
@@ -3074,7 +3075,7 @@ static void display_dep_error_dialog (slapt_pkg_info_t *pkg,guint m, guint c)
GtkWidget *w = create_dep_error_dialog();
GtkTextBuffer *error_buf = NULL;
guint i;
- gchar *msg = g_strdup_printf("<b>Excluding %s due to dependency failure</b>",pkg->name);
+ gchar *msg = g_strdup_printf((gchar *)_("<b>Excluding %s due to dependency failure</b>"),pkg->name);
gtk_window_set_title (GTK_WINDOW(w),(char *)_("Error"));
gtk_label_set_text(GTK_LABEL(lookup_widget(w,"dep_error_label")),msg);