Apparently more accurate download window with WebKit and unknown file size

This commit is contained in:
Pierre Pronchery 2010-12-03 22:38:17 +00:00
parent c8dccdbcd5
commit bf6a08815c
5 changed files with 29 additions and 15 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Surfer 0.1.0\n" "Project-Id-Version: Surfer 0.1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-27 16:30+0100\n" "POT-Creation-Date: 2010-12-03 23:37+0100\n"
"PO-Revision-Date: 2010-04-01 19:40+0200\n" "PO-Revision-Date: 2010-04-01 19:40+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n" "Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: German\n" "Language-Team: German\n"
@ -130,7 +130,7 @@ msgstr "Fehler "
msgid "Complete" msgid "Complete"
msgstr "" msgstr ""
#: ../src/download.c:518 ../src/download.c:644 #: ../src/download.c:518 ../src/download.c:642
msgid "Downloading" msgid "Downloading"
msgstr "" msgstr ""
@ -138,6 +138,10 @@ msgstr ""
msgid "Redirected to" msgid "Redirected to"
msgstr "" msgstr ""
#: ../src/download.c:532
msgid "Redirected"
msgstr ""
#: ../src/download.c:539 #: ../src/download.c:539
msgid "Resolved" msgid "Resolved"
msgstr "" msgstr ""
@ -150,7 +154,7 @@ msgstr ""
msgid "Unknown error" msgid "Unknown error"
msgstr "" msgstr ""
#: ../src/download.c:665 #: ../src/download.c:663
msgid "" msgid ""
"Usage: download [-O output][-U user-agent] URL...\n" "Usage: download [-O output][-U user-agent] URL...\n"
" -O\tfile to write document to\n" " -O\tfile to write document to\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Surfer 0.1.0\n" "Project-Id-Version: Surfer 0.1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-27 16:30+0100\n" "POT-Creation-Date: 2010-12-03 23:37+0100\n"
"PO-Revision-Date: 2010-04-01 19:40+0200\n" "PO-Revision-Date: 2010-04-01 19:40+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n" "Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: Spanish\n" "Language-Team: Spanish\n"
@ -130,7 +130,7 @@ msgstr ""
msgid "Complete" msgid "Complete"
msgstr "" msgstr ""
#: ../src/download.c:518 ../src/download.c:644 #: ../src/download.c:518 ../src/download.c:642
msgid "Downloading" msgid "Downloading"
msgstr "" msgstr ""
@ -138,6 +138,10 @@ msgstr ""
msgid "Redirected to" msgid "Redirected to"
msgstr "" msgstr ""
#: ../src/download.c:532
msgid "Redirected"
msgstr ""
#: ../src/download.c:539 #: ../src/download.c:539
msgid "Resolved" msgid "Resolved"
msgstr "" msgstr ""
@ -150,7 +154,7 @@ msgstr ""
msgid "Unknown error" msgid "Unknown error"
msgstr "" msgstr ""
#: ../src/download.c:665 #: ../src/download.c:663
msgid "" msgid ""
"Usage: download [-O output][-U user-agent] URL...\n" "Usage: download [-O output][-U user-agent] URL...\n"
" -O\tfile to write document to\n" " -O\tfile to write document to\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Surfer 0.1.0\n" "Project-Id-Version: Surfer 0.1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-27 16:30+0100\n" "POT-Creation-Date: 2010-12-03 23:37+0100\n"
"PO-Revision-Date: 2010-04-01 19:40+0200\n" "PO-Revision-Date: 2010-04-01 19:40+0200\n"
"Last-Translator: Calimero <calimeroteknik@free.fr>\n" "Last-Translator: Calimero <calimeroteknik@free.fr>\n"
"Language-Team: French\n" "Language-Team: French\n"
@ -130,7 +130,7 @@ msgstr "Erreur "
msgid "Complete" msgid "Complete"
msgstr "Terminé" msgstr "Terminé"
#: ../src/download.c:518 ../src/download.c:644 #: ../src/download.c:518 ../src/download.c:642
msgid "Downloading" msgid "Downloading"
msgstr "Téléchargement" msgstr "Téléchargement"
@ -138,6 +138,10 @@ msgstr "Téléchargement"
msgid "Redirected to" msgid "Redirected to"
msgstr "Redirigé vers" msgstr "Redirigé vers"
#: ../src/download.c:532
msgid "Redirected"
msgstr "Redirigé"
#: ../src/download.c:539 #: ../src/download.c:539
msgid "Resolved" msgid "Resolved"
msgstr "Résolu" msgstr "Résolu"
@ -150,7 +154,7 @@ msgstr "Code "
msgid "Unknown error" msgid "Unknown error"
msgstr "Erreur inconnue" msgstr "Erreur inconnue"
#: ../src/download.c:665 #: ../src/download.c:663
msgid "" msgid ""
"Usage: download [-O output][-U user-agent] URL...\n" "Usage: download [-O output][-U user-agent] URL...\n"
" -O\tfile to write document to\n" " -O\tfile to write document to\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Surfer 0.1.0\n" "Project-Id-Version: Surfer 0.1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-27 16:30+0100\n" "POT-Creation-Date: 2010-12-03 23:37+0100\n"
"PO-Revision-Date: 2010-04-11 12:06+0200\n" "PO-Revision-Date: 2010-04-11 12:06+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n" "Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: Italian\n" "Language-Team: Italian\n"
@ -130,7 +130,7 @@ msgstr ""
msgid "Complete" msgid "Complete"
msgstr "" msgstr ""
#: ../src/download.c:518 ../src/download.c:644 #: ../src/download.c:518 ../src/download.c:642
msgid "Downloading" msgid "Downloading"
msgstr "" msgstr ""
@ -138,6 +138,10 @@ msgstr ""
msgid "Redirected to" msgid "Redirected to"
msgstr "" msgstr ""
#: ../src/download.c:532
msgid "Redirected"
msgstr ""
#: ../src/download.c:539 #: ../src/download.c:539
msgid "Resolved" msgid "Resolved"
msgstr "" msgstr ""
@ -150,7 +154,7 @@ msgstr ""
msgid "Unknown error" msgid "Unknown error"
msgstr "" msgstr ""
#: ../src/download.c:665 #: ../src/download.c:663
msgid "" msgid ""
"Usage: download [-O output][-U user-agent] URL...\n" "Usage: download [-O output][-U user-agent] URL...\n"
" -O\tfile to write document to\n" " -O\tfile to write document to\n"

View File

@ -529,7 +529,7 @@ static void _http_redirect(GConnHttpEventRedirect * event, Download * download)
snprintf(buf, sizeof(buf), "%s %s", _("Redirected to"), snprintf(buf, sizeof(buf), "%s %s", _("Redirected to"),
event->new_location); event->new_location);
else else
strcpy(buf, "Redirected"); strcpy(buf, _("Redirected"));
gtk_label_set_text(GTK_LABEL(download->status), buf); gtk_label_set_text(GTK_LABEL(download->status), buf);
/* FIXME implement */ /* FIXME implement */
} }
@ -636,8 +636,6 @@ static gboolean _download_on_timeout(gpointer data)
GTK_STOCK_CLOSE); GTK_STOCK_CLOSE);
d->data_received = webkit_download_get_current_size( d->data_received = webkit_download_get_current_size(
d->conn); d->conn);
d->content_length = webkit_download_get_total_size(
d->conn);
break; break;
case WEBKIT_DOWNLOAD_STATUS_STARTED: case WEBKIT_DOWNLOAD_STATUS_STARTED:
gtk_label_set_text(GTK_LABEL(d->status), _( gtk_label_set_text(GTK_LABEL(d->status), _(