[epiphany/downloads: 11/11] TBD: ephy-downloads: remove downloads from the GtkListStore on finish
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/downloads: 11/11] TBD: ephy-downloads: remove downloads from the GtkListStore on finish
- Date: Thu, 27 Jan 2011 22:12:16 +0000 (UTC)
commit 8c00ba2e385ead48f14a5de4e703cfbb0f1a417a
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Sat Jan 22 13:31:15 2011 -0500
TBD: ephy-downloads: remove downloads from the GtkListStore on finish
This is an optional commit.
If we use this then the *finished and not acted* downloads won't jump windows
when closing their current parent window. This means that only *on going*
downloads will jump windows as they are closed.
embed/ephy-download.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index b0c1314..b45a3ca 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -743,7 +743,14 @@ download_status_changed_cb (GObject *object,
destroy_and_remove (download);
} else {
+ GtkTreeIter iter;
+
do_download_action (download, EPHY_DOWNLOAD_ACTION_NONE);
+
+ /* The ListStore is only for unfinished downloads, kill it here but don't
+ * touch the object or the widget. */
+ if (get_iter_for_download (download, &iter))
+ gtk_list_store_remove (ephy_embed_shell_get_downloads (embed_shell), &iter);
}
} else if (status == WEBKIT_DOWNLOAD_STATUS_CANCELLED ||
status == WEBKIT_DOWNLOAD_STATUS_ERROR) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]