aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-02-27 22:12:53 -0800
committerChris Robinson <[email protected]>2016-02-27 22:12:53 -0800
commit11acbfebf7e1b49c5a420dcfd5505ac4c70b46ba (patch)
tree63ca3be8a5af14f4a7bbaddbc5bf7bf448d997a7 /utils
parent96520520be367cc0e2f708de0f2fb71b7cbb1223 (diff)
Hide backend list items for backends that aren't available
Diffstat (limited to 'utils')
-rw-r--r--utils/alsoft-config/mainwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index 30168773..127350f1 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -313,6 +313,17 @@ MainWindow::MainWindow(QWidget *parent) :
ui->backendListWidget->setCurrentRow(0);
ui->tabWidget->setCurrentIndex(0);
+ for(int i = 1;i < ui->backendListWidget->count();i++)
+ ui->backendListWidget->setRowHidden(i, true);
+ for(int i = 0;backendList[i].backend_name[0];i++)
+ {
+ QList<QListWidgetItem*> items = ui->backendListWidget->findItems(
+ backendList[i].full_string, Qt::MatchFixedString
+ );
+ foreach(const QListWidgetItem *item, items)
+ ui->backendListWidget->setItemHidden(item, false);
+ }
+
loadConfig(getDefaultConfigName());
}