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 463907 - 'Recent Documents' is broken in gnome-panel 2.19.5
'Recent Documents' is broken in gnome-panel 2.19.5
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.11.x
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 469163 472517 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-08-06 08:05 UTC by Hussam Al-Tayeb
Modified: 2007-09-03 09:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Screenshot showing menu inside Xephyr working (55.93 KB, image/png)
2007-08-31 16:59 UTC, Rob Bradford
  Details
remove the stat() delta check (557 bytes, patch)
2007-09-01 12:42 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Hussam Al-Tayeb 2007-08-06 08:05:21 UTC
Please describe the problem:
Under gtk+2.11.6 and glib2 2.14 , 'Recent Documents' stays empty regardless of how many documents I open.

Steps to reproduce:
1. open a few files 
2. in gnome-panel, open Places.



Actual results:
'Recent Documents' is empty.

Expected results:
'Recent Documents' should show the previously opened documents.

Does this happen every time?
Happens every time.

Other information:
Note that the 'recently used' in the gtk filepicker is still working. This happens only in gnome-panel.
Comment 1 Hussam Al-Tayeb 2007-08-07 04:53:29 UTC
Should this be under gnome-panel or gnome-menus?
Comment 2 Hussam Al-Tayeb 2007-08-07 08:01:09 UTC
 ~/.recently-used.xbel gets filled out correctly but gnome panel doesn't read from it.
Comment 3 Hussam Al-Tayeb 2007-08-07 10:00:30 UTC
It seems this might be a gtk+ problem as well.
Comment 4 Hussam Al-Tayeb 2007-08-07 12:22:35 UTC
When I downgraded gnome-panel to 2.18.3 , it was still borken. After I downgraded gtk+ to 2.10, it works again.
This is definitely a gtk+ bug.
Comment 5 Matthias Clasen 2007-08-08 14:26:04 UTC
I cannot reproduce this. The recent files support in the panel works fine for me, 
with GTK+ svn trunk.
Comment 6 Hussam Al-Tayeb 2007-08-08 14:52:10 UTC
ok, I will wait for 2.11.7 and see if this continues to occur here.
Comment 7 Sebastien Bacher 2007-08-09 10:26:26 UTC
Similar Ubuntu bug on https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/131266

"Symptom:
  Places->Recent documents does not update even though one opens several files of different MIME types. This means that if one clears recent documents, it will reman grayed out.

Reproducibility:
  Near 100% on my system, in various languages, although not everybody suffers this bug:

Possible causes:
  As $HOME/.recently-used.xbel is being updated all the time, it is possible that gnome-panel (I'm not sure it's this package) is not reading or parsing properly $HOME/.recently-used.xbel.

What has been attempted:
  I've deleted a remnant .recently-used on my $HOME to see if this was the culprit, but it seems it wasn't. I've also installed more language packs to see if this was a language pack issue. So far I've seen the same in Spanish (Spain), Basque (Spain), English (US) and English (UK).
  I've also made a symlink called .recently-used pointing to .recently-used.xbel to see if the issue was that gnome-panel was reading the old .recently-used instead of the updated .xbel one. It seems it didn't help.
  I'm now trying to see if the issue lies with the existance of two .recently* files."
Comment 8 Emmanuele Bassi (:ebassi) 2007-08-09 14:21:01 UTC
could someone experiencing this bug check out a recent gtk+ snapshot and run the tests/testrecentchoosermenu test app? if it works then it's a bug in the panel, otherwise it's a bug in the GtkRecent code.
Comment 9 Sebastien Bacher 2007-08-09 16:23:19 UTC
The GTK test seems to work correctly
Comment 10 Jan de Groot 2007-08-19 20:33:09 UTC
It used to work for me also, but after clearing the panel entries, they're greyed out. As for GTK:
- gedit still shows my wep.txt textfile as recent used and is able to open it
- fileselector shows all files recently opened when visiting the recent used bookmark

This is something going on between gnome-panel and GTK.
Comment 11 Sebastien Bacher 2007-08-21 10:16:26 UTC
the totem list seems to be not updated neither
Comment 12 Susana 2007-08-23 20:24:54 UTC
*** Bug 469163 has been marked as a duplicate of this bug. ***
Comment 13 Emmanuele Bassi (:ebassi) 2007-08-31 16:25:46 UTC
I've been tracking down the panel's code in SVN trunk. the recent documents menu item is set sensitive in the GtkRecentManager::changed signal handler if the GtkRecentManager:size property is > 0. what happens if you apply the following patch to gnome-panel?

Index: gnome-panel/panel-recent.c
===================================================================
--- gnome-panel/panel-recent.c  (revision 10588)
+++ gnome-panel/panel-recent.c  (working copy)
@@ -131,7 +131,7 @@ panel_recent_manager_changed_cb (GtkRece
 
        g_object_get (manager, "size", &size, NULL);
 
-       gtk_widget_set_sensitive (menu_item, size > 0);
+        g_debug (G_STRLOC ": RecentManager:size = %d", size);
 }
 
 static GtkWidget *clear_recent_dialog = NULL;

and see in $HOME/.xsession-errors what happens. at the moment, I have no idea why this happens.
Comment 14 Rob Bradford 2007-08-31 16:58:32 UTC
If I gnome-panel again inside Xephyr it works. But there is a strange "No items found" entry.

See attached screenshot.
Comment 15 Rob Bradford 2007-08-31 16:59:32 UTC
Created attachment 94717 [details]
Screenshot showing menu inside Xephyr working
Comment 16 Rob Bradford 2007-08-31 17:00:39 UTC
I should also make it clear that gnome-panel was still running on the host and that the recent Documents menu was still greyed out.
Comment 17 Sebastien Bacher 2007-09-01 10:13:26 UTC
nothing is printed when opening a video, a pdf or a text, looks like panel_recent_manager_changed_cb() is not called. When clearing the menu "** (gnome-panel:24948): DEBUG: panel-recent.c:135: RecentManager:size = 0"
Comment 18 Emmanuele Bassi (:ebassi) 2007-09-01 12:42:49 UTC
Created attachment 94755 [details] [review]
remove the stat() delta check

the only thing that might cause the storage file not to be read, and that changed between 2.10 and 2.11, is the stat() delta check I added. does applying this patch restore the functionality for you?
Comment 19 Vincent Untz 2007-09-02 10:54:03 UTC
*** Bug 472517 has been marked as a duplicate of this bug. ***
Comment 20 Sebastien Bacher 2007-09-03 09:44:20 UTC
the change makes the menu work correctly
Comment 21 Emmanuele Bassi (:ebassi) 2007-09-03 09:52:44 UTC
fix committed in trunk.

2007-09-03  Emmanuele Bassi  <ebassi@gnome.org>

        * gtk/gtkrecentmanager.c
        (gtk_recent_manager_poll_timeout): Remove the stat() time barrier,
        as it seems to cause bug #463907 (thanks to Sebastien Bacher).