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);
14 pack_start (list, true, true, 8);
15 pack_end (testkeys, false, true, 8);
17 testkeys.signal_clicked().connect( sigc::mem_fun(*this, &ViewDebug::on_test_clicked) );
20 void ViewDebug::AddKey (const Clave &k)
22 Gtk::TreeModel::Row row = *(list_store->append());
23 row[columns.col_key_string] = k;
24 row[columns.col_key_verified] = false;
25 row[columns.col_key] = k.Clone ();
28 void ViewDebug::on_test_clicked ()
30 Gtk::TreeModel::Children rows = list_store->children ();
31 for(Gtk::TreeModel::Children::iterator iter = rows.begin(); iter != rows.end(); ++iter)
33 Gtk::TreeModel::Row row = *iter;
34 if (btree->FindKey (*row[columns.col_key]))
35 row[columns.col_key_verified] = true;