}
}
+ public bool get_iter (MovieSource source, out Gtk.TreeIter iter) {
+ if (store.get_iter_first (out iter)) do {
+ MovieSource s = null;
+ store.get (iter, 2, out s);
+ if (s == source) {
+ return true;
+ }
+ } while (store.iter_next (ref iter));
+
+ return false;
+ }
+
+ public unowned TreeSelection get_selection () {
+ return tree.get_selection ();
+ }
+
+ public void set_hildon_ui_mode (UIMode mode) {
+ var selection = tree.get_selection ();
+
+ if (mode == UIMode.NORMAL) {
+ selection.set_mode (SelectionMode.NONE);
+ }
+ Hildon.gtk_tree_view_set_ui_mode (tree, mode);
+ if (mode == UIMode.EDIT) {
+ selection.set_mode (SelectionMode.MULTIPLE);
+ }
+ }
+
private void on_row_activated (TreeView tree, TreePath path_, TreeViewColumn column) {
TreePath path = path_.copy (); // FIXME - calling model.get_iter with path_ directly causes a C qualifier warning
TreeModel model = tree.model;