GNOME Bugzilla – Bug 590661
"File" menu should show the icon of each recent document (regardless of menus_have_icons)
Last modified: 2011-07-29 09:30:36 UTC
Even though this isn't part of the HIG yet [1] we want objects such as documents, bookmarks, applications and devices to always show icons (the HIG currently only mentions bookmarks), regardless of menus_have_icons is set to true or false. This would mean that Gedit would make use of the gtk-image-menu-item-set-always-show-image [2] for all previously opened files under the File menu. This is especially important since GNOME recently changed menus_have_icons to false by default [3]. 1. http://bugzilla.gnome.org/show_bug.cgi?id=588668 2. http://library.gnome.org/devel/gtk/2.17/GtkImageMenuItem.html#gtk-image-menu-item-set-always-show-image 3. http://bugzilla.gnome.org/show_bug.cgi?id=557469
but even today (with that option on), we do not have icons for the recent files...
In that case, the bug here is that GEdit should show the icon of each recent document in its File menu item, but doesn't. :-)
well, obviously I am open to doing that if this is what is decided and done by all the apps. One of the reasons why we do not show the icons is becaue we have a number before every file so that recent items can be quickly accessed with the keyboard... I fear the having [icon] 1. Filename would be a bit cluttered. There is also an implementation problem, using gtk-image-menu-item-set-always-show-image is quite ugly for menus created with gtkuimanager.
Ah, I was under the impression that it used icons if the gconf key was set to true, so I wanted to avoid a regression in this case. I think we can wait with this until we can figure out a good, uncluttered layout.
Created attachment 140388 [details] [review] Adds icons to the recent documents in the File menu This one uses the "ugly" way to set the icon as there is not better option (yet). Also marks the icons as always show.
The patch looks good to me... codewise the only things that makes me dubious is that we are assuming that menu items constructed with UIManager are GtkImageMenuItems. Maybe just out of paranoia we could add a check GTK_IS_IMAGE_MENU_ITEM, just to be robust in case UIManager implementation changes under our feets. Apart from that detail, if UI people agree, I'd say to commit
*** Bug 614363 has been marked as a duplicate of this bug. ***
Any news on this? Should anything in the patch be changed?
I've pushed a fix for this bug. I made it in a cleaner way. Thanks for reporting.