GNOME Bugzilla – Bug 343812
Recent documents list disappears when adding or removing bookmarks
Last modified: 2006-11-19 13:43:16 UTC
Please describe the problem: I've found out that the recent documents list disappears when modifying the Gnome bookmarks, either by adding or removing them when using the nautilus file manager. I also realized that the "Recent documents" menu entry remains sensitive although the list was not shown, so it seems that recent documents file list is not really lost when modifying bookmarks. Steps to reproduce: 1. Open several files using nautilus in order to have a non-empty recent document list, and check it at Places->Recent documents to see it working. 2. Browse to a folder with nautilus and add it as a bookmark, or remove an existing bookmark. Don't mind if you add or if you remove bookmarks, just modify bookmark list as you wish. 3. Check Places->Recent Documents again and you'll see how it's still sensitive (as it really had got entries) but inside of it only the "Clear recent documents" entry is present. Actual results: You lose your recent document list, although it seems not to be completely lost, since you still have access to the "Clear recent documents" action. Expected results: I should keep my recent documents list, regardless of whether I had modified my bookmarks list or not Does this happen every time? Yes Other information: I'd like to help with some stuff in this bug, so next hours I'll take a look into the gnome-panel source code to see if I can help with a patch or something similar.
Created attachment 66729 [details] [review] Patch for fixing the bug I found out this workaround to fix the bug, just by calling again the set_model function when the panel_recent_append_documents_menu is called and a previous list already exists. It looks a bit strange calling to get_model to retrieve the previos model, and then calling to set_model again, but doing this the bug gets fixed. I hope it helps. Mario.
Created attachment 67146 [details] [review] Patch for fixing the bug (second try ;-)) After taking a deeper look into this bug, I've found out that, in fact, not only modifying bookmarks the recent documents list gets lost, just by modifying any of the menu items at the "Places" menu you lose your recent documents list: adding or removing storage volumes, bookmarks, network servers... This makes the bug more severe, because just by inserting a CD-ROM or a USB flash memory you get your volume list modified... and your recent documents list lost :( I was also looking at the source code for a better patch than the previous one and I wrote this other one. Basically, instead of re-setting the model in panel-recent.c (which seemed to work, but doesn't seem to be a right solution), I added needed logic at panel_place_menu_item_recreate_menu function in order to notify a possible change of the egg-recent-model inside the egg-recent-view involved when calling to that function. I've tested this patch and it seems it fixes the bug... even better than the old one, which didn't work properly since it only fixed the bug when modifying bookmarks, and not when modifying volumes or network servers. Once again... I hope it helps ;) Mario.
Thanks for the patch. I unfortunately didn't review it before 2.16, and it's not needed anymore in 2.16. Therefore I'm closing the bug. I told the people from distributor-list about this patch and they might use it (and commit it to the relevant branches). Thanks for your work on this, and sorry for not reviewing it sooner.