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 82099 - GtkImageMenuItem needs a style property or GtkSetting to toggle showing images.
GtkImageMenuItem needs a style property or GtkSetting to toggle showing images.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.0.x
Other other
: High enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-05-17 18:48 UTC by Gregory Merchan
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add gtk-show-menu-images and gtk-show-button-images settings and use them (4.98 KB, patch)
2003-07-27 22:50 UTC, Matthias Clasen
none Details | Review
new patch (11.83 KB, patch)
2003-11-14 22:45 UTC, Matthias Clasen
none Details | Review
Better patch which installs the new widget-specific settings from the Installs widget-specific settings in class_init function rather than in gtksettings.c (10.94 KB, patch)
2003-11-17 22:17 UTC, Matthias Clasen
none Details | Review

Description Gregory Merchan 2002-05-17 18:48:10 UTC
The GNOME option to not show images in menus does not affect
GtkImageMenuItem and produces inconsistency unless all applications
use the libgnomeui API and also override the GtkEntry and GtkTextView
popup menus - and that causes bloat.

I sincerely hope this can be done without breaking ABI,
or, failing that, that the ABI can be changed.
Comment 1 Anders Carlsson 2002-05-17 18:49:49 UTC
Shouldn't this be a GtkSetting instead of a style property?
Comment 2 Gregory Merchan 2002-05-17 19:01:10 UTC
Ah, sorry, I hadn't thought of that.  As long as we have consistency,
it is good. Modifying the summary.
Comment 3 Gregory Merchan 2002-11-17 21:11:36 UTC
Related to this bug are these: #98077, #98589, and #98592.
Comment 4 Matthias Clasen 2003-07-27 22:50:27 UTC
Created attachment 18656 [details] [review]
add gtk-show-menu-images and gtk-show-button-images settings and use them
Comment 5 Matthias Clasen 2003-08-07 22:05:03 UTC
Also see bug 78072 for a similar patch.
Comment 6 Owen Taylor 2003-11-11 20:44:16 UTC
* The code needs to handle the setting changing on the fly

* I think we are likely to break existing code if the 
  child container heirarchy of the button is different 
  with different values of this setting. It would be better
  to simply hide the GtkImage widget.
Comment 7 Matthias Clasen 2003-11-14 22:45:52 UTC
Created attachment 21468 [details] [review]
new patch
Comment 8 Matthias Clasen 2003-11-14 22:48:34 UTC
Here is a new patch which doesn't change the hierarchy, only the
visibility. It also handles changes on the fly and wires the settings as 
xsettings Gtk/ButtonImages and Gtk/MenuImages. The xsettings stuff was
done for easier testing of changes on the fly with a patched
xsettings-manager, and can be left out if you don't think it is needed.
Comment 9 Matthias Clasen 2003-11-17 22:17:22 UTC
Created attachment 21554 [details] [review]
Better patch which installs the new widget-specific settings from the
Installs widget-specific settings in class_init function rather than in gtksettings.c
Comment 10 alexander.winston 2004-01-25 00:39:42 UTC
Adding the PATCH keyword and marking priority as high.
Comment 11 Soren Sandmann Pedersen 2004-02-19 12:40:26 UTC
Would it be possible to use gtk_widget_set_child_visible() instead of
gtk_widget_hide()? That would make it robust against people calling
gtk_widget_show_all() or gtk_widget_hide() on the parent widgets.

Other than that the patch looks good to me.
Comment 12 Matthias Clasen 2004-02-19 12:46:04 UTC
Good idea. The patch predates set_child_visible()...
Comment 13 Matthias Clasen 2004-02-19 13:55:13 UTC
Also, should switch to P_() instead of _()
Comment 14 Matthias Clasen 2004-02-19 22:40:35 UTC
Actually, the right thing to use is not child_visible, but no_show_all.