listen to on-disk theme changes in the details tabs, too

2007-06-23  Jens Granseuer  <jensgr@gmx.net>

	* appearance-style.c: (add_to_treeview), (remove_from_treeview),
	(update_in_treeview), (changed_on_disk_cb), (style_init):
	* appearance-themes.c: (theme_select_name),
	(theme_set_custom_from_theme), (theme_changed_on_disk_cb),
	(theme_thumbnail_done_cb):
	* theme-installer.c: (gnome_theme_installer_run):
	* theme-util.c: (theme_find_in_model):
	* theme-util.h: listen to on-disk theme changes in the details tabs, too

svn path=/trunk/; revision=7762
This commit is contained in:
Jens Granseuer 2007-06-23 11:08:21 +00:00 committed by Jens Granseuer
parent 6b8520facc
commit 68466d1c27
6 changed files with 180 additions and 37 deletions

View file

@ -113,3 +113,33 @@ theme_model_iter_last (GtkTreeModel *model, GtkTreeIter *iter)
}
return FALSE;
}
gboolean
theme_find_in_model (GtkTreeModel *model, const gchar *name, GtkTreeIter *iter)
{
GtkTreeIter walk;
gboolean valid;
gchar *test;
if (!name)
return FALSE;
for (valid = gtk_tree_model_get_iter_first (model, &walk); valid;
valid = gtk_tree_model_iter_next (model, &walk))
{
gtk_tree_model_get (model, &walk, COL_NAME, &test, -1);
if (test) {
gint cmp = strcmp (test, name);
g_free (test);
if (!cmp) {
if (iter)
*iter = walk;
return TRUE;
}
}
}
return FALSE;
}