list.row_activated += on_row_activated;
}
+ public void select()
+ {
+ // Get currently selected/focused
+ Gtk.TreePath path;
+ Gtk.TreeViewColumn col;
+ list.get_cursor(out path, out col);
+
+ // Activate it
+ list.row_activated(path, col);
+ }
+
private void on_row_activated(Gtk.TreeView tv, Gtk.TreePath path, Gtk.TreeViewColumn column)
{
Gtk.TreeIter iter;
notebook.append_page(result, new Gtk.Label("Result"));
pack_start(notebook, true, true, 0);
+
+ Gtk.Button select = new Gtk.Button.with_label("Select");
+ button_box.pack_start(select, true, true, 0);
+ select.clicked += on_click;
}
+
+ private void on_click(Gtk.Button b)
+ {
+ stderr.printf("ZA\n");
+ if (notebook.page >= pages.size)
+ result.update(); // If we are in the result page, just update
+ else
+ {
+ PolygenPage page = pages[notebook.page];
+ page.select();
+ }
+ }
}
Polygen polygen;