From 81717cc965c979db0ca9abed93c2dfb2fb96a0cd Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 21 Mar 2009 00:11:29 +0100 Subject: [PATCH] Remove items from the transferbar when they are opened --- midori/midori-browser.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index a92278dd..acdad246 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -939,13 +939,16 @@ midori_browser_download_button_clicked_cb (GtkWidget* button, case WEBKIT_DOWNLOAD_STATUS_FINISHED: { const gchar* uri = webkit_download_get_destination_uri (download); - if (!gtk_show_uri (gtk_widget_get_screen (button), - uri, gtk_get_current_event_time (), NULL)) + gboolean success = gtk_show_uri (gtk_widget_get_screen (button), + uri, gtk_get_current_event_time (), NULL); + if (!success) { gchar* command = g_strconcat ("exo-open ", uri, NULL); - g_spawn_command_line_async (command, NULL); + success = g_spawn_command_line_async (command, NULL); g_free (command); } + if (success) + gtk_widget_destroy (gtk_widget_get_parent (button)); break; } default: -- 2.39.5