when adding an unknown theme to the list because it has been selected use

2008-08-12  Jens Granseuer  <jensgr@gmx.net>

	* appearance-style.c: (conv_to_widget_cb), (prepare_list): when
	adding an unknown theme to the list because it has been selected use
	the corresponding default icon to represent it

svn path=/trunk/; revision=8856
This commit is contained in:
Jens Granseuer 2008-08-12 21:36:19 +00:00 committed by Jens Granseuer
parent 71e3280c3c
commit 9dec28d959
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2008-08-12 Jens Granseuer <jensgr@gmx.net>
* appearance-style.c: (conv_to_widget_cb), (prepare_list): when
adding an unknown theme to the list because it has been selected use
the corresponding default icon to represent it
2008-07-29 Jens Granseuer <jensgr@gmx.net>
* appearance-main.c: (main):

View file

@ -96,12 +96,16 @@ conv_to_widget_cb (GConfPropertyEditor *peditor, const GConfValue *value)
{
GtkListStore *list_store;
GtkTreeIter iter, sort_iter;
GdkPixbuf *thumbnail;
list_store = GTK_LIST_STORE (gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (store)));
g_object_get (peditor, "data", &thumbnail, NULL);
gtk_list_store_insert_with_values (list_store, &iter, 0,
COL_LABEL, curr_value,
COL_NAME, curr_value, -1);
COL_NAME, curr_value,
COL_THUMBNAIL, thumbnail,
-1);
/* convert the tree store iter for use with the sort model */
gtk_tree_model_sort_convert_child_iter_to_iter (GTK_TREE_MODEL_SORT (store),
&sort_iter, &iter);
@ -923,6 +927,7 @@ prepare_list (AppearanceData *data, GtkWidget *list, ThemeType type, GCallback c
peditor = gconf_peditor_new_tree_view (NULL, key, list,
"conv-to-widget-cb", conv_to_widget_cb,
"conv-from-widget-cb", conv_from_widget_cb,
"data", thumbnail,
NULL);
g_signal_connect (peditor, "value-changed", callback, data);