diff --git a/src/forms/MainWindow.ui b/src/forms/MainWindow.ui
index 5586844..67cb8e6 100644
--- a/src/forms/MainWindow.ui
+++ b/src/forms/MainWindow.ui
@@ -172,17 +172,17 @@
Spalten
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
@@ -379,7 +379,7 @@
Passwörter verbergen
-
+
true
@@ -387,7 +387,7 @@
Titel
-
+
true
@@ -395,7 +395,7 @@
Benutzername
-
+
true
@@ -403,7 +403,7 @@
URL
-
+
true
@@ -411,7 +411,7 @@
Passwort
-
+
true
@@ -419,7 +419,7 @@
Kommentar
-
+
true
@@ -427,7 +427,7 @@
Ablaufdatum
-
+
true
@@ -435,7 +435,7 @@
Erstellungsdatum
-
+
true
@@ -443,7 +443,7 @@
Letzte Änderung
-
+
true
@@ -451,7 +451,7 @@
Letzter Zugriff
-
+
true
diff --git a/src/lib/EntryView.cpp b/src/lib/EntryView.cpp
index e493e23..d71813d 100644
--- a/src/lib/EntryView.cpp
+++ b/src/lib/EntryView.cpp
@@ -135,6 +135,7 @@ if(entry->GroupID==CurrentGroup){
void KeepassEntryView::updateColumns(){
+setColumnCount(0);
QStringList cols;
if(config.Columns[0]){
cols << trUtf8("Titel");}
@@ -151,7 +152,7 @@ if(config.Columns[5]){
if(config.Columns[6]){
cols << trUtf8("Erstellung");}
if(config.Columns[7]){
- cols << trUtf8("letzte Änderung");}
+ cols << trUtf8("letzte Ãnderung");}
if(config.Columns[8]){
cols << trUtf8("letzter Zugriff");}
if(config.Columns[9]){
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 39d8fef..798d4ae 100755
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -73,13 +73,24 @@ KeepassMainWindow::KeepassMainWindow(QWidget *parent, Qt::WFlags flags):QMainWin
EditDeleteEntryAction->setShortcut(tr("Ctrl+D"));
EditCloneEntryAction->setShortcut(tr("Ctrl+K"));
EditSearchAction->setShortcut(tr("Ctrl+F"));
-
#ifdef Q_WS_MAC
FileCloseAction->setShortcut(tr("Ctrl+W"));
FileSaveAsAction->setShortcut(tr("Shift+Ctrl+S"));
EditGroupSearchAction->setShortcut(tr("Shift+Ctrl+F"));
#endif
+ ViewHidePasswordsAction->setChecked(config.ListView_HidePasswords);
+ ViewHideUsernamesAction->setChecked(config.ListView_HideUsernames);
+ ViewColumnsTitleAction->setChecked(config.Columns[0]);
+ ViewColumnsUsernameAction->setChecked(config.Columns[1]);
+ ViewColumnsUrlAction->setChecked(config.Columns[2]);
+ ViewColumnsPasswordAction->setChecked(config.Columns[3]);
+ ViewColumnsCommentAction->setChecked(config.Columns[4]);
+ ViewColumnsExpireAction->setChecked(config.Columns[5]);
+ ViewColumnsCreationAction->setChecked(config.Columns[6]);
+ ViewColumnsLastChangeAction->setChecked(config.Columns[7]);
+ ViewColumnsLastAccessAction->setChecked(config.Columns[8]);
+ ViewColumnsAttachmentAction->setChecked(config.Columns[9]);
QuickSearchEdit=new QLineEdit(toolBar);
QuickSearchEdit->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
@@ -116,6 +127,19 @@ void KeepassMainWindow::setupConnections(){
connect(EditSaveAttachmentAction, SIGNAL(triggered()), this, SLOT(OnEditSaveAttachment()));
connect(EditSearchAction, SIGNAL(triggered()), this, SLOT(OnEditSearch()));
connect(EditGroupSearchAction, SIGNAL(triggered()), this, SLOT(OnEditGroupSearch()));
+
+ connect(ViewHidePasswordsAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged(bool)));
+ connect(ViewHideUsernamesAction,SIGNAL(toggled(bool)), this, SLOT(OnUsernPasswVisibilityChanged(bool)));
+ connect(ViewColumnsTitleAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsUsernameAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsUrlAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsPasswordAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsCommentAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsExpireAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsCreationAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsLastChangeAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsLastAccessAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
+ connect(ViewColumnsAttachmentAction,SIGNAL(toggled(bool)), this, SLOT(OnColumnVisibilityChanged(bool)));
connect(&ClipboardTimer, SIGNAL(timeout()), this, SLOT(OnClipboardTimeOut()));
connect(GroupView,SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),this,
@@ -648,3 +672,28 @@ CEntry* KeepassMainWindow::currentEntry(){
Q_ASSERT(EntryView->selectedItems().size()==1);
return static_cast(EntryView->selectedItems()[0])->pEntry;
}
+
+void KeepassMainWindow::OnColumnVisibilityChanged(bool value){
+config.Columns[0]=ViewColumnsTitleAction->isChecked();
+config.Columns[1]=ViewColumnsUsernameAction->isChecked();
+config.Columns[2]=ViewColumnsUrlAction->isChecked();
+config.Columns[3]=ViewColumnsPasswordAction->isChecked();
+config.Columns[4]=ViewColumnsCommentAction->isChecked();
+config.Columns[5]=ViewColumnsExpireAction->isChecked();
+config.Columns[6]=ViewColumnsCreationAction->isChecked();
+config.Columns[7]=ViewColumnsLastChangeAction->isChecked();
+config.Columns[8]=ViewColumnsLastAccessAction->isChecked();
+config.Columns[9]=ViewColumnsAttachmentAction->isChecked();
+EntryView->updateColumns();
+EntryView->updateItems();
+}
+
+void KeepassMainWindow::OnUsernPasswVisibilityChanged(bool value){
+config.ListView_HidePasswords=ViewHidePasswordsAction->isChecked();
+config.ListView_HideUsernames=ViewHideUsernamesAction->isChecked();
+EntryView->updateItems();
+}
+
+void KeepassMainWindow::OnFileModified(){
+setStateFileModified(true);
+}
\ No newline at end of file
diff --git a/src/mainwindow.h b/src/mainwindow.h
index c96352b..e1887da 100755
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -81,6 +81,9 @@ private slots:
void OnGroupSelectionChanged();
void OnClipboardTimeOut();
void OnQuickSearch();
+ void OnColumnVisibilityChanged(bool show);
+ void OnUsernPasswVisibilityChanged(bool hide);
+ void OnFileModified();
private:
enum SelectionState{NONE,SINGLE,MULTIPLE,SEARCHGROUP};
@@ -93,6 +96,7 @@ private:
inline void setupToolbar();
inline void setupIcons();
inline void setupConnections();
+ inline void setupMenus();
void setStateFileOpen(bool);
void setStateFileModified(bool);
void setStateGroupSelected(SelectionState s);