Add a comment with rules for separators

This commit is contained in:
Matthias Clasen 2014-04-29 11:50:54 -04:00
parent 9753f9f55f
commit 4f293c427c

View File

@ -70,6 +70,15 @@ gtk_menu_section_box_sync_item (GtkWidget *widget,
(*n_items)++; (*n_items)++;
} }
/* We are trying to implement the following rules here:
*
* rule 1: never ever show separators for empty sections
* rule 2: always show a separator if there is a label
* rule 3: don't show a separator for the first section
* rule 4: don't show a separator for the following sections if there are
* no items before it
* (rule 5: these rules don't apply exactly the same way for subsections)
*/
void void
gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box, gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box,
gint *n_items) gint *n_items)