Commit 4b6f8f4b authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Do not disable tag support if Tags column is disabled/not shown

Tag support is used in many places and the Tags column can be enabled
for one key list but disabled for another. Therefore, tag support
shouldn't be disabled just because the Tags column is disabled/not shown
in one key list.

GnuPG-bug-id: 5174
parent 69539cea
......@@ -269,7 +269,7 @@ void CertifyCertificateCommand::Private::slotResult(const Error &err)
i18n("Certification Error"));
}
if (!dialog->remarks().isEmpty()) {
Remarks::enableRemarks(true);
Remarks::enableRemarks();
}
finished();
......
......@@ -21,11 +21,11 @@ bool Remarks::remarksEnabled()
return conf.readEntry("RemarksEnabled", false);
}
void Remarks::enableRemarks(bool enable)
void Remarks::enableRemarks()
{
KConfigGroup conf(KSharedConfig::openConfig(), "RemarkSettings");
conf.writeEntry("RemarksEnabled", enable);
KeyCache::mutableInstance()->enableRemarks(enable);
conf.writeEntry("RemarksEnabled", true);
KeyCache::mutableInstance()->enableRemarks(true);
}
GpgME::Key Remarks::remarkKey()
......
......@@ -18,7 +18,7 @@ namespace Remarks
{
/* Helper functions to work with remark configuration */
bool remarksEnabled();
void enableRemarks(bool enable);
void enableRemarks();
/* Read / write a single remark key into configuration. */
GpgME::Key remarkKey();
void setRemarkKey(const GpgME::Key &key);
......
......@@ -90,8 +90,8 @@ protected:
connect(mHeaderPopup, &QMenu::triggered, this, [this] (QAction *action) {
const int col = action->data().toInt();
if (col == REMARK_COLUMN) {
Remarks::enableRemarks(action->isChecked());
if ((col == REMARK_COLUMN) && action->isChecked()) {
Remarks::enableRemarks();
}
if (action->isChecked()) {
showColumn(col);
......@@ -440,8 +440,8 @@ void KeyTreeView::restoreLayout()
header->resizeSection(i, width ? width : 100);
header->moveSection(header->visualIndex(i), order);
if (i == REMARK_COLUMN) {
Remarks::enableRemarks(visible);
if ((i == REMARK_COLUMN) && visible) {
Remarks::enableRemarks();
}
if (!visible) {
m_view->hideColumn(i);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment