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 590661 - "File" menu should show the icon of each recent document (regardless of menus_have_icons)
"File" menu should show the icon of each recent document (regardless of menus...
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 614363 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-03 17:06 UTC by Andreas Nilsson
Modified: 2011-07-29 09:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
Adds icons to the recent documents in the File menu (1.17 KB, patch)
2009-08-10 22:18 UTC, Marcus Carlson
none Details | Review

Description Andreas Nilsson 2009-08-03 17:06:30 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
Comment 1 Paolo Borelli 2009-08-03 17:31:00 UTC
but even today (with that option on), we do not have icons for the recent files...
Comment 2 Matthew Paul Thomas (mpt) 2009-08-04 09:27:30 UTC
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. :-)
Comment 3 Paolo Borelli 2009-08-04 09:34:53 UTC
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.
 
Comment 4 Andreas Nilsson 2009-08-05 14:34:16 UTC
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.
Comment 5 Marcus Carlson 2009-08-10 22:18:51 UTC
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.
Comment 6 Paolo Borelli 2009-12-30 14:21:32 UTC
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
Comment 7 Garrett Regier 2010-05-22 07:21:04 UTC
*** Bug 614363 has been marked as a duplicate of this bug. ***
Comment 8 Marcus Carlson 2010-06-30 19:57:28 UTC
Any news on this? Should anything in the patch be changed?
Comment 9 Ignacio Casal Quinteiro (nacho) 2011-07-29 09:30:36 UTC
I've pushed a fix for this bug. I made it in a cleaner way. Thanks for reporting.