Scroll to new selected cell if the gconf value changes.

* gconf-property-editor.c: (peditor_tree_view_widget_changed):
Scroll to new selected cell if the gconf value changes.

svn path=/trunk/; revision=7651
This commit is contained in:
Denis Washington 2007-05-24 15:05:51 +00:00
parent c1a2b46553
commit 8babb52619
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2007-05-24 Denis Washington <denisw@svn.gnome.org>
* gconf-property-editor.c: (peditor_tree_view_widget_changed):
Scroll to new selected cell if the gconf value changes.
2007-05-23 Jens Granseuer <jensgr@gmx.net>
* wm-common.c: (wm_common_get_current_window_manager): make sure we

View file

@ -1880,11 +1880,12 @@ peditor_tree_view_value_changed (GConfClient *client,
gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
if (entry && (value = gconf_entry_get_value (entry))) {
GtkTreeView *treeview;
GtkTreeSelection *selection;
GConfValue *value_wid;
selection = gtk_tree_view_get_selection (
GTK_TREE_VIEW (peditor->p->ui_control));
treeview = GTK_TREE_VIEW (peditor->p->ui_control);
selection = gtk_tree_view_get_selection (treeview);
value_wid = peditor->p->conv_to_widget_cb (peditor, value);
@ -1892,6 +1893,7 @@ peditor_tree_view_value_changed (GConfClient *client,
GtkTreePath *path = gtk_tree_path_new_from_string (
gconf_value_get_string (value_wid));
gtk_tree_selection_select_path (selection, path);
gtk_tree_view_scroll_to_cell (treeview, path, NULL, FALSE, 0, 0);
gtk_tree_path_free (path);
gconf_value_free (value_wid);
} else {