]> spindle.queued.net Git - midori/commitdiff
Display destined filename when notifying about a finished transfer
authorChristian Dywan <christian@twotoasts.de>
Mon, 1 Jun 2009 17:41:03 +0000 (19:41 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 1 Jun 2009 17:41:03 +0000 (19:41 +0200)
midori/midori-browser.c

index 81b650a6ca17a29be586ec5a476727d7685984f5..8ad9102e5c689ad68e34fe6199029fb7cfb0676c 100644 (file)
@@ -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 <b>%s</b> has been downloaded."),
-                    webkit_download_get_suggested_filename (download));
+                    _("The file <b>%s</b> has been downloaded."), filename);
+                g_free (path);
 
                 g_signal_emit (browser, signals[SEND_NOTIFICATION], 0,
                     _("Transfer completed"), msg);