23 #include <blackboard/blackboard.h>
24 #include <core/exception.h>
25 #include <core/exceptions/software.h>
26 #include <gui_utils/multi_interface_chooser_dialog.h>
27 #include <interface/interface_info.h>
76 const char * type_pattern,
77 const char * id_pattern,
79 const Glib::ustring & title)
83 d->
init(blackboard, type_pattern, id_pattern);
97 const Glib::ustring & title)
100 loaded_interfaces_.insert(loaded_interfaces.begin(), loaded_interfaces.end());
101 Glib::RefPtr<Gtk::TreeSelection> treesel =
treeview_.get_selection();
103 treeview_.set_tooltip_text(
"Drag the rows to change the painting order.");
104 treesel->set_mode(Gtk::SELECTION_NONE);
117 MultiInterfaceChooserDialog::on_load_toggled(
const Glib::ustring &path)
119 Gtk::TreeModel::Row row = *
model_->get_iter(path);
127 const MultiInterfaceChooserDialog::Record &
132 this_nonconst->record_ =
new Record();
151 Gtk::CellRendererToggle *renderer =
152 dynamic_cast<Gtk::CellRendererToggle *
>(
treeview_.get_column_cell_renderer(0));
153 assert(renderer != NULL);
155 renderer->set_activatable(
true);
156 renderer->signal_toggled().connect(
157 sigc::mem_fun(*
this, &MultiInterfaceChooserDialog::on_load_toggled));
175 loaded_interfaces_.find(std::make_pair(ii.
type(), ii.
id())) != loaded_interfaces_.end();
186 const Gtk::TreeNodeChildren children =
model_->children();
187 for (Gtk::TreeNodeChildren::const_iterator it = children.begin(); it != children.end(); ++it) {
188 const Gtk::TreeRow &row = *it;
191 types_and_ids.push_back(pair);
195 return types_and_ids;
208 const Gtk::TreeNodeChildren children =
model_->children();
209 for (Gtk::TreeNodeChildren::const_iterator it = children.begin(); it != children.end(); ++it) {
210 const Gtk::TreeRow &row = *it;
213 if (loaded_interfaces_.find(pair) == loaded_interfaces_.end()) {
214 types_and_ids.push_back(pair);
219 return types_and_ids;