After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618443 - Revamp download management UI
Revamp download management UI
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Downloads
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
[gnome3-important]
: 631958 (view as bug list)
Depends on:
Blocks: 127287 135606 164264 327735 328728 337936 341666 491064 497994 537408 590246 604032 614357 621846 623140 623171 627068
 
 
Reported: 2010-05-12 12:26 UTC by Xan Lopez
Modified: 2011-03-07 20:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-download: new EphyDownload goodness (45.00 KB, patch)
2011-02-21 23:05 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
port: ephy-embed to ephy-download (17.51 KB, patch)
2011-02-21 23:05 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
port: popup-commands (8.38 KB, patch)
2011-02-21 23:05 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-download: add the new EphyDownload object (47.48 KB, patch)
2011-02-22 01:11 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
embed-persist: downloader-view: removed (84.07 KB, patch)
2011-02-22 11:48 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
ephy-file-helpers: only one downloads_dir function (5.11 KB, patch)
2011-02-22 11:48 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
ephy-file-helpers: allow desktop in ephy_file_browse_to (1.53 KB, patch)
2011-02-22 11:48 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-file-helpers: add uninstalled ui/ in ephy_file (754 bytes, patch)
2011-02-22 11:49 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-window: add new downloads UI (7.62 KB, patch)
2011-02-22 11:49 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
e-window: make construct_confirm_close_dialog reusable (2.01 KB, patch)
2011-02-22 11:49 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
e-window: confirm close with downloads (3.16 KB, patch)
2011-02-22 11:49 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
totem-glow-button: a glow button derived from libwnck (12.47 KB, patch)
2011-02-22 11:49 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
e-d-widget: new widget (21.78 KB, patch)
2011-02-22 11:49 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
popup-commands: indent fix (914 bytes, patch)
2011-02-22 11:50 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-file-helpers: only one downloads_dir function (5.11 KB, patch)
2011-03-04 17:46 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-file-helpers: allow desktop in ephy_file_browse_to (1.55 KB, patch)
2011-03-04 17:47 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-download: add the new EphyDownload object (154.33 KB, patch)
2011-03-04 17:47 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
ephy-download-widget: new widget (33.60 KB, patch)
2011-03-04 17:47 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
ephy-window: add new downloads UI (9.35 KB, patch)
2011-03-04 17:47 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
New downloads UI screenshot (87.33 KB, image/png)
2011-03-04 19:39 UTC, Diego Escalante Urrelo (not reading bugmail)
  Details
Warning when closing a window with ongoing downloads (66.35 KB, image/png)
2011-03-04 19:40 UTC, Diego Escalante Urrelo (not reading bugmail)
  Details
ephy-download: add the new EphyDownload object (154.57 KB, patch)
2011-03-04 23:58 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-download-widget: new widget (32.87 KB, patch)
2011-03-04 23:58 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-window: add new downloads UI (9.26 KB, patch)
2011-03-04 23:58 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-download: add the new EphyDownload object (154.57 KB, patch)
2011-03-07 20:00 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-download-widget: new widget (33.27 KB, patch)
2011-03-07 20:00 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-window: add new downloads UI (9.26 KB, patch)
2011-03-07 20:00 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Xan Lopez 2010-05-12 12:26:27 UTC
In GNOME Shell, AFAIK, there won't be any tray icon business anymore, so we need to rethink some of our UI in the download area.

The minimum change would be to get rid of the tray icon and allow another way of accessing the downloads window (menu item?), but personally I'd favor redoing the thing completely and moving to something like Chromium does, which I find pretty nice.
Comment 1 Reinout van Schouwen 2010-05-12 12:36:16 UTC
Perhaps we should see how Salomon Sickert's GSoC project about a unified progress indicator plays out?
Comment 2 Dan Winship 2010-05-12 13:20:02 UTC
(In reply to comment #0)
> In GNOME Shell, AFAIK, there won't be any tray icon business anymore

AFAIK, the current plan is that trayicons will still exist in the message tray, just not in the "panel"

(In reply to comment #1)
> Perhaps we should see how Salomon Sickert's GSoC project about a unified
> progress indicator plays out?

Anything coming out of SoC is probably too late for 3.0.
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2010-05-12 18:59:29 UTC
Agree. I'll start working on rewiring/rewriting the downloads code this week. I look forward to also redo the UI.

Should we ask folks at #gnome-design? I know from their dropbox folder that there are nice mockups for a couple of apps like gedit/totem. I guess they won't mind giving some thought to this.
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2010-05-12 18:59:58 UTC
Forgot to mention this URL: http://limi.net/articles/improving-download-behaviors-web-browsers/

It has a nice summary of how downloads work in almost all browsers.
Comment 5 Xan Lopez 2010-10-13 13:44:38 UTC
*** Bug 631958 has been marked as a duplicate of this bug. ***
Comment 6 Xan Lopez 2010-10-13 13:45:14 UTC
Quoting Jon's message from the other bug:


GNOME 3 won't really have support for status icons.

Currently it seems that epiphany uses a status icon to indicate or access
downloaded files.  We'll need to find a different solution for that.  My
recommendation is to simply use libnotify to send a message to the user when
the downloads are done.  To show progress of the downloads I recommend
something within the browser window - possibly similar to how firefox4/chrome
are handling this.

For a bit more information please see:
http://live.gnome.org/GnomeShell/Design/Guidelines/MessageTray/Compatibility
Comment 7 Reinout van Schouwen 2010-12-13 14:09:01 UTC
Update about Taskview and its Epiphany integration:
http://ssickert.wordpress.com/2010/11/22/taskview-release/
Comment 8 Diego Escalante Urrelo (not reading bugmail) 2011-01-20 17:31:09 UTC
Marking a lot of old bugs as blocked-by.
Comment 9 Matthias Clasen 2011-01-27 20:16:01 UTC
How likely is it that anything is going to land here for gnome 3.0 ?
Comment 10 Diego Escalante Urrelo (not reading bugmail) 2011-01-28 07:20:11 UTC
There's a branch in git:
http://git.gnome.org/browse/epiphany/log/?h=downloads

Together with Xan we should get this done before monday, likely.
Comment 11 Xan Lopez 2011-01-29 11:56:47 UTC
(In reply to comment #10)
> There's a branch in git:
> http://git.gnome.org/browse/epiphany/log/?h=downloads
> 
> Together with Xan we should get this done before monday, likely.

Before monday might be optimistic (still have to look at the latest iteration), but I consider it a blocker for 3.0 so it's very likely that we'll get it done.
Comment 12 Diego Escalante Urrelo (not reading bugmail) 2011-02-21 23:05:06 UTC
Created attachment 181535 [details] [review]
ephy-download: new EphyDownload goodness

Bug #618443
Comment 13 Diego Escalante Urrelo (not reading bugmail) 2011-02-21 23:05:19 UTC
Created attachment 181536 [details] [review]
port: ephy-embed to ephy-download

Bug #618443
Comment 14 Diego Escalante Urrelo (not reading bugmail) 2011-02-21 23:05:29 UTC
Created attachment 181537 [details] [review]
port: popup-commands

Bug #618443
Comment 15 Xan Lopez 2011-02-21 23:16:41 UTC
Review of attachment 181535 [details] [review]:

::: embed/ephy-download.c
@@ +637,3 @@
+                                                        "Internal WebKitDownload",
+                                                        "The WebKitDownload used internally by EphyDownload",
+                                                        GTK_TYPE_WINDOW,

GTK_TYPE_WINDOW?

Having a property you shouldn't "rely" on seems really crappy :/

@@ +716,3 @@
+                                                        "A EphyEmbed",
+                                                        "Embed that produced this download.",
+                                                        G_TYPE_OBJECT,

GTK_TYPE_WIDGET

@@ +732,3 @@
+                                                        "A GtkWidget",
+                                                        "GtkWidget showing this download.",
+                                                        G_TYPE_OBJECT,

GTK_TYPE_WIDGET

@@ +811,3 @@
+  return FALSE;
+}
+

This seems kinda useless. Sholudn't be the error reported by ED so that the UI can do something about it?

::: embed/ephy-embed-shell.c
@@ +106,3 @@
+		priv->downloads = NULL;
+	}
+

This should be done on finalize.

@@ +357,3 @@
+		g_signal_new ("download-added",
+			      EPHY_TYPE_EMBED_SHELL,
+			      G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,

You probably don't want to do that.

@@ +374,3 @@
+		g_signal_new ("download-removed",
+			      EPHY_TYPE_EMBED_SHELL,
+			      G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,

Same.

@@ +659,3 @@
+		priv->downloads = NULL;
+	}
+

What's the point of freeing this here?
Comment 16 Xan Lopez 2011-02-21 23:17:18 UTC
Review of attachment 181536 [details] [review]:

Crazy.
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 01:11:26 UTC
Created attachment 181547 [details] [review]
ephy-download: add the new EphyDownload object

EphyDownload is a wrapper object around WebKitDownload that handles common
behavior in downloads: auto-destination, default action for the MIME type.

It can be used to wrap a WebKitDownload coming from a WebKitView or to download
a url: ephy_download_new_for_uri and ephy_download_new_for_download are
provided.

Its lifetime is not automagic like EphyEmbedPersist, so you have to unref it
when you no longer need it.

This new object replaces EphyEmbedPersist and enables us to use a single
codepath for downloads in all Epiphany.

Bug #618443
Comment 18 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:48:39 UTC
Created attachment 181569 [details] [review]
embed-persist: downloader-view: removed

Remove all our legacy downloads code.

Bug #618443
Comment 19 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:48:49 UTC
Created attachment 181570 [details] [review]
ephy-file-helpers: only one downloads_dir function

Remove all the ambiguity, we always throw downloads to the same place or the
Desktop.

Bug #618443
Comment 20 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:48:54 UTC
Created attachment 181571 [details] [review]
ephy-file-helpers: allow desktop in ephy_file_browse_to

Previously we were denying browsing to the desktop or children of it because
the downloads automatically opened insane numbers of windows.

Bug #618443
Comment 21 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:49:02 UTC
Created attachment 181572 [details] [review]
ephy-file-helpers: add uninstalled ui/ in ephy_file

Bug #618443
Comment 22 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:49:10 UTC
Created attachment 181573 [details] [review]
ephy-window: add new downloads UI

Downloads are now shown per-window, imitating Chromium's bottom bar.
If a window with ongoing downloads is closed, their downloads will go to
another window. TBD: it might prove better to just ask if you want to cancel
them or not.

Bug #618443
Comment 23 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:49:20 UTC
Created attachment 181574 [details] [review]
e-window: make construct_confirm_close_dialog reusable

Bug #618443
Comment 24 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:49:45 UTC
Created attachment 181575 [details] [review]
e-window: confirm close with downloads

Bug #618443
Comment 25 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:49:51 UTC
Created attachment 181576 [details] [review]
totem-glow-button: a glow button derived from libwnck

Bug #618443
Comment 26 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:49:57 UTC
Created attachment 181577 [details] [review]
e-d-widget: new widget

Bug #618443
Comment 27 Diego Escalante Urrelo (not reading bugmail) 2011-02-22 11:50:04 UTC
Created attachment 181578 [details] [review]
popup-commands: indent fix

Bug #618443
Comment 28 Xan Lopez 2011-03-01 16:30:57 UTC
Review of attachment 181547 [details] [review]:

Looks OK to me overall.

::: embed/ephy-download.c
@@ +72,3 @@
+  PROP_EMBED,
+  PROP_WIDGET
+};

Being super nit-picky, lose the blank lines :P

@@ +357,3 @@
+  char *scheme;
+
+  g_return_if_fail (EPHY_IS_DOWNLOAD (download));

probably also check destination is not NULL.

@@ +363,3 @@
+  scheme = g_uri_parse_scheme (destination);
+  g_return_if_fail (scheme != NULL);
+  g_free (scheme);

I suppose you want to double check here that this has file:// on it, why don't you just check that...? Otherwise do a more thorough check of the whole thing, if there's a method to do that.

@@ +523,3 @@
+ * Gets the source URI that this download is/will download.
+ *
+ * Returns: (transfer none): source URI.

Are annotations needed for "const char*"? I don't think so.
Comment 29 Xan Lopez 2011-03-01 16:32:56 UTC
Review of attachment 181569 [details] [review]:

OK.
Comment 30 Xan Lopez 2011-03-01 16:46:43 UTC
Review of attachment 181570 [details] [review]:

OK.
Comment 31 Xan Lopez 2011-03-01 23:05:09 UTC
Review of attachment 181577 [details] [review]:

::: lib/widgets/ephy-download-widget.c
@@ +111,3 @@
+
+  widget = EPHY_DOWNLOAD_WIDGET (object);
+/* vim: set sw=2 ts=2 sts=2 et: */

w_download is ugly, just download.

@@ +131,3 @@
+
+  if (widget->priv->download)
+    g_object_unref (widget->priv->download);

this goes in dispose.

@@ +146,3 @@
+  object_class->set_property = ephy_download_widget_set_property;
+  object_class->dispose = ephy_download_widget_dispose;
+  object_class->finalize = ephy_download_widget_finalize;

not needed anymore.

@@ +158,3 @@
+                                                        "The EphyDownload shown by this widget",
+                                                        G_TYPE_OBJECT,
+                                                        G_PARAM_READWRITE |

read only and construct?

@@ +202,3 @@
+  icon = gtk_icon_info_load_icon (icon_info, NULL);
+
+  return icon;

just return and get rid of the variable?

@@ +313,3 @@
+  status = webkit_download_get_status (WEBKIT_DOWNLOAD (object));
+
+  if ((status == WEBKIT_DOWNLOAD_STATUS_FINISHED))

extra ()

@@ +373,3 @@
+  char *basename;
+
+  WebKitDownload *w_download;

w_download!!

@@ +452,3 @@
+
+  if (download != NULL)
+    g_object_add_weak_pointer (G_OBJECT (download), (gpointer *) &widget->priv->download);

I think we should just ref here, this owns the download.

::: lib/widgets/ephy-download-widget.h
@@ +55,3 @@
+#define EPHY_DOWNLOAD_WIDGET_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+  EPHY_TYPE_DOWNLOAD_WIDGET, EphyDownloadWidgetClass))

align properly.

@@ +79,3 @@
+EphyDownload  *ephy_download_widget_get_download (EphyDownloadWidget *widget);
+void           ephy_download_widget_set_download (EphyDownloadWidget *widget,
+                                                  EphyDownload *download);

align properly.
Comment 32 André Klapper 2011-03-03 21:17:47 UTC
[Removing GNOME3.0 target as decided in release-team meeting on March 03, 2011.
This report has an "important" categorisation for GNOME3.0 but is not considered a hard blocker. For querying use the corresponding whiteboard entry added.]
Comment 33 Xan Lopez 2011-03-04 13:31:36 UTC
Review of attachment 181571 [details] [review]:

Hrm, why will it open less windows now?
Comment 34 Xan Lopez 2011-03-04 13:32:56 UTC
Review of attachment 181572 [details] [review]:

OK.
Comment 35 Xan Lopez 2011-03-04 13:34:29 UTC
Review of attachment 181573 [details] [review]:

Change the TBD comment ;)

::: src/ephy-session.c
@@ -218,0 +220,7 @@
+	windows	= ephy_session_get_windows (session);
+	if (windows->data)
+	{
... 4 more ...

As commented on jabber, this does not make much sense.

::: src/ephy-window.c
@@ +3131,3 @@
+void
+ephy_window_show_downloads_box (EphyWindow *window,
+				gboolean show)

Also as commented, this should be 'set_visisible' or something, since it show/hides.
Comment 36 Xan Lopez 2011-03-04 13:35:42 UTC
Review of attachment 181574 [details] [review]:

OK.
Comment 37 Xan Lopez 2011-03-04 13:37:17 UTC
Review of attachment 181575 [details] [review]:

OK; write a bit more of prose in the commit message...
Comment 38 Xan Lopez 2011-03-04 13:38:08 UTC
Review of attachment 181576 [details] [review]:

This should just be added in whatever patch it uses it first IMHO.
Comment 39 Xan Lopez 2011-03-04 13:38:36 UTC
Review of attachment 181578 [details] [review]:

OK.
Comment 40 Xan Lopez 2011-03-04 13:39:35 UTC
A comment about the code in the branch:

- I think the ED should ref the widget/embed, otherwise they can go away randomly and it will just crash.

Let's put all the patches ready for download once more in the bug and try to merge this today!
Comment 41 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 14:07:35 UTC
Attachment 181572 [details] pushed as 3454067 - ephy-file-helpers: add uninstalled ui/ in ephy_file
Attachment 181578 [details] pushed as ae650f3 - popup-commands: indent fix
Comment 42 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 17:46:52 UTC
Created attachment 182503 [details] [review]
ephy-file-helpers: only one downloads_dir function

Remove all the ambiguity, we always throw downloads to the same place or the
Desktop.

Bug #618443
Comment 43 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 17:47:14 UTC
Created attachment 182504 [details] [review]
ephy-file-helpers: allow desktop in ephy_file_browse_to

Nautilus doesn't draw the desktop as always anymore. It's not visible unless
you browse there, so the reason to not allow browse_to desktop is not valid
anymore.

Bug #618443
Comment 44 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 17:47:24 UTC
Created attachment 182505 [details] [review]
ephy-download: add the new EphyDownload object

EphyDownload is a wrapper object around WebKitDownload that handles common
behavior in downloads: auto-destination, default action for the MIME type.

It can be used to wrap a WebKitDownload coming from a WebKitView or to download
a url: ephy_download_new_for_uri and ephy_download_new_for_download are
provided.

Its lifetime is not automagic like EphyEmbedPersist, so you have to unref it
when you no longer need it.

This new object replaces EphyEmbedPersist and enables us to use a single
codepath for downloads in all Epiphany.

Bug #618443
Comment 45 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 17:47:31 UTC
Created attachment 182506 [details] [review]
ephy-download-widget: new widget

A widget showing the progress of an EphyDownload and offering the default set
of actions to take on it: Open, Browse to, Cancel.
It keeps a ref to the EphyDownload its showing.

Bug #618443
Comment 46 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 17:47:37 UTC
Created attachment 182507 [details] [review]
ephy-window: add new downloads UI

Downloads are shown per-window, imitating Chromium's bottom bar.
If the window being closed has active downloads, a warning dialog will be shown
just as when forms have been modified but not sent.
An active download is any download that is not yet 100% complete.

Bug #618443
Comment 47 Xan Lopez 2011-03-04 19:32:26 UTC
Review of attachment 182505 [details] [review]:

Looks sane to me with those changes.

::: embed/ephy-download.c
@@ +385,3 @@
+  g_return_if_fail (EPHY_IS_DOWNLOAD (download));
+/* vim: set sw=2 ts=2 sts=2 et: */
+  download->priv->window = g_object_ref (window);

Leaking the window.

@@ +402,3 @@
+  g_return_if_fail (EPHY_IS_DOWNLOAD (download));
+
+  download->priv->widget = widget;

should do the same than with window.

@@ +631,3 @@
+
+  if (priv->window) {
+    g_object_unref (priv->window);

Need to set window to NULL, dispose can run more than once.
Comment 48 Xan Lopez 2011-03-04 19:36:42 UTC
Review of attachment 182506 [details] [review]:

::: lib/widgets/ephy-download-widget.c
@@ +62,3 @@
+                 gint error_detail,
+                 char *reason,
+                 EphyDownloadWidget *widget);

Can you reorder the code to get rid of those?

@@ +127,3 @@
+
+  if (widget->priv->download)
+    g_object_unref (widget->priv->download);

Have to set to NULL.

@@ +138,3 @@
+
+  G_OBJECT_CLASS (ephy_download_widget_parent_class)->finalize (object);
+}

Useless finalize is useless.
Comment 49 Xan Lopez 2011-03-04 19:38:27 UTC
Review of attachment 182507 [details] [review]:

Looks sane.
Comment 50 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 19:39:33 UTC
Created attachment 182515 [details]
New downloads UI screenshot

This is how it looks.
Comment 51 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 19:40:19 UTC
Created attachment 182516 [details]
Warning when closing a window with ongoing downloads

When closing a window with *ongoing* downloads, you'll get this.
Comment 52 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 23:58:15 UTC
Created attachment 182528 [details] [review]
ephy-download: add the new EphyDownload object

EphyDownload is a wrapper object around WebKitDownload that handles common
behavior in downloads: auto-destination, default action for the MIME type.

It can be used to wrap a WebKitDownload coming from a WebKitView or to download
a url: ephy_download_new_for_uri and ephy_download_new_for_download are
provided.

Its lifetime is not automagic like EphyEmbedPersist, so you have to unref it
when you no longer need it.

This new object replaces EphyEmbedPersist and enables us to use a single
codepath for downloads in all Epiphany.

Bug #618443
Comment 53 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 23:58:20 UTC
Created attachment 182529 [details] [review]
ephy-download-widget: new widget

A widget showing the progress of an EphyDownload and offering the default set
of actions to take on it: Open, Browse to, Cancel.
It keeps a ref to the EphyDownload its showing.

Bug #618443
Comment 54 Diego Escalante Urrelo (not reading bugmail) 2011-03-04 23:58:25 UTC
Created attachment 182530 [details] [review]
ephy-window: add new downloads UI

Downloads are shown per-window, imitating Chromium's bottom bar.
If the window being closed has active downloads, a warning dialog will be shown
just as when forms have been modified but not sent.
An active download is any download that is not yet 100% complete.

Bug #618443
Comment 55 Diego Escalante Urrelo (not reading bugmail) 2011-03-07 20:00:11 UTC
Created attachment 182753 [details] [review]
ephy-download: add the new EphyDownload object

EphyDownload is a wrapper object around WebKitDownload that handles common
behavior in downloads: auto-destination, default action for the MIME type.

It can be used to wrap a WebKitDownload coming from a WebKitView or to download
a url: ephy_download_new_for_uri and ephy_download_new_for_download are
provided.

Its lifetime is not automagic like EphyEmbedPersist, so you have to unref it
when you no longer need it.

This new object replaces EphyEmbedPersist and enables us to use a single
codepath for downloads in all Epiphany.

Bug #618443
Comment 56 Diego Escalante Urrelo (not reading bugmail) 2011-03-07 20:00:23 UTC
Created attachment 182754 [details] [review]
ephy-download-widget: new widget

A widget showing the progress of an EphyDownload and offering the default set
of actions to take on it: Open, Browse to, Cancel.
It keeps a ref to the EphyDownload its showing.

Bug #618443
Comment 57 Diego Escalante Urrelo (not reading bugmail) 2011-03-07 20:00:31 UTC
Created attachment 182755 [details] [review]
ephy-window: add new downloads UI

Downloads are shown per-window, imitating Chromium's bottom bar.
If the window being closed has active downloads, a warning dialog will be shown
just as when forms have been modified but not sent.
An active download is any download that is not yet 100% complete.

Bug #618443
Comment 58 Xan Lopez 2011-03-07 20:08:01 UTC
Review of attachment 182753 [details] [review]:

Let's commit this already!

::: embed/ephy-download.c
@@ +410,3 @@
+    g_object_unref (download->priv->widget);
+
+  if (widget != NULL) {

Really need to assign widget always, even if it's NULL. Same for set_window.
Comment 59 Xan Lopez 2011-03-07 20:09:38 UTC
Review of attachment 182754 [details] [review]:

Let's go.
Comment 60 Xan Lopez 2011-03-07 20:11:40 UTC
Review of attachment 182755 [details] [review]:

OK.
Comment 61 Diego Escalante Urrelo (not reading bugmail) 2011-03-07 20:38:01 UTC
Boy, am I happy to close this...

Thanks for the reviews Xan :)

Attachment 182503 [details] pushed as fdafabd - ephy-file-helpers: only one downloads_dir function
Attachment 182504 [details] pushed as 7f7826a - ephy-file-helpers: allow desktop in ephy_file_browse_to
Attachment 182753 [details] pushed as b9f9bf1 - ephy-download: add the new EphyDownload object
Attachment 182754 [details] pushed as 1463005 - ephy-download-widget: new widget
Attachment 182755 [details] pushed as 7401732 - ephy-window: add new downloads UI