GNOME Bugzilla – Bug 135873
combobox doesn't support separators
Last modified: 2011-02-04 16:17:01 UTC
This is a regression against GtkOptionMenu where you could simply add separators to the menu.
If we add api for this, we should probably fix the same issue for tree views at the same time.
Here is a prototype patch for adding separators for file chooser only, by hardwiring a check for the private GtkCellRendererSepText cell renderer. It seems to work nicely except for the fact that keynav in the tree view seems to not really ignore it as it should.
Created attachment 25021 [details] [review] the patch
I would be grateful for API proposals how to handle seperators in model-view widgets.
Would this be enough: void gtk_tree_view_set_separator_column (GtkTreeView *tree_view, gint column); This would read the nth column from the model, which would yield a boolean value, and the tree would use that to decide whether a row is a separator. Likewise for the combo box, something like gtk_combo_box_set_separator_column(). I don't think we need anything more complicated.