eb81161b0b13fb3ca4bba4dbe433aa3039602d01
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 68ce1af..17eb2f6 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -386,6 +386,33 @@ update_buttons (DownloaderView *dv)
 }
 
 static void
+notify_open_action_cb (NotifyNotification *notify,
+		char *id,
+		gpointer data)
+{
+	GFile *parent, *dest;
+	char *uri;
+
+	dest = g_file_new_for_path ((char *)data);
+
+	if (g_strcmp0 (id, "open-file") == 0)
+	{
+		uri = g_file_get_uri (dest);
+		g_app_info_launch_default_for_uri (uri, NULL, NULL);
+	}
+	else
+	{
+		parent = g_file_get_parent (dest);
+		uri = g_file_get_uri (parent);
+		g_app_info_launch_default_for_uri (uri, NULL, NULL);
+		g_object_unref (parent);
+	}
+
+	g_free (uri);
+	g_object_unref (dest);
+}
+
+static void
 update_download_row (DownloaderView *dv, EphyDownload *download)
 {
 	GtkTreeRowReference *row_ref;
@@ -426,6 +453,22 @@ update_download_row (DownloaderView *dv, EphyDownload *download)
 			_("Download finished"), 
 			downloaded, 
 			GTK_STOCK_INFO);
+		/* Clear previous actions before adding new ones to avoid
+		 * duplicate buttons in the popup
+		 */
+		notify_notification_clear_actions (dv->priv->notification);
+		notify_notification_add_action (dv->priv->notification,
+			"open-file",
+			_("Open file"),
+			notify_open_action_cb,
+			ephy_download_get_target (download),
+			(GFreeFunc) g_free);
+		notify_notification_add_action (dv->priv->notification,
+			"open-folder",
+			_("Browse folder"),
+			notify_open_action_cb,
+			ephy_download_get_target (download),
+			(GFreeFunc) g_free);
 			
 		show_notification_window (dv);
 		
