Merge commit 'coling/master'
This commit is contained in:
commit
36aa55760c
|
@ -489,6 +489,10 @@ CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
|
||||||
x->get_widget("profileList", profileList);
|
x->get_widget("profileList", profileList);
|
||||||
x->get_widget("iconImage", iconImage);
|
x->get_widget("iconImage", iconImage);
|
||||||
|
|
||||||
|
treeModel = Gtk::ListStore::create(profileModel);
|
||||||
|
profileList->set_model(treeModel);
|
||||||
|
profileList->pack_start(profileModel.desc);
|
||||||
|
|
||||||
profileList->signal_changed().connect( sigc::mem_fun(*this, &CardWidget::onProfileChange));
|
profileList->signal_changed().connect( sigc::mem_fun(*this, &CardWidget::onProfileChange));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,10 +508,7 @@ void CardWidget::prepareMenu() {
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
int active_idx = -1;
|
int active_idx = -1;
|
||||||
|
|
||||||
//m_refTreeModel = Gtk::TreeStore::create(m_Columns);
|
treeModel->clear();
|
||||||
treeModel = Gtk::ListStore::create(profileModel);
|
|
||||||
profileList->set_model(treeModel);
|
|
||||||
|
|
||||||
//Fill the ComboBox's Tree Model:
|
//Fill the ComboBox's Tree Model:
|
||||||
for (std::map<Glib::ustring, Glib::ustring>::iterator i = profiles.begin(); i != profiles.end(); ++i) {
|
for (std::map<Glib::ustring, Glib::ustring>::iterator i = profiles.begin(); i != profiles.end(); ++i) {
|
||||||
Gtk::TreeModel::Row row = *(treeModel->append());
|
Gtk::TreeModel::Row row = *(treeModel->append());
|
||||||
|
@ -518,9 +519,6 @@ void CardWidget::prepareMenu() {
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add the model columns to the Combo (which is a kind of view),
|
|
||||||
//rendering them in the default way:
|
|
||||||
profileList->pack_start(profileModel.desc);
|
|
||||||
if (active_idx >= 0)
|
if (active_idx >= 0)
|
||||||
profileList->set_active(active_idx);
|
profileList->set_active(active_idx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue