Sort the items in the theme lists
2007-05-13 Thomas Wood <thos@gnome.org> * appearance-style.c: (prepare_combo): Sort the items in the theme lists svn path=/trunk/; revision=7619
This commit is contained in:
parent
91e5a65efa
commit
64c8cbba68
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2007-05-13 Thomas Wood <thos@gnome.org>
|
||||||
|
|
||||||
|
* appearance-style.c: (prepare_combo): Sort the items in the theme lists
|
||||||
|
|
||||||
2007-05-13 Jens Granseuer <jensgr@gmx.net>
|
2007-05-13 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* appearance-themes.c: (theme_thumbnail_func): unref the thumbnail when
|
* appearance-themes.c: (theme_thumbnail_func): unref the thumbnail when
|
||||||
|
|
|
@ -82,6 +82,7 @@ prepare_combo (AppearanceData *data, GtkWidget *combo, enum ThemeType type)
|
||||||
GList *l, *list = NULL;
|
GList *l, *list = NULL;
|
||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
GnomeThemeElement element = 0;
|
GnomeThemeElement element = 0;
|
||||||
|
GtkTreeModel *sort_model;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +127,10 @@ prepare_combo (AppearanceData *data, GtkWidget *combo, enum ThemeType type)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (store));
|
sort_model = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (store));
|
||||||
|
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model), 0, GTK_SORT_ASCENDING);
|
||||||
|
|
||||||
|
gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (sort_model));
|
||||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
|
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
|
||||||
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer, "text", 0);
|
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer, "text", 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue