diff options
author | Ryan Lortie <desrt@desrt.ca> | 2013-06-24 17:59:52 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2013-06-24 18:05:27 -0400 |
commit | c79a21e1ddda961be43813daa9179505af89adb7 (patch) | |
tree | a95e388fe7c785b7397aaaaa48bb385e6cdf2d0e /tests/testheaderbar.c | |
parent | d498e9b588fd59aabc82eea8e87962435b0fe191 (diff) | |
download | gtk+-c79a21e1ddda961be43813daa9179505af89adb7.tar.gz |
menu model: set separator label conditionally
When creating separators we were binding the "label" property on the
tracker to the "label" property on the GtkSeparatorMenuItem.
This was problematic for two reasons.
First, it was pointless. The section header label will never change.
Second, it was causing problems: doing the binding caused the value to
be initially synced up, even if it was NULL. Doing this caused
GtkMenuItem to create a GtkAccelLabel and add it as a child, which
prevented the separator from being shown normally.
Change the code a bit so that we just call gtk_menu_item_set_label()
when creating the item, if we find the label to be non-NULL.
Also, show() the separator item at first. GtkMenu manages visibility of
separators internally, but it seems "more correct" to show it ourselves
at first.
Diffstat (limited to 'tests/testheaderbar.c')
0 files changed, 0 insertions, 0 deletions