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 656989 - main window buttons don't have icons, regardless of toolbar-style setting in dconf
main window buttons don't have icons, regardless of toolbar-style setting in ...
Status: RESOLVED OBSOLETE
Product: cheese
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: 3.4
Assigned To: David King
Cheese Maintainer(s)
: 590943 653237 668594 689178 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-21 01:33 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2013-11-08 19:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
no icons in buttons bug (262.95 KB, image/png)
2011-08-21 01:33 UTC, Diego Escalante Urrelo (not reading bugmail)
  Details
correctly add images to buttons (25.45 KB, patch)
2011-09-28 20:36 UTC, David King
rejected Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2011-08-21 01:33:34 UTC
Created attachment 194317 [details]
no icons in buttons bug

Daniel mentioned that this was fixed in master, but it apparently is not.

The problem is that no matter the value in toolbar-style:

diego@bellota:~$ gsettings get org.gnome.desktop.interface toolbar-style
'both-horiz'

the buttons are always text-only. See screenshot. Yes, that's Daniel's hat.
Comment 1 David King 2011-09-07 21:40:23 UTC
Running Cheese from the terminal, I get:

(cheese:26135): Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkToggleButton, but as a GtkBin subclass a GtkToggleButton can only contain one widget at a time; it already contains a widget of type GtkLabel

and many other similar messages. The images should instead be added to the buttons with gtk_button_set_image(), whereas in the Glade file they are currently children of the button. Whether the image is shown would then depend on the "gtk-button-images" setting:

http://developer.gnome.org/gtk3/unstable/GtkSettings.html#GtkSettings--gtk-button-images
Comment 2 David King 2011-09-07 21:42:55 UTC
*** Bug 590943 has been marked as a duplicate of this bug. ***
Comment 3 David King 2011-09-28 20:36:19 UTC
Created attachment 197705 [details] [review]
correctly add images to buttons

Attached is a preliminary patch that adds images to the buttons correctly. I played around in Glade to get the images added, which led to a bit of shuffling in the .ui file, but the result seems a lot better, and correctly updates the image visibility depending on the gtk-button-images GtkSetting. I suppose that the Photo/Burst/Video buttons should only have text labels displayed if the images are not displayed. I also need to check that Glade did not adjust any padding or spacing.

The code to get the label out of the button to enable markup is hacky, and should probably be replaced with a GtkStyleContext solution. This will be slightly more complicated, as the style context will have to react to theme changes (it would work by querying the font from the button, adding a bold style, and setting the new font on the button).
Comment 4 David King 2011-09-28 20:44:05 UTC
*** Bug 653237 has been marked as a duplicate of this bug. ***
Comment 5 Luciana Fujii 2011-10-06 04:27:53 UTC
I think the padding and spacing is ok.

I do think that photo/burst/video mode button with only images instead of both would be much better, but is it "ok" to do that? It seems that "buttons-have-icons" should add icons beside the text. Maybe we can ask for some designer opinion?

Anyway, I also get the warnings. This preliminary patch is much better than what we have now, so if you want to commit it the way it is, we can keep the bug opened for the improvements.
Comment 6 David King 2012-01-24 18:29:22 UTC
*** Bug 668594 has been marked as a duplicate of this bug. ***
Comment 7 Delio 2012-11-16 13:32:46 UTC
Hi,
I downloaded and compiled the cheese sources and I got the same warning, I was trying to read your patch but I got some doubts. First of all how can I get it? can I pull it form git repository somehow? which branch did u push it to? What I can see is that in chee-main-window there is a link to cheese-action through a related action field and in cheese-main-window an image is added to the button while in the related action a label is attached to it. The flow is something like:

Button
 -> action
    add label to action
add image to Button

hence the button, through the action, already has a label added to it. Removing the label removes the warning, removing the related parameter removes the warning to and the software is not affected in any action. This makes me think that there is some ui design error on top of all. Furthermore I'm having troubles with glade (which supports only gtk3) and glate-gtk2 which find the same sort of errors when I try to load these files.
Comment 8 David King 2013-06-30 10:31:34 UTC
*** Bug 689178 has been marked as a duplicate of this bug. ***
Comment 9 David King 2013-11-08 19:46:06 UTC
with recent changes to shown text in most buttons, and symbolic icons in others, this is now obsolete.