From 4f293c427c716374179410318b1c0812e20ffe45 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 29 Apr 2014 11:50:54 -0400 Subject: [PATCH] Add a comment with rules for separators --- gtk/gtkmenusectionbox.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c index 8891f59d87..62ab3182e2 100644 --- a/gtk/gtkmenusectionbox.c +++ b/gtk/gtkmenusectionbox.c @@ -70,6 +70,15 @@ gtk_menu_section_box_sync_item (GtkWidget *widget, (*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 gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box, gint *n_items)