• Allison Karlitskaya's avatar
    menu model: set separator label conditionally · c79a21e1
    Allison Karlitskaya authored
    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.
gtkmenushell.c 72.6 KB