summaryrefslogtreecommitdiff
path: root/src/cardwidget.cc
diff options
context:
space:
mode:
authorrohit haldipur <rohithaldipur@gmail.com>2024-08-05 11:30:37 -0400
committerArun Raghavan <arun@asymptotic.io>2024-09-27 07:13:20 -0400
commitc46fbee81c28d38f7ce650bacb865429a0fdf739 (patch)
tree1656cfc22cf20e6b138b1d13ad40cd283ef785c6 /src/cardwidget.cc
parent34e364b880fc0a39ded730c3a1d474e793a777bd (diff)
Add a checkbox to hide unavailable profiles
Diffstat (limited to 'src/cardwidget.cc')
-rw-r--r--src/cardwidget.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cardwidget.cc b/src/cardwidget.cc
index 05e0d0b..7deba33 100644
--- a/src/cardwidget.cc
+++ b/src/cardwidget.cc
@@ -52,6 +52,7 @@ CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
codecList->signal_changed().connect( sigc::mem_fun(*this, &CardWidget::onCodecChange));
hasProfileLock = false;
+ hideUnavailableProfiles = false;
profileLockToggleButton->signal_clicked().connect(sigc::mem_fun(*this, &CardWidget::onProfileLockToggleButton));
profileLockToggleButton->set_sensitive(true);
@@ -74,6 +75,9 @@ void CardWidget::prepareMenu() {
active_idx = -1;
/* Fill the ComboBox's Tree Model */
for (uint32_t i = 0; i < profiles.size(); ++i) {
+ if (hideUnavailableProfiles && !availableProfiles[profiles[i].first])
+ continue;
+
Gtk::TreeModel::Row row = *(profileListStore->append());
row[profileModel.name] = profiles[i].first;
row[profileModel.desc] = profiles[i].second;