aboutsummaryrefslogtreecommitdiffstats
path: root/embed/downloader-view.c
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gns@src.gnome.org>2009-03-21 22:17:38 +0800
committerGustavo Noronha Silva <gns@src.gnome.org>2009-03-21 22:17:38 +0800
commita3dfdca62e5b9d323169bae398f3102314d4ea30 (patch)
treea2d8d121e864795e44126158301dd0080deb576a /embed/downloader-view.c
parente3a8db10d71823511bdf62a4095500c044649c1c (diff)
downloadgsoc2013-epiphany-a3dfdca62e5b9d323169bae398f3102314d4ea30.tar
gsoc2013-epiphany-a3dfdca62e5b9d323169bae398f3102314d4ea30.tar.gz
gsoc2013-epiphany-a3dfdca62e5b9d323169bae398f3102314d4ea30.tar.bz2
gsoc2013-epiphany-a3dfdca62e5b9d323169bae398f3102314d4ea30.tar.lz
gsoc2013-epiphany-a3dfdca62e5b9d323169bae398f3102314d4ea30.tar.xz
gsoc2013-epiphany-a3dfdca62e5b9d323169bae398f3102314d4ea30.tar.zst
gsoc2013-epiphany-a3dfdca62e5b9d323169bae398f3102314d4ea30.zip
Do not use gtk_dialog_run() for the file chooser dialog when
downloading. Start downloading early to a temporary location, and change the target URI after the user has decided where to put the file on. svn path=/trunk/; revision=8928
Diffstat (limited to 'embed/downloader-view.c')
-rw-r--r--embed/downloader-view.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 4108448d1..f8fe7f94e 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -616,6 +616,11 @@ downloader_view_add_download (DownloaderView *dv,
char *downloading;
#endif
+ /* dv may be unrefed inside update_download_row if the file
+ * downloaded completely while the user was choosing where to
+ * put it, so we need to protect it
+ */
+ g_object_ref (dv);
g_object_ref (download);
gtk_list_store_append (GTK_LIST_STORE (dv->priv->model),
@@ -709,6 +714,9 @@ downloader_view_add_download (DownloaderView *dv,
#endif
dv->priv->source_id = g_timeout_add (100, (GSourceFunc) update_buttons_timeout_cb, dv);
+
+ /* see above */
+ g_object_unref (dv);
}
static void