Check that cursor position has changed before calling
2004-04-02 Padraig O'Briain <padraig.obriain@sun.com> * gnome-theme-details.c (update_list_something): Check that cursor position has changed before calling gtk_tree_view_set_cursor. * gnome-theme-manager.c (update_settings_from_gconf): Check that cursor position has changed before calling gtk_tree_view_set_cursor. Fixes bug #131538.
This commit is contained in:
parent
30b3cbb6d7
commit
80924cf2f0
3 changed files with 34 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-04-02 Padraig O'Briain <padraig.obriain@sun.com>
|
||||
|
||||
* gnome-theme-details.c (update_list_something): Check that cursor
|
||||
position has changed before calling gtk_tree_view_set_cursor.
|
||||
* gnome-theme-manager.c (update_settings_from_gconf): Check that
|
||||
cursor position has changed before calling gtk_tree_view_set_cursor.
|
||||
|
||||
Fixes bug #131538.
|
||||
|
||||
2004-04-01 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* Release 2.6.0.3
|
||||
|
|
|
@ -508,8 +508,20 @@ update_list_something (GtkWidget *tree_view, const gchar *theme)
|
|||
if (! strcmp (theme, theme_id))
|
||||
{
|
||||
GtkTreePath *path;
|
||||
GtkTreePath *cursor_path;
|
||||
gboolean cursor_same = FALSE;
|
||||
|
||||
gtk_tree_view_get_cursor (GTK_TREE_VIEW (tree_view), &cursor_path, NULL);
|
||||
path = gtk_tree_model_get_path (model, &iter);
|
||||
if (cursor_path && gtk_tree_path_compare (path, cursor_path) == 0)
|
||||
cursor_same = TRUE;
|
||||
|
||||
gtk_tree_path_free (cursor_path);
|
||||
|
||||
if (!cursor_same)
|
||||
{
|
||||
gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
|
||||
}
|
||||
gtk_tree_path_free (path);
|
||||
theme_found = TRUE;
|
||||
}
|
||||
|
|
|
@ -860,9 +860,20 @@ update_settings_from_gconf (void)
|
|||
! strcmp (current_icon_theme, meta_theme_info->icon_theme_name))
|
||||
{
|
||||
GtkTreePath *path;
|
||||
GtkTreePath *cursor_path;
|
||||
gboolean cursor_same = FALSE;
|
||||
|
||||
gtk_tree_view_get_cursor (GTK_TREE_VIEW (tree_view), &cursor_path, NULL);
|
||||
path = gtk_tree_model_get_path (model, &iter);
|
||||
if (cursor_path && gtk_tree_path_compare (path, cursor_path) == 0)
|
||||
cursor_same = TRUE;
|
||||
|
||||
gtk_tree_path_free (cursor_path);
|
||||
|
||||
if (!cursor_same)
|
||||
{
|
||||
gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
|
||||
}
|
||||
gtk_tree_path_free (path);
|
||||
custom_theme_found = FALSE;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue