25 #include <blackboard/blackboard.h>
26 #include <core/exception.h>
27 #include <core/exceptions/software.h>
28 #include <gui_utils/interface_chooser_dialog.h>
29 #include <interface/interface_info.h>
81 const char * type_pattern,
82 const char * id_pattern,
83 const Glib::ustring &title)
86 d->
init(blackboard, type_pattern, id_pattern);
98 : Gtk::Dialog(title, parent, true), parent_(parent), record_(NULL)
118 const char *type_pattern,
119 const char *id_pattern)
123 set_default_size(360, 240);
128 scrollwin_.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
131 Gtk::Box *vbox = get_vbox();
132 vbox->pack_start(scrollwin_);
135 add_button(Gtk::Stock::CANCEL, 0);
136 add_button(Gtk::Stock::OK, 1);
138 set_default_response(1);
140 treeview_.signal_row_activated().connect(sigc::bind(
141 sigc::hide<0>(sigc::hide<0>(sigc::mem_fun(*
this, &InterfaceChooserDialog::response))), 1));
146 for (InterfaceInfoList::iterator i = infl->begin(); i != infl->end(); ++i) {
147 Gtk::TreeModel::Row row = *
model_->append();
170 this_nonconst->record_ =
new Record();
220 const Glib::RefPtr<Gtk::TreeSelection> treesel =
treeview_.get_selection();
221 const Gtk::TreeModel::iterator iter = treesel->get_selected();
223 const Gtk::TreeModel::Row row = *iter;
227 throw Exception(
"No interface selected");
245 throw Exception(
"BlackBoard is not alive");
254 Glib::ustring message = *(e.
begin());
255 Gtk::MessageDialog md(parent_,
261 md.set_title(
"Opening Interface failed");