completed tree state restore function,
visual order of entries will now affect their saving order, changed the behavior of the entry view header. git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@124 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -18,9 +18,6 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "main.h"
|
||||
#include "PwmConfig.h"
|
||||
#include "PasswordDlg.h"
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QStringList>
|
||||
@@ -29,6 +26,12 @@
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
#include <QMessageBox>
|
||||
#include <QStringList>
|
||||
|
||||
#include "main.h"
|
||||
#include "PwmConfig.h"
|
||||
#include "PasswordDlg.h"
|
||||
#include "lib/FileDialogs.h"
|
||||
|
||||
|
||||
CPasswordDialog::CPasswordDialog(QWidget* parent,IDatabase* DB,bool ShowExitButton,bool ChangeKeyMode)
|
||||
@@ -127,27 +130,23 @@ void CPasswordDialog::setStateBoth(){
|
||||
|
||||
void CPasswordDialog::OnButtonBrowse()
|
||||
{
|
||||
QFileDialog FileDlg(this,tr("Select a Key File"),QDir::homePath());
|
||||
FileDlg.setFilters(QStringList()<<tr("All Files (*)") << tr("Key Files (*.key)"));
|
||||
FileDlg.setFileMode(QFileDialog::ExistingFile);
|
||||
if(!FileDlg.exec())return;
|
||||
if(!FileDlg.selectedFiles().size())return;
|
||||
QFile file(FileDlg.selectedFiles()[0]);
|
||||
if(file.exists()){
|
||||
Combo_Dirs->setEditText(FileDlg.selectedFiles()[0]);
|
||||
return;
|
||||
QString filename=KpxFileDialogs::openExistingFile(this,"PasswordDlg",tr("Select a Key File"),
|
||||
QStringList() << tr("All Files (*)") << tr("Key Files (*.key)"));
|
||||
if(filename!=QString()){
|
||||
Combo_Dirs->setEditText(filename);
|
||||
}
|
||||
QMessageBox::warning(this,tr("Error"),tr("Unexpected Error: File does not exist."),tr("OK"),"","",0,0);
|
||||
return;
|
||||
}
|
||||
|
||||
void CPasswordDialog::OnButtonBrowse_Set()
|
||||
{
|
||||
QFileDialog FileDlg(this,tr("Select a Key File"),QDir::homePath());
|
||||
FileDlg.setFilters(QStringList()<<tr("All Files (*)") << tr("Key Files (*.key)"));
|
||||
FileDlg.setFileMode(QFileDialog::AnyFile);
|
||||
if(!FileDlg.exec())return;
|
||||
if(!FileDlg.selectedFiles().size())return;
|
||||
Combo_Dirs->setEditText(FileDlg.selectedFiles()[0]);
|
||||
QString filename=KpxFileDialogs::saveFile(this,"PasswordDlg",tr("Select a Key File"),
|
||||
QStringList() << tr("All Files (*)") << tr("Key Files (*.key)"),
|
||||
false);
|
||||
if(filename!=QString()){
|
||||
Combo_Dirs->setEditText(filename);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void CPasswordDialog::OnCancel()
|
||||
|
||||
@@ -107,6 +107,10 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog)
|
||||
case CConfig::KDE: Radio_IntPlugin_Kde->setChecked(true); break;
|
||||
}
|
||||
|
||||
if(settings->value("GroupTreeState","ExpandAll")=="ExpandAll")Radio_GroupTreeExpand->setChecked(true);
|
||||
if(settings->value("GroupTreeState","ExpandAll")=="Restore")Radio_GroupTreeRestore->setChecked(true);
|
||||
if(settings->value("GroupTreeState","ExpandAll")=="ExpandNone")Radio_GroupTreeDoNothing->setChecked(true);
|
||||
|
||||
if(!PluginsModified)
|
||||
Label_IntPlugin_Info->hide();
|
||||
}
|
||||
@@ -167,6 +171,11 @@ void CSettingsDlg::apply(){
|
||||
if(Radio_IntPlugin_None->isChecked())config.IntegrPlugin=CConfig::NONE;
|
||||
if(Radio_IntPlugin_Gnome->isChecked())config.IntegrPlugin=CConfig::GNOME;
|
||||
if(Radio_IntPlugin_Kde->isChecked())config.IntegrPlugin=CConfig::KDE;
|
||||
|
||||
if(Radio_GroupTreeExpand->isChecked())settings->setValue("GroupTreeState","ExpandAll");
|
||||
if(Radio_GroupTreeDoNothing->isChecked())settings->setValue("GroupTreeState","ExpandNone");
|
||||
if(Radio_GroupTreeRestore->isChecked())settings->setValue("GroupTreeState","Restore");
|
||||
|
||||
}
|
||||
|
||||
void CSettingsDlg::OnTextColor()
|
||||
|
||||
Reference in New Issue
Block a user