aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/KeyList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widgets/KeyList.cpp')
-rw-r--r--src/ui/widgets/KeyList.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp
index fbaef366..74aa29cc 100644
--- a/src/ui/widgets/KeyList.cpp
+++ b/src/ui/widgets/KeyList.cpp
@@ -131,6 +131,17 @@ void KeyList::init() {
: global_column_filter_ & ~GpgKeyTableColumn::kSUBKEYS_NUMBER);
});
+ comment_column_action_ = new QAction("Comment");
+ comment_column_action_->setCheckable(true);
+ comment_column_action_->setChecked(
+ (global_column_filter_ & GpgKeyTableColumn::kCOMMENT) !=
+ GpgKeyTableColumn::kNONE);
+ connect(comment_column_action_, &QAction::toggled, this, [=](bool checked) {
+ UpdateKeyTableColumnType(
+ checked ? global_column_filter_ | GpgKeyTableColumn::kCOMMENT
+ : global_column_filter_ & ~GpgKeyTableColumn::kCOMMENT);
+ });
+
if ((fixed_columns_filter_ & GpgKeyTableColumn::kKEY_ID) !=
GpgKeyTableColumn::kNONE) {
column_type_menu->addAction(key_id_column_action_);
@@ -155,6 +166,11 @@ void KeyList::init() {
column_type_menu->addAction(subkeys_number_column_action_);
}
+ if ((fixed_columns_filter_ & GpgKeyTableColumn::kCOMMENT) !=
+ GpgKeyTableColumn::kNONE) {
+ column_type_menu->addAction(comment_column_action_);
+ }
+
ui_->columnTypeButton->setMenu(column_type_menu);
ui_->keyGroupTab->clear();