Diffstat (limited to 'noncore/settings/mediummount/mediumwidget.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/mediummount/mediumwidget.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/noncore/settings/mediummount/mediumwidget.cc b/noncore/settings/mediummount/mediumwidget.cc index caa9559..f39a6ed 100644 --- a/noncore/settings/mediummount/mediumwidget.cc +++ b/noncore/settings/mediummount/mediumwidget.cc @@ -128,2 +128,6 @@ void MediumMountWidget::initGUI() m_box->addWidget(m_hboxAdd ); + m_scan_all_check = new QCheckBox( tr("Scan whole media"), this ); + connect(m_scan_all_check,SIGNAL(stateChanged(int)),this,SLOT(slotScanAllChanged(int))); + + m_box->addWidget(m_scan_all_check); @@ -171,2 +175,3 @@ void MediumMountWidget::readConfig( ) m_subList->insertStringList(entries); + m_scan_all_check->setChecked(m_config->readBoolEntry("wholemedia",true)); } @@ -194,9 +199,13 @@ void MediumMountWidget::writeConfig() continue; - if (ctext.startsWith("/")&&ctext.length()>1) { + if (ctext.startsWith("/")) { ctext = ctext.right(ctext.length()-1); } + if (!ctext.isEmpty()) { entries.append(ctext); } + } m_config->writeEntry("subdirs",entries,':'); + m_config->writeEntry("wholemedia",m_scan_all_check->isChecked()); } + MediumMountWidget::~MediumMountWidget() @@ -233 +242,9 @@ void MediumMountWidget::slotStateChanged() } + +void MediumMountWidget::slotScanAllChanged(int) +{ + bool state = !(m_scan_all_check->isChecked()); + m_add->setEnabled(state); + m_del->setEnabled(state); + m_subList->setEnabled(state); +} |