From c2f07326782bd5bcf934e674a2e3b377e99dc43f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 1 Jun 2009 19:41:03 +0200 Subject: [PATCH] Display destined filename when notifying about a finished transfer --- midori/midori-browser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 81b650a6..8ad9102e 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1113,9 +1113,12 @@ midori_browser_download_notify_status_cb (WebKitDownload* download, if (browser->settings && katze_object_get_boolean ( browser->settings, "notify-transfer-completed")) { + const gchar* uri = webkit_download_get_destination_uri (download); + gchar* path = soup_uri_decode (uri); + gchar* filename = g_strrstr (path, "/") + 1; gchar* msg = g_strdup_printf ( - _("The file %s has been downloaded."), - webkit_download_get_suggested_filename (download)); + _("The file %s has been downloaded."), filename); + g_free (path); g_signal_emit (browser, signals[SEND_NOTIFICATION], 0, _("Transfer completed"), msg); -- 2.39.5