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 719419 - the user should be able to disable the recently used files feature in preferences dialog in Image Viewer (eog)
the user should be able to disable the recently used files feature in prefere...
Status: RESOLVED OBSOLETE
Product: eog
Classification: Core
Component: general
3.4.x
Other Linux
: Normal enhancement
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-27 13:47 UTC by pengw
Modified: 2013-12-11 04:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description pengw 2013-11-27 13:47:22 UTC
Hi, I've read the source code of eog and found that the feature of keeping recently used files list was actually done in its source code (eog-window.c). It uses gtk_recent_manager to do this.
So instead of disabling the feature by deleting the recently-used.xbel file, could it be an option in the preferences dialog of eog to be able to enable or disable this feature? I'm willing to provide the code since it's not too complicated.

Andrew suggested me to report a bug: https://answers.launchpad.net/ubuntu/+question/239833

By the way, I'm using Ubuntu 12.04 with eog 3.4.2
Although I came across this problem in eog 3.4.2, I found that the problem existed in latest code as well.

I'll try to provide a patch as soon as possible.
Comment 1 Felix Riemann 2013-12-06 18:49:23 UTC
Is there a special reason why you need this specifically in eog?

IIRC you can disable the recent files list globally through the privacy panel in the control center.

If it's a really special case I'd rather not have this in eog's core and prefer a plugin (if possible).
Comment 2 pengw 2013-12-08 12:59:52 UTC
There is no special reason, just personal preferences.

Actually I tried to disable the list through the privacy panel as some post in AskUbuntu had suggested, but it didn't work. Only the file list in the Ubuntu Dash is processed.

I tried the plugin way. But since I read the code, I found it seemingly not possible because it used a system wide GTK+ feature (the recent manager). So it seems that a plugin can do nothing about this.

Anyway, I'm just new to Ubuntu and trying to figure out the system by reading the source code. It's totally personal interest and a suggestion. Actually I tried on my own laptop to disable the feature and made myself an eog without recent file list.

I consulted the community of Ubuntu and they suggested me to open an defect abou this. So came the bug. Sorry for any inconvenience. Still if you need the code, I'm glad to share.

(In reply to comment #1)
> Is there a special reason why you need this specifically in eog?
> 
> IIRC you can disable the recent files list globally through the privacy panel
> in the control center.
> 
> If it's a really special case I'd rather not have this in eog's core and prefer
> a plugin (if possible).
Comment 3 Felix Riemann 2013-12-09 17:29:04 UTC
(In reply to comment #2)
> There is no special reason, just personal preferences.
> 
> Actually I tried to disable the list through the privacy panel as some post in
> AskUbuntu had suggested, but it didn't work. Only the file list in the Ubuntu
> Dash is processed.

Okay, I think if your list is not empty before activating the setting, you need to open an image and close it again to see the list actually go away. But it should stay empty afterwards. It works with a stock GNOME 3.10 here.

> I tried the plugin way. But since I read the code, I found it seemingly not
> possible because it used a system wide GTK+ feature (the recent manager). So it
> seems that a plugin can do nothing about this.

Have you checked out the GtkSettings object and its "gtk-recent-files-enabled" property?

https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-recent-files-enabled

That should be controllable by a plugin (see the Disable Dark Theme plugin).
Comment 4 pengw 2013-12-11 04:47:08 UTC
Since that I'm using Ubuntu 12.04 with GNOME 3.4.2, it's of no surprise why the methods in the posts didn't work for me.

The property you mentioned is said to be introduced in GTK version 3.8, so it seems that the only way to fix the problem on my own PC is to use my own compiled eog.

Still thanks for your kind response.

(In reply to comment #3)
> (In reply to comment #2)
> > There is no special reason, just personal preferences.
> > 
> > Actually I tried to disable the list through the privacy panel as some post in
> > AskUbuntu had suggested, but it didn't work. Only the file list in the Ubuntu
> > Dash is processed.
> 
> Okay, I think if your list is not empty before activating the setting, you need
> to open an image and close it again to see the list actually go away. But it
> should stay empty afterwards. It works with a stock GNOME 3.10 here.
> 
> > I tried the plugin way. But since I read the code, I found it seemingly not
> > possible because it used a system wide GTK+ feature (the recent manager). So it
> > seems that a plugin can do nothing about this.
> 
> Have you checked out the GtkSettings object and its "gtk-recent-files-enabled"
> property?
> 
> https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-recent-files-enabled
> 
> That should be controllable by a plugin (see the Disable Dark Theme plugin).