aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2010-03-11 05:46:53 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2010-03-16 07:29:58 +0800
commit061f31953d1d4a6b18b7ac434f0520e65249b9e1 (patch)
treecbd2b1bb6ff14f6e0a15bc4bccffb4bd2bb0f427 /embed
parent4ac6ceaafd1bf2281e3b666e79e6646036277980 (diff)
downloadgsoc2013-epiphany-061f31953d1d4a6b18b7ac434f0520e65249b9e1.tar
gsoc2013-epiphany-061f31953d1d4a6b18b7ac434f0520e65249b9e1.tar.gz
gsoc2013-epiphany-061f31953d1d4a6b18b7ac434f0520e65249b9e1.tar.bz2
gsoc2013-epiphany-061f31953d1d4a6b18b7ac434f0520e65249b9e1.tar.lz
gsoc2013-epiphany-061f31953d1d4a6b18b7ac434f0520e65249b9e1.tar.xz
gsoc2013-epiphany-061f31953d1d4a6b18b7ac434f0520e65249b9e1.tar.zst
gsoc2013-epiphany-061f31953d1d4a6b18b7ac434f0520e65249b9e1.zip
downloader-view: hide the view when last download finishes
When there are no more downloads in queue, hide the view. Also if a download is added but finishes before showing the window, don't show the window nor the notification. Bug #611779
Diffstat (limited to 'embed')
-rw-r--r--embed/downloader-view.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 645f267c8..846938749 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -717,6 +717,16 @@ downloader_view_add_download (DownloaderView *dv,
/* Show it already */
g_object_get (G_OBJECT (dv->priv->window), "visible", &visible, NULL);
+
+ /* In the previous update_download_row() (or handlers) the download
+ * might have finished, if that's the case, we have nothing else to do.
+ * A notification of the finished download will pop to inform the user
+ * there was success. */
+ if (g_hash_table_size (dv->priv->downloads_hash) < 1)
+ {
+ ephy_dialog_hide (EPHY_DIALOG (dv));
+ return;
+ }
if (eel_gconf_get_boolean (CONF_DOWNLOADS_HIDDEN) && !visible)
{
@@ -1021,6 +1031,7 @@ downloader_view_remove_download (DownloaderView *dv, WebKitDownload *download)
{
gtk_widget_set_sensitive (dv->priv->abort_button, FALSE);
gtk_widget_set_sensitive (dv->priv->pause_button, FALSE);
+ ephy_dialog_hide (EPHY_DIALOG (dv));
g_object_unref (dv);
}
}