summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-03-02 22:45:59 +0100
committerLennart Poettering <lennart@poettering.net>2009-03-02 22:45:59 +0100
commit36aa55760cf27e72c9197f3902fedeb8b788516d (patch)
tree8045eeda5f33d8c2ff85c389267f5f58edf8651e /src
parent615445950024cd0084faaf72ff6b85beafb9ecf4 (diff)
parent1758320b6a90c3b382b343364aaa25ec42f0955e (diff)
Merge commit 'coling/master'
Diffstat (limited to 'src')
-rw-r--r--src/pavucontrol.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc
index bb68c69..7fef582 100644
--- a/src/pavucontrol.cc
+++ b/src/pavucontrol.cc
@@ -489,6 +489,10 @@ CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
x->get_widget("profileList", profileList);
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));
}
@@ -504,10 +508,7 @@ void CardWidget::prepareMenu() {
int idx = 0;
int active_idx = -1;
- //m_refTreeModel = Gtk::TreeStore::create(m_Columns);
- treeModel = Gtk::ListStore::create(profileModel);
- profileList->set_model(treeModel);
-
+ treeModel->clear();
//Fill the ComboBox's Tree Model:
for (std::map<Glib::ustring, Glib::ustring>::iterator i = profiles.begin(); i != profiles.end(); ++i) {
Gtk::TreeModel::Row row = *(treeModel->append());
@@ -518,9 +519,6 @@ void CardWidget::prepareMenu() {
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)
profileList->set_active(active_idx);
}