2 #include "view_debug.h"
4 ViewDebug::ViewDebug (BTree *t):Gtk::VBox (),
8 list_store = Gtk::ListStore::create (columns);
9 list.set_model (list_store);
11 list.append_column ("Clave", columns.col_key_string);
12 list.append_column ("Encontrada", columns.col_key_verified);
16 pack_start (area, true, true, 8);
17 pack_end (testkeys, false, true, 8);
19 testkeys.signal_clicked().connect( sigc::mem_fun(*this, &ViewDebug::on_test_clicked) );
21 set_size_request (150, 0);
24 void ViewDebug::AddKey (const Clave &k)
26 Gtk::TreeModel::Row row = *(list_store->append());
27 row[columns.col_key_string] = k;
28 row[columns.col_key_verified] = false;
29 row[columns.col_key] = k.Clone ();
32 void ViewDebug::on_test_clicked ()
34 Gtk::TreeModel::Children rows = list_store->children ();
35 for(Gtk::TreeModel::Children::iterator iter = rows.begin(); iter != rows.end(); ++iter)
37 Gtk::TreeModel::Row row = *iter;
38 if (btree->FindKey (*row[columns.col_key]))
39 row[columns.col_key_verified] = true;