region: Add separators to the format chooser list
https://bugzilla.gnome.org/show_bug.cgi?id=695465
This commit is contained in:
parent
e1c563d38b
commit
1858a818c4
1 changed files with 18 additions and 0 deletions
|
@ -480,6 +480,22 @@ end_refilter (EggListBox *list_box,
|
|||
gtk_widget_set_visible (priv->no_results, (data.count == 0));
|
||||
}
|
||||
|
||||
static void
|
||||
update_separator_func (GtkWidget **separator,
|
||||
GtkWidget *child,
|
||||
GtkWidget *before,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (before == NULL)
|
||||
return;
|
||||
|
||||
if (*separator == NULL) {
|
||||
*separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
g_object_ref_sink (*separator);
|
||||
gtk_widget_show (*separator);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
cc_format_chooser_private_free (gpointer data)
|
||||
{
|
||||
|
@ -536,6 +552,8 @@ cc_format_chooser_new (GtkWidget *parent)
|
|||
region_visible, chooser, NULL);
|
||||
egg_list_box_set_selection_mode (EGG_LIST_BOX (priv->list),
|
||||
GTK_SELECTION_NONE);
|
||||
egg_list_box_set_separator_funcs (EGG_LIST_BOX (priv->list),
|
||||
update_separator_func, NULL, NULL);
|
||||
|
||||
add_all_regions (GTK_DIALOG (chooser));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue