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 591404 - GtkBookmark: deleting ~/.recently-used.xbel does not clear the list from memory
GtkBookmark: deleting ~/.recently-used.xbel does not clear the list from memory
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-08-11 03:05 UTC by Andrew Ziem
Modified: 2010-05-09 12:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Andrew Ziem 2009-08-11 03:05:43 UTC
Please describe the problem:
This command below should clear the list from memory, but GNOME 2.26 (Ubuntu 9.04) retains the list. (I think maybe GNOME will even re-write the file.)
$ rm -f ~/.recently-used.xbel

To show how inconsistent this behaviour is, truncating the file *does* clear the list from GNOME panel.
$ echo > ~/.recently-used.xbel

Steps to reproduce:
1. Create  recent documents list
2. rm -f
3. rm -f ~/.recently-used.xbel


Actual results:
Documents are still listed in the GNOME panel.

Expected results:
The list should be cleared from memory (from the GNOME panel).

Does this happen every time?
Yes

Other information:
Related bug in privacy cleaner application:
https://bugs.launchpad.net/bleachbit/+bug/407988
Comment 1 Andrew Ziem 2010-05-08 20:01:30 UTC
In GNOME 2.30 (Ubuntu Lucid Lynx) truncating no longer clears the recent documents list.  There appears to be no way to clear it programatically.
Comment 2 Emmanuele Bassi (:ebassi) 2010-05-09 12:56:29 UTC
(In reply to comment #1)
> There appears to be no way to clear it programatically.

you should have searched in the API reference, namely: gtk_recent_manager_purge_items():

http://library.gnome.org/devel/gtk/stable/GtkRecentManager.html#gtk-recent-manager-purge-items

if you don't want to *ever* save the contents of the recently used files list then you can use the gtk-recent-files-max-age GtkSetting:

http://library.gnome.org/devel/gtk/stable/GtkSettings.html#GtkSettings--gtk-recent-files-max-age

and set:

  gtk-recent-files-max-age = -1

inside your $HOME/.gtkrc file.
Comment 3 Emmanuele Bassi (:ebassi) 2010-05-09 12:57:09 UTC
sorry, it's:

  gtk-recent-files-max-age = 0

(had the -1 copy pasted from somewhere).