[Xfce4-commits] <midori:master> Use sokoke_show_uri in midori_browser_download_status_cb
Christian Dywan
noreply at xfce.org
Fri Apr 6 20:34:01 CEST 2012
Updating branch refs/heads/master
to 461c3ad440f26ffcb270cbbb0a0b8112a4a952bb (commit)
from f62964264e1e84b73e74166417189142f04b7ee2 (commit)
commit 461c3ad440f26ffcb270cbbb0a0b8112a4a952bb
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Apr 6 16:52:55 2012 +0200
Use sokoke_show_uri in midori_browser_download_status_cb
On Windows plain GLib is not smart enough.
midori/midori-browser.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 8182566..ae3fae0 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -1356,13 +1356,13 @@ midori_view_download_save_as_response_cb (GtkWidget* dialog,
static void
midori_browser_download_status_cb (WebKitDownload* download,
GParamSpec* pspec,
- gpointer user_data)
+ GtkWidget* widget)
{
const gchar* uri = webkit_download_get_destination_uri (download);
switch (webkit_download_get_status (download))
{
case WEBKIT_DOWNLOAD_STATUS_FINISHED:
- if (!g_app_info_launch_default_for_uri (uri, NULL, NULL))
+ if (!sokoke_show_uri (gtk_widget_get_screen (widget), uri, 0, NULL))
{
sokoke_message_dialog (GTK_MESSAGE_ERROR,
_("Error opening the image!"),
@@ -1463,7 +1463,7 @@ midori_view_download_requested_cb (GtkWidget* view,
midori_browser_download_prepare_destination_uri (download, NULL);
midori_browser_prepare_download (browser, download, destination_uri);
g_signal_connect (download, "notify::status",
- G_CALLBACK (midori_browser_download_status_cb), (gpointer) browser);
+ G_CALLBACK (midori_browser_download_status_cb), GTK_WIDGET (browser));
webkit_download_start (download);
g_free (destination_uri);
}
More information about the Xfce4-commits
mailing list