diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2013-07-27 17:25:39 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-07-27 17:25:39 +0800 |
commit | 0e305bffefae7641bc3a82652e845f1b84d00642 (patch) | |
tree | 0e88cf5becc44b0f0759df2c2e9dfe4e48f4558d | |
parent | 50d140f027f842c354ca97d2342a0ffbbe5e24ee (diff) | |
download | gsoc2013-epiphany-0e305bffefae7641bc3a82652e845f1b84d00642.tar gsoc2013-epiphany-0e305bffefae7641bc3a82652e845f1b84d00642.tar.gz gsoc2013-epiphany-0e305bffefae7641bc3a82652e845f1b84d00642.tar.bz2 gsoc2013-epiphany-0e305bffefae7641bc3a82652e845f1b84d00642.tar.lz gsoc2013-epiphany-0e305bffefae7641bc3a82652e845f1b84d00642.tar.xz gsoc2013-epiphany-0e305bffefae7641bc3a82652e845f1b84d00642.tar.zst gsoc2013-epiphany-0e305bffefae7641bc3a82652e845f1b84d00642.zip |
Show error message in download panel if extraction failed
-rw-r--r-- | autoarchive/autoar-extract.c | 4 | ||||
-rw-r--r-- | lib/widgets/ephy-download-widget.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/autoarchive/autoar-extract.c b/autoarchive/autoar-extract.c index 442a8a794..a50cb6b3c 100644 --- a/autoarchive/autoar-extract.c +++ b/autoarchive/autoar-extract.c @@ -1025,7 +1025,7 @@ autoar_extract_run (AutoarExtract *arextract, if (arextract->priv->error == NULL) { arextract->priv->error = g_error_new (autoar_extract_quark, archive_errno (a), - "Error when opening the archive \'%s\': %s", + "\'%s\': %s", arextract->priv->source, archive_error_string (a)); } @@ -1138,7 +1138,7 @@ autoar_extract_run (AutoarExtract *arextract, if (arextract->priv->error == NULL) { arextract->priv->error = g_error_new (autoar_extract_quark, archive_errno (a), - "Error when opening the archive \'%s\': %s", + "\'%s\': %s", arextract->priv->source, archive_error_string (a)); } diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c index d956c9e9a..3ce554809 100644 --- a/lib/widgets/ephy-download-widget.c +++ b/lib/widgets/ephy-download-widget.c @@ -400,6 +400,7 @@ widget_archive_error_cb (AutoarExtract *arextract, { const char *uri = webkit_download_get_destination (ephy_download_get_webkit_download (widget->priv->download)); char *dest = g_path_get_basename (uri); + char *errmsg; LOG ("widget_archive_error_cb: error: %s", error->message); LOG ("widget_archive_error_cb: text: %s => %s", gtk_label_get_text (GTK_LABEL (widget->priv->text)), dest); @@ -407,7 +408,8 @@ widget_archive_error_cb (AutoarExtract *arextract, ephy_download_get_destination_uri (widget->priv->download), uri); gtk_label_set_text (GTK_LABEL (widget->priv->text), dest); ephy_download_set_destination_uri (widget->priv->download, uri); - update_download_label_and_tooltip (widget, _("Finished (extraction failed)")); + errmsg = g_strdup_printf (_("Finished (extraction error: %s)"), error->message); + update_download_label_and_tooltip (widget, errmsg); update_download_icon (widget); g_free (dest); g_error_free (error); |