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 148401 - add saved files to 'recent files' ?
add saved files to 'recent files' ?
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Downloads
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-07-25 10:49 UTC by Christian Persch
Modified: 2007-09-07 16:53 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
implementation (4.46 KB, patch)
2004-10-17 17:55 UTC, Christian Persch
none Details | Review
real patch (9.46 KB, patch)
2004-10-17 17:57 UTC, Christian Persch
none Details | Review
updated patch to epiphany HEAD (9.51 KB, patch)
2004-12-31 21:02 UTC, Christian Persch
none Details | Review
reworked patch to SVN trunk and using GtkRecent (4.61 KB, patch)
2007-08-07 22:55 UTC, Cosimo Cecchi
none Details | Review
reworked patch v2 (4.70 KB, patch)
2007-08-08 22:03 UTC, Cosimo Cecchi
committed Details | Review

Description Christian Persch 2004-07-25 10:49:13 UTC
Should we add files the user saves (web pages/images, downloads, print to file)
to the recent files system?
Comment 1 Christian Persch 2004-07-31 12:11:15 UTC
Feature -> 1.6
Comment 2 Christian Persch 2004-10-13 10:53:40 UTC
Mass reassigning of Epiphany bugs to epiphany-maint@b.g.o
Comment 3 Christian Persch 2004-10-17 17:55:28 UTC
Created attachment 32702 [details] [review]
implementation

Not sure if we should also add print-to-file files to recent...
Comment 4 Christian Persch 2004-10-17 17:57:36 UTC
Created attachment 32703 [details] [review]
real patch
Comment 5 spark 2004-12-16 00:24:10 UTC
Re comment 3, i think we should also include print-to-file files. Is that
included in "real patch"?
Comment 6 Christian Persch 2004-12-16 13:36:12 UTC
No, it's not included.
Adding print-to-file files means we've got to bring back the print progress
listener code...
Comment 7 spark 2004-12-16 13:54:44 UTC
...which it sounds like you don't wanna do :)

Anyway, print-to-file isn't too common an action -- i'm happy with the rest really.
Comment 8 Christian Persch 2004-12-31 21:02:11 UTC
Created attachment 35330 [details] [review]
updated patch to epiphany HEAD
Comment 9 Christian Persch 2004-12-31 21:03:07 UTC
Using latest egg-recent, I get a HUGE delay (browser unresponsive) while adding
a new recent item. Delaying this patch until that's fixed.
Comment 10 Bastien Nocera 2006-01-12 16:50:20 UTC
Christian, do you see this with an empty ~/.recently-used as well?
Comment 11 Christian Persch 2006-01-12 18:40:58 UTC
I think that was the try-to-sniff-mime-of-remote files bug that's fixes long since.

Would be nice if someone could take the patch, apply to HEAD (may need a bit of tweaking, not sure if it still applies cleanly), see if it basically works, preferably before feature freeze :)
Comment 12 Tommi Komulainen 2006-01-15 09:13:02 UTC
Comment on attachment 35330 [details] [review]
updated patch to epiphany HEAD

Two things that don't quite feel right:

>+		if (!mDontAddToRecent)

Maybe it's just me, but I hate parsing double negatives. Wouldn't it be more simple to just use 'if (mAddToRecent)' ?


>+	egg_recent_item_add_group (item, _("Epiphany"));
>+	egg_recent_item_add_group (item, _("Web Browser"));

The spec is vague about the exact semantics of the groups, but I believe the names aren't meant to be shown to the user and thus shouldn't be translated. I believe the use case is rather for an application to be able to pick only its own recent files (to be shown in File/Recent menu or something) - if you use the translation and switch locales, you'd get an odd subset of the files.
Comment 13 Christian Persch 2006-01-15 14:39:20 UTC
(In reply to comment #12)
> (From update of attachment 35330 [details] [review] [edit])
> Two things that don't quite feel right:
> 
> >+		if (!mDontAddToRecent)
> 
> Maybe it's just me, but I hate parsing double negatives. Wouldn't it be more
> simple to just use 'if (mAddToRecent)' ?

I don't remember why I wrote it that way; feel free to change it.

> 
> >+	egg_recent_item_add_group (item, _("Epiphany"));
> >+	egg_recent_item_add_group (item, _("Web Browser"));
> 
> The spec is vague about the exact semantics of the groups, but I believe the
> names aren't meant to be shown to the user and thus shouldn't be translated. I
> believe the use case is rather for an application to be able to pick only its
> own recent files (to be shown in File/Recent menu or something) - if you use
> the translation and switch locales, you'd get an odd subset of the files.

I think you're right.
Comment 14 Christian Persch 2006-02-03 13:38:20 UTC
-> 1.12 due to feature and UI freeze.
Comment 15 Bastien Nocera 2006-09-22 14:28:39 UTC
This shouldn't be using libegg anymore but the GtkRecent* code in GTK+ 2.10.
Comment 16 Cosimo Cecchi 2007-08-07 22:55:02 UTC
Created attachment 93252 [details] [review]
reworked patch to SVN trunk and using GtkRecent

The attached patch is a rework of chpe's which applies to SVN trunk, and uses GtkRecent instead of EggRecent stuff.
Comment 17 Christian Persch 2007-08-08 21:25:21 UTC
+static GtkRecentManager *manager = NUstatic GtkRecentManager *manager = NULL;LL;

I don't think we need to cache this; we can just always use the _get_default() when we need it. And you seem to mix using tabs and spaces for indent?

Otherwise looks fine; have you tested that the file gets added to recent in the right cases (download/saving, but not when opening a file loaded to /tmp ) ?
Comment 18 Cosimo Cecchi 2007-08-08 22:03:56 UTC
Created attachment 93324 [details] [review]
reworked patch v2

This should be ok. Sorry for the tabs and spaces mess, it should be a bug of Anjuta with 4-char tabs.
Recent Documents element in the gnome panel menu is not working at all (not a single app manage to file an entry in there...maybe a bug in gnome-applets 2.19.x) on my box, so I have not been able to test its integration, but i made a test case with a GtkRecentInfo and some g_debugs (you can find its traces in my previous patch, as I forgot to remove a part of it) and it worked fine, retrieving files once saved, so it should be ok.
Comment 19 Diego Escalante Urrelo (not reading bugmail) 2007-08-15 08:20:22 UTC
I couldn't get this working, is gnome-menus/panel broken?
Comment 20 Diego Escalante Urrelo (not reading bugmail) 2007-08-26 21:52:39 UTC
You can also check out if it works with the GtkFileChooser (recently used). It works.

Thanks Cosimo!

2007-08-26  Diego Escalante Urrelo  <diegoe@gnome.org>

        * lib/ephy-file-helpers.c:
        * lib/ephy-file-helpers.h:
        * embed/mozilla/MozDownload.h:
        * embed/mozilla/MozDownload.cpp:

        Add saved files to the GtkRecent list, gnome-panel is broken so don't
        expect to see the effects of this working there, you can use it on the
        GtkFileChooser dialog however. Fixes Bug #148401. Original patch by
        Christian Persch, updated by Cosimo Cecchi.

Lucky revision 7300.
Comment 21 Cosimo Cecchi 2007-09-07 16:53:45 UTC
Just for reference, now that bug #463907 has been fixed, this works good also in the panel menu.