comparison src/filestatuswidget.cpp @ 489:86cdaa346e59

Merge
author Chris Cannam
date Wed, 17 Aug 2011 22:13:51 +0100
parents 896b7903e8f2
children 7829da6abe97
comparison
equal deleted inserted replaced
488:2f59333952ce 489:86cdaa346e59
77 m_descriptions[FileStates::Removed] = tr("These files will be removed from version control next time you commit them.<br>" 77 m_descriptions[FileStates::Removed] = tr("These files will be removed from version control next time you commit them.<br>"
78 "They will not be deleted from the local folder."); 78 "They will not be deleted from the local folder.");
79 m_descriptions[FileStates::Missing] = tr("These files are recorded in the version control, but absent from your working folder.<br>" 79 m_descriptions[FileStates::Missing] = tr("These files are recorded in the version control, but absent from your working folder.<br>"
80 "If you intended to delete them, select them and use Remove to tell the version control system about it.<br>" 80 "If you intended to delete them, select them and use Remove to tell the version control system about it.<br>"
81 "If you deleted them by accident, select them and use Revert to restore their previous contents."); 81 "If you deleted them by accident, select them and use Revert to restore their previous contents.");
82 m_descriptions[FileStates::InConflict] = tr("These files are unresolved following an incomplete merge.<br>Select a file and use Merge to try to resolve the merge again."); 82 m_descriptions[FileStates::InConflict] = tr("These files are unresolved following an incomplete merge.<br>Use Merge to try to resolve the merge again.");
83 m_descriptions[FileStates::Unknown] = tr("These files are in your working folder but are not under version control.<br>" 83 m_descriptions[FileStates::Unknown] = tr("These files are in your working folder but are not under version control.<br>"
84 // "Select a file and use Add to place it under version control or Ignore to remove it from this list."); 84 // "Select a file and use Add to place it under version control or Ignore to remove it from this list.");
85 "Select a file and use Add to place it under version control."); 85 "Select a file and use Add to place it under version control.");
86 m_descriptions[FileStates::Ignored] = tr("These files have names that match entries in the working folder's .hgignore file,<br>" 86 m_descriptions[FileStates::Ignored] = tr("These files have names that match entries in the working folder's .hgignore file,<br>"
87 "and so will be ignored by the version control system."); 87 "and so will be ignored by the version control system.");
155 layout->addItem(new QSpacerItem(8, 8), ++row, 0); 155 layout->addItem(new QSpacerItem(8, 8), ++row, 0);
156 156
157 m_showAllFiles = new QCheckBox(tr("Show all files"), this); 157 m_showAllFiles = new QCheckBox(tr("Show all files"), this);
158 m_showAllFiles->setEnabled(false); 158 m_showAllFiles->setEnabled(false);
159 layout->addWidget(m_showAllFiles, ++row, 0, Qt::AlignLeft); 159 layout->addWidget(m_showAllFiles, ++row, 0, Qt::AlignLeft);
160
161 QSettings settings;
162 m_showAllFiles->setChecked(settings.value("showall", false).toBool());
163
160 connect(m_showAllFiles, SIGNAL(toggled(bool)), 164 connect(m_showAllFiles, SIGNAL(toggled(bool)),
161 this, SIGNAL(showAllChanged(bool))); 165 this, SIGNAL(showAllChanged()));
162 } 166 }
163 167
164 FileStatusWidget::~FileStatusWidget() 168 FileStatusWidget::~FileStatusWidget()
165 { 169 {
170 QSettings settings;
171 settings.setValue("showall", m_showAllFiles->isChecked());
172
166 delete m_dateReference; 173 delete m_dateReference;
174 }
175
176 bool FileStatusWidget::shouldShowAll() const
177 {
178 return m_showAllFiles->isChecked();
167 } 179 }
168 180
169 QString FileStatusWidget::labelFor(FileStates::State s, bool addHighlightExplanation) 181 QString FileStatusWidget::labelFor(FileStates::State s, bool addHighlightExplanation)
170 { 182 {
171 QSettings settings; 183 QSettings settings;