work around GTK+ bug #143270 (set the cursor on the selected model path

2004-06-25  Michael Natterer  <mitch@gimp.org>

	* app/gui/preferences-dialog.c (prefs_dialog_new): work around
	GTK+ bug #143270 (set the cursor on the selected model path
	instead of selecting the iter in the selection). Fixes random
	theme switching when selecting the "Theme" page.
This commit is contained in:
Michael Natterer 2004-06-25 10:24:35 +00:00 committed by Michael Natterer
parent 23c068bc75
commit 397626fc7b
3 changed files with 25 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2004-06-25 Michael Natterer <mitch@gimp.org>
* app/gui/preferences-dialog.c (prefs_dialog_new): work around
GTK+ bug #143270 (set the cursor on the selected model path
instead of selecting the iter in the selection). Fixes random
theme switching when selecting the "Theme" page.
2004-06-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpbrushgenerated.c: added properties for all brush

View file

@ -1259,7 +1259,15 @@ prefs_dialog_new (Gimp *gimp,
if (GIMP_GUI_CONFIG (object)->theme &&
! strcmp (GIMP_GUI_CONFIG (object)->theme, themes[i]))
{
gtk_tree_selection_select_iter (sel, &iter);
GtkTreePath *path;
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), path,
NULL, FALSE, 0.0, 0.0);
gtk_tree_path_free (path);
}
}

View file

@ -1259,7 +1259,15 @@ prefs_dialog_new (Gimp *gimp,
if (GIMP_GUI_CONFIG (object)->theme &&
! strcmp (GIMP_GUI_CONFIG (object)->theme, themes[i]))
{
gtk_tree_selection_select_iter (sel, &iter);
GtkTreePath *path;
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), path,
NULL, FALSE, 0.0, 0.0);
gtk_tree_path_free (path);
}
}