diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2011-03-10 16:00:48 +1100 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-03-10 16:00:48 +1100 |
commit | 9ad8fec5ff0e6790286b624f98c0b2926ccb5eb9 (patch) | |
tree | 7a37b8f82f2985b3021c4dfc61d9b34f4364f695 /editor | |
parent | adb33f2bb3f57e66bd607892467d3234e9ddb04b (diff) | |
download | dconf-9ad8fec5ff0e6790286b624f98c0b2926ccb5eb9.tar.gz |
editor: Fix SettingsModel.get_path (Bug #640089)
Diffstat (limited to 'editor')
-rw-r--r-- | editor/dconf-model.vala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/dconf-model.vala b/editor/dconf-model.vala index 960b369..48887fe 100644 --- a/editor/dconf-model.vala +++ b/editor/dconf-model.vala @@ -626,7 +626,8 @@ public class SettingsModel: GLib.Object, Gtk.TreeModel public Gtk.TreePath get_path(Gtk.TreeIter iter) { var path = new Gtk.TreePath(); - path.append_index((int)get_directory(iter).index); + for (var d = get_directory(iter); d != root; d = d.parent) + path.prepend_index((int)d.index); return path; } @@ -670,7 +671,7 @@ public class SettingsModel: GLib.Object, Gtk.TreeModel { Directory directory = get_directory(parent); if (n >= directory.children.length()) - return false; + return false; set_iter(out iter, directory.children.nth_data(n)); return true; } |