Mercurial > hg > easyhg
diff src/filestatuswidget.cpp @ 484:896b7903e8f2
Make "Show all files" persistent (fixing #203), and rationalise some config group names (noting that "General" is actually the default group "" as it appears in the config file, not the name of a group called "General": that appears as "%General")
author | Chris Cannam |
---|---|
date | Wed, 17 Aug 2011 16:09:04 +0100 |
parents | c6ea3eb00635 |
children | 7829da6abe97 |
line wrap: on
line diff
--- a/src/filestatuswidget.cpp Wed Aug 17 15:53:17 2011 +0100 +++ b/src/filestatuswidget.cpp Wed Aug 17 16:09:04 2011 +0100 @@ -157,15 +157,27 @@ m_showAllFiles = new QCheckBox(tr("Show all files"), this); m_showAllFiles->setEnabled(false); layout->addWidget(m_showAllFiles, ++row, 0, Qt::AlignLeft); + + QSettings settings; + m_showAllFiles->setChecked(settings.value("showall", false).toBool()); + connect(m_showAllFiles, SIGNAL(toggled(bool)), - this, SIGNAL(showAllChanged(bool))); + this, SIGNAL(showAllChanged())); } FileStatusWidget::~FileStatusWidget() { + QSettings settings; + settings.setValue("showall", m_showAllFiles->isChecked()); + delete m_dateReference; } +bool FileStatusWidget::shouldShowAll() const +{ + return m_showAllFiles->isChecked(); +} + QString FileStatusWidget::labelFor(FileStates::State s, bool addHighlightExplanation) { QSettings settings;