From 88f42dfe6b32d5c2b3428b1faafda9497c00aece Mon Sep 17 00:00:00 2001 From: tarek_saidi Date: Thu, 22 Mar 2007 23:06:06 +0000 Subject: [PATCH] added 'relative path' option, fixed missing browser start function, added option for using the system's default browser. git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@129 b624d157-de02-0410-bad0-e51aec6abb33 --- src/StandardDatabase.cpp | 1 + src/dialogs/PasswordDlg.cpp | 37 ++++++---- src/dialogs/SettingsDlg.cpp | 134 +++++++++++++++++++++++------------- src/dialogs/SettingsDlg.h | 3 +- src/forms/SettingsDlg.ui | 41 +++++++++-- src/lib/EntryView.cpp | 16 ++--- src/lib/EntryView.h | 1 + src/main.cpp | 34 +++++++-- src/main.h | 1 + src/mainwindow.cpp | 67 ++++++++++-------- src/mainwindow.h | 2 +- 11 files changed, 229 insertions(+), 108 deletions(-) diff --git a/src/StandardDatabase.cpp b/src/StandardDatabase.cpp index a6a3a70..2ff83eb 100644 --- a/src/StandardDatabase.cpp +++ b/src/StandardDatabase.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include "crypto/twoclass.h" #include "crypto/aescpp.h" #include "crypto/sha256.h" diff --git a/src/dialogs/PasswordDlg.cpp b/src/dialogs/PasswordDlg.cpp index 8b6ed9d..5b0dbbf 100755 --- a/src/dialogs/PasswordDlg.cpp +++ b/src/dialogs/PasswordDlg.cpp @@ -51,17 +51,18 @@ CPasswordDialog::CPasswordDialog(QWidget* parent,IDatabase* DB,bool ShowExitButt } Combo_Dirs->setEditText(QString()); - if(config.RememberLastKey && !ChangeKeyMode){ - switch(config.LastKeyType){ - //case PASSWORD: setStatePasswordOnly(); break; //Password-Only is already the default - case KEYFILE: setStateKeyFileOnly(); - Combo_Dirs->setEditText(config.LastKeyLocation); - break; - case BOTH: setStateBoth(); - CheckBox_Both->setChecked(true); - Combo_Dirs->setEditText(config.LastKeyLocation); - break; + if(settings->value("RememberLastKey",true).toBool() && !ChangeKeyMode){ + QString LastKeyType=settings->value("LastKeyType","").toString(); + if(LastKeyType=="KeyFile"){ + setStateKeyFileOnly(); + Combo_Dirs->setEditText(QDir::cleanPath(QDir::current().absoluteFilePath(settings->value("LastKeyFile","").toString()))); + } + else if(LastKeyType=="Composite"){ + setStateBoth(); + CheckBox_Both->setChecked(true); + Combo_Dirs->setEditText(QDir::cleanPath(QDir::current().absoluteFilePath(settings->value("LastKeyFile","").toString()))); } + // if(LastKeyType==Password){... is not required because it is already the default state. } connect( Combo_Dirs, SIGNAL( editTextChanged(const QString&) ),this, SLOT( OnComboTextChanged(const QString&))); @@ -277,9 +278,19 @@ bool CPasswordDialog::doAuth(){ if(!DbAuth->authByFile(keyfile))return false; } - if(config.RememberLastKey){ - config.LastKeyLocation=keyfile; - config.LastKeyType=KeyType; + if(settings->value("RememberLastKey",true).toBool()){ + QString KeyLocation=keyfile; + if(settings->value("SaveRelativePaths",true).toBool()){ + KeyLocation=KeyLocation.left(KeyLocation.lastIndexOf("/")); + KeyLocation=makePathRelative(KeyLocation,QDir::currentPath())+keyfile.right(keyfile.length()-keyfile.lastIndexOf("/")-1); + } + settings->setValue("LastKeyFile",KeyLocation); + if(KeyType==PASSWORD) + settings->setValue("LastKeyType","Password"); + if(KeyType==KEYFILE) + settings->setValue("LastKeyType","KeyFile"); + if(KeyType==BOTH) + settings->setValue("LastKeyType","Composite"); } return true; diff --git a/src/dialogs/SettingsDlg.cpp b/src/dialogs/SettingsDlg.cpp index cb6f9d2..d6a01f4 100755 --- a/src/dialogs/SettingsDlg.cpp +++ b/src/dialogs/SettingsDlg.cpp @@ -43,18 +43,41 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog) connect(ButtonColor1, SIGNAL( clicked() ), this, SLOT( OnColor1() ) ); connect(ButtonColor2, SIGNAL( clicked() ), this, SLOT( OnColor2() ) ); connect(ButtonTextColor, SIGNAL( clicked() ), this, SLOT( OnTextColor() ) ); - connect(CheckBox_OpenLast,SIGNAL(stateChanged(int)),this,SLOT(OnCeckBoxOpenLastChanged(int))); + connect(CheckBox_OpenLast,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxOpenLastChanged(int))); connect(Button_MountDirBrowse,SIGNAL(clicked()),this,SLOT(OnMountDirBrowse())); connect(Radio_IntPlugin_None,SIGNAL(toggled(bool)),this,SLOT(OnIntPluginNone(bool))); connect(Radio_IntPlugin_Gnome,SIGNAL(toggled(bool)),this,SLOT(OnIntPluginGnome(bool))); connect(Radio_IntPlugin_Kde,SIGNAL(toggled(bool)),this,SLOT(OnIntPluginKde(bool))); + + connect(CheckBox_BrowserDefault,SIGNAL(stateChanged(int)),this,SLOT(OnCheckBoxBrowserDefaultChanged(int))); createBanner(&BannerPixmap,Icon_Settings32x32,tr("Settings"),width()); - CheckBox_OpenLast->setChecked(config.OpenLast); - SpinBox_ClipboardTime->setValue(config.ClipboardTimeOut); + //General + CheckBox_OpenLast->setChecked(settings->value("OpenLastFile",true).toBool()); + CheckBox_RememberLastKey->setChecked(settings->value("RememberLastKey",true).toBool()); + checkBox_ShowSysTrayIcon->setChecked(config.ShowSysTrayIcon); + checkBox_MinimizeToTray->setChecked(config.MinimizeToTray); + checkBox_SaveFileDlgHistory->setChecked(config.SaveFileDlgHistory); + + switch(config.GroupTreeRestore){ + case 1: + Radio_GroupTreeRestore->setChecked(true); + break; + case 2: + Radio_GroupTreeExpand->setChecked(true); + break; + case 3: + Radio_GroupTreeDoNothing->setChecked(true); + } + 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); + + + //Appearance QPixmap *pxt=new QPixmap(pixmTextColor->width(),pixmTextColor->height()); pxt->fill(config.BannerTextColor); pixmTextColor->clear(); @@ -68,33 +91,21 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog) QPixmap *px2=new QPixmap(pixmColor2->width(),pixmColor2->height()); px2->fill(config.BannerColor2); pixmColor2->clear(); - pixmColor2->setPixmap(*px2); + pixmColor2->setPixmap(*px2); color1=config.BannerColor1; color2=config.BannerColor2; textcolor=config.BannerTextColor; + CheckBox_AlternatingRowColors->setChecked(config.AlternatingRowColors); + + + //Security + SpinBox_ClipboardTime->setValue(config.ClipboardTimeOut); CheckBox_ShowPasswords->setChecked(config.ShowPasswords); CheckBox_ShowPasswords_PasswordDlg->setChecked(config.ShowPasswordsPasswordDlg); - checkBox_ShowSysTrayIcon->setChecked(config.ShowSysTrayIcon); - checkBox_MinimizeToTray->setChecked(config.MinimizeToTray); - checkBox_SaveFileDlgHistory->setChecked(config.SaveFileDlgHistory); - Edit_BrowserCmd->setText(config.OpenUrlCommand); - - switch(config.GroupTreeRestore){ - case 1: - Radio_GroupTreeRestore->setChecked(true); - break; - case 2: - Radio_GroupTreeExpand->setChecked(true); - break; - case 3: - Radio_GroupTreeDoNothing->setChecked(true); - } - CheckBox_AlternatingRowColors->setChecked(config.AlternatingRowColors); - Edit_MountDir->setText(config.MountDir); - CheckBox_RememberLastKey->setChecked(config.RememberLastKey); + //Desktop Integration if(PluginLoadError==QString()) Label_IntPlugin_Error->hide(); else @@ -106,13 +117,24 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog) case CConfig::GNOME: Radio_IntPlugin_Gnome->setChecked(true); break; 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(); + + + //Advanced + QString BrowserCmd=settings->value("BrowserCmd","<>").toString(); + if(BrowserCmd=="<>"){ + CheckBox_BrowserDefault->setChecked(true); + Edit_BrowserCmd->setDisabled(true); + } + else{ + Edit_BrowserCmd->setText(BrowserCmd); + CheckBox_BrowserDefault->setChecked(false); + } + + Edit_MountDir->setText(config.MountDir); + CheckBox_SaveRelativePaths->setChecked(settings->value("SaveRelativePaths",true).toBool()); + } CSettingsDlg::~CSettingsDlg() @@ -126,7 +148,15 @@ void CSettingsDlg::paintEvent(QPaintEvent *event){ painter.drawPixmap(QPoint(0,0),BannerPixmap); } - +void CSettingsDlg::OnCheckBoxBrowserDefaultChanged(int state){ + if(state==Qt::Checked){ + Edit_BrowserCmd->setDisabled(true); + Edit_BrowserCmd->setText(""); + } + else{ + Edit_BrowserCmd->setDisabled(false); + } +} void CSettingsDlg::OnOK() { @@ -145,36 +175,46 @@ void CSettingsDlg::OnOtherButton(QAbstractButton* button){ } void CSettingsDlg::apply(){ - config.OpenLast=CheckBox_OpenLast->isChecked(); - config.ClipboardTimeOut=SpinBox_ClipboardTime->value(); - config.BannerColor1=color1; - config.BannerColor2=color2; - config.BannerTextColor=textcolor; - config.ShowPasswords=CheckBox_ShowPasswords->isChecked(); - config.ShowPasswordsPasswordDlg=CheckBox_ShowPasswords_PasswordDlg->isChecked(); - config.OpenUrlCommand=Edit_BrowserCmd->text(); - config.AlternatingRowColors=CheckBox_AlternatingRowColors->isChecked(); - config.MountDir=Edit_MountDir->text(); + + //General config.ShowSysTrayIcon=checkBox_ShowSysTrayIcon->isChecked(); config.MinimizeToTray=checkBox_MinimizeToTray->isChecked(); config.SaveFileDlgHistory=checkBox_SaveFileDlgHistory->isChecked(); - config.EnableBookmarkMenu=checkBox_EnableBookmarkMenu->isChecked(); - + config.EnableBookmarkMenu=checkBox_EnableBookmarkMenu->isChecked(); if(Radio_GroupTreeRestore->isChecked())config.GroupTreeRestore=0; if(Radio_GroupTreeExpand->isChecked())config.GroupTreeRestore=1; if(Radio_GroupTreeDoNothing->isChecked())config.GroupTreeRestore=2; + settings->setValue("OpenLastFile",CheckBox_OpenLast->isChecked()); + settings->setValue("RememberLastKey",CheckBox_RememberLastKey->isChecked()); + if(Radio_GroupTreeExpand->isChecked())settings->setValue("GroupTreeState","ExpandAll"); + if(Radio_GroupTreeDoNothing->isChecked())settings->setValue("GroupTreeState","ExpandNone"); + if(Radio_GroupTreeRestore->isChecked())settings->setValue("GroupTreeState","Restore"); - if(config.MountDir!="" && config.MountDir.right(1)!="/") - config.MountDir+="/"; - config.RememberLastKey=CheckBox_RememberLastKey->isChecked(); + //Appearence + config.BannerColor1=color1; + config.BannerColor2=color2; + config.BannerTextColor=textcolor; + config.AlternatingRowColors=CheckBox_AlternatingRowColors->isChecked(); + + //Security + config.ClipboardTimeOut=SpinBox_ClipboardTime->value(); + config.ShowPasswords=CheckBox_ShowPasswords->isChecked(); + config.ShowPasswordsPasswordDlg=CheckBox_ShowPasswords_PasswordDlg->isChecked(); + + //Desktop Integration PluginsModified=Label_IntPlugin_Info->isVisible(); 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"); + //Advanced + config.OpenUrlCommand=Edit_BrowserCmd->text(); + config.MountDir=Edit_MountDir->text(); + if(config.MountDir!="" && config.MountDir.right(1)!="/") + config.MountDir+="/"; + if(CheckBox_BrowserDefault->isChecked())settings->setValue("BrowserCmd","<>"); + else settings->setValue("BrowserCmd",Edit_BrowserCmd->text()); + settings->setValue("SaveRelativePaths",CheckBox_SaveRelativePaths->isChecked()); } @@ -219,7 +259,7 @@ void CSettingsDlg::OnColor1() } } -void CSettingsDlg::OnCeckBoxOpenLastChanged(int state){ +void CSettingsDlg::OnCheckBoxOpenLastChanged(int state){ if(state==Qt::Checked){ CheckBox_RememberLastKey->setEnabled(true); }else{ diff --git a/src/dialogs/SettingsDlg.h b/src/dialogs/SettingsDlg.h index dd78853..4c1f16d 100755 --- a/src/dialogs/SettingsDlg.h +++ b/src/dialogs/SettingsDlg.h @@ -45,7 +45,8 @@ class CSettingsDlg : public QDialog, public Ui_SettingsDialog void OnIntPluginNone(bool); void OnIntPluginGnome(bool); void OnIntPluginKde(bool); - void OnCeckBoxOpenLastChanged(int state); + void OnCheckBoxOpenLastChanged(int state); + void OnCheckBoxBrowserDefaultChanged(int state); void OnMountDirBrowse(); private: diff --git a/src/forms/SettingsDlg.ui b/src/forms/SettingsDlg.ui index 2b2f071..8628555 100644 --- a/src/forms/SettingsDlg.ui +++ b/src/forms/SettingsDlg.ui @@ -893,6 +893,9 @@ + + + @@ -907,18 +910,46 @@ - - - + + + + Qt::Horizontal + + + QSizePolicy::Maximum + + + + 40 + 20 + + + + + + + + + 4 + 0 + 0 + 0 + + + + System Default + + + - + - Verify database content and structure after saving + Save relative paths diff --git a/src/lib/EntryView.cpp b/src/lib/EntryView.cpp index fea82fc..c767192 100644 --- a/src/lib/EntryView.cpp +++ b/src/lib/EntryView.cpp @@ -264,19 +264,12 @@ void KeepassEntryView::OnNewEntry(){ } void KeepassEntryView::OnEntryActivated(QTreeWidgetItem* item,int Column){ - int i=0; - int c=-1; - for(i;itext(logicalColIndex(2))); +} + void KeepassEntryView::OnUsernameToClipboard(){ Clipboard->setText(((EntryViewItem*)selectedItems()[0])->EntryHandle->username(), QClipboard::Clipboard); ClipboardTimer.setSingleShot(true); diff --git a/src/lib/EntryView.h b/src/lib/EntryView.h index f6d9238..b96e86d 100644 --- a/src/lib/EntryView.h +++ b/src/lib/EntryView.h @@ -94,6 +94,7 @@ class KeepassEntryView:public QTreeWidget{ void OnAutoType(); void removeDragItems(); void OnColumnMoved(int LogIndex,int OldVisIndex,int NewVisIndex); + void OnEditOpenUrl(); signals: void fileModified(); void selectionChanged(SelectionState); diff --git a/src/main.cpp b/src/main.cpp index 2bd60a5..9b9d491 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include "plugins/interfaces/IFileDialog.h" #include "plugins/interfaces/IKdeInit.h" @@ -280,10 +282,18 @@ QString decodeFileError(QFile::FileError Code){ } } -void openBrowser(QString url){ - QStringList args=config.OpenUrlCommand.arg(url).split(' '); - QString cmd=args.takeFirst(); - QProcess::startDetached(cmd,args); +void openBrowser(QString UrlString){ + QUrl url(UrlString); + if(url.scheme().isEmpty()) + url=QUrl("http://"+UrlString); + if(settings->value("BrowserCmd","<>").toString() == "<>"){ + QDesktopServices::openUrl(url); + } + else{ + QStringList args=settings->value("BrowserCmd","<>").toString().arg(url.toString()).split(' '); + QString cmd=args.takeFirst(); + QProcess::startDetached(cmd,args); + } } @@ -427,3 +437,19 @@ QString findPlugin(const QString& filename){ return QString(); } + + +QString makePathRelative(const QString& AbsDir,const QString& CurDir){ + QStringList abs=AbsDir.split('/'); + QStringList cur=CurDir.split('/'); + QString rel="./"; + int common=0; + for(common; common < abs.size() && common < cur.size(); common++){ + if(abs[common]!=cur[common])break; + } + for(int i=0;ivalue("OpenLastFile",true).toBool() && (settings->value("LastFile","").toString()!=QString())){ + QFileInfo file(settings->value("LastFile","").toString()); if(file.exists()) - openDatabase(config.LastFile,true); + openDatabase(QDir::cleanPath(QDir::current().absoluteFilePath(settings->value("LastFile","").toString())),true); else - config.LastFile=QString(); + settings->setValue("LastFile",""); } - + /* //dbusServer=new QDBusServer("unix:path=/tmp/KpxBus",this); //qDebug("DBUS: %s",dbusServer->lastError().message().toAscii().data()); //QDBusConnection::connectToBus("unix:path=/tmp/KpxBus","MyKpxConnection"); @@ -111,6 +111,7 @@ KeepassMainWindow::KeepassMainWindow(const QString& ArgFile,QWidget *parent, Qt: QDBusConnection::sessionBus().registerService("org.keepassx.firefoxservice"); QDBusConnection::sessionBus().registerObject("/KpxFirefox",fox); qDebug("DBUS: %s",QDBusConnection::sessionBus().lastError().message().toAscii().data()); + */ } @@ -135,7 +136,7 @@ void KeepassMainWindow::setupConnections(){ connect(EditDeleteEntryAction, SIGNAL(triggered()), EntryView, SLOT(OnDeleteEntry())); connect(EditUsernameToClipboardAction, SIGNAL(triggered()), EntryView, SLOT(OnUsernameToClipboard())); connect(EditPasswordToClipboardAction, SIGNAL(triggered()), EntryView, SLOT(OnPasswordToClipboard())); - connect(EditOpenUrlAction, SIGNAL(triggered()), this, SLOT(OnEditOpenUrl())); + connect(EditOpenUrlAction, SIGNAL(triggered()), EntryView, SLOT(OnEditOpenUrl())); connect(EditSaveAttachmentAction, SIGNAL(triggered()),EntryView, SLOT(OnSaveAttachment())); connect(EditSearchAction, SIGNAL(triggered()), this, SLOT(OnSearch())); connect(EditGroupSearchAction, SIGNAL(triggered()), this, SLOT(OnGroupSearch())); @@ -340,7 +341,7 @@ void KeepassMainWindow::openDatabase(QString filename,bool IsAuto){ QString err; StatusBarGeneral->setText(tr("Loading Database...")); if(db->load(filename)==true){ - if(config.OpenLast)config.LastFile=filename; + saveLastFilename(filename); setWindowTitle(tr("%1 - KeePassX").arg(filename)); GroupView->createItems(); EntryView->showGroup(NULL); @@ -639,7 +640,7 @@ else Q_ASSERT(false); bool KeepassMainWindow::OnFileSave(){ if(!db->file()) return OnFileSaveAs(); -config.LastFile=db->file()->fileName(); +saveLastFilename(db->file()->fileName()); if(db->save()) setStateFileModified(false); else{ @@ -724,10 +725,6 @@ for(int i=0; iURL); -} - void KeepassMainWindow::search(IGroupHandle* group){ CSearchDlg dlg(db,group,this,"SearchDialog",false); if(dlg.exec()){ @@ -854,27 +851,27 @@ void KeepassMainWindow::OnShowSearchResults(){ void KeepassMainWindow::OnViewToolbarIconSize16(bool state){ -if(!state)return; -ViewToolButtonSize22Action->setChecked(false); -ViewToolButtonSize28Action->setChecked(false); -config.ToolbarIconSize=16; -toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); + if(!state)return; + ViewToolButtonSize22Action->setChecked(false); + ViewToolButtonSize28Action->setChecked(false); + config.ToolbarIconSize=16; + toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); } void KeepassMainWindow::OnViewToolbarIconSize22(bool state){ -if(!state)return; -ViewToolButtonSize16Action->setChecked(false); -ViewToolButtonSize28Action->setChecked(false); -config.ToolbarIconSize=22; -toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); + if(!state)return; + ViewToolButtonSize16Action->setChecked(false); + ViewToolButtonSize28Action->setChecked(false); + config.ToolbarIconSize=22; + toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); } void KeepassMainWindow::OnViewToolbarIconSize28(bool state){ -if(!state)return; -ViewToolButtonSize16Action->setChecked(false); -ViewToolButtonSize22Action->setChecked(false); -config.ToolbarIconSize=28; -toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); + if(!state)return; + ViewToolButtonSize16Action->setChecked(false); + ViewToolButtonSize22Action->setChecked(false); + config.ToolbarIconSize=28; + toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); } void KeepassMainWindow::OnSysTrayActivated(QSystemTrayIcon::ActivationReason reason){ @@ -886,3 +883,17 @@ void KeepassMainWindow::OnExtrasPasswordGen(){ CGenPwDialog dlg(this,true); dlg.exec(); } + + +void KeepassMainWindow::saveLastFilename(const QString& filename){ + + if(settings->value("OpenLastFile",true).toBool()){ + if(settings->value("SaveRelativePath",true).toBool()){ + QString Path=filename.left(filename.lastIndexOf("/")); + Path=makePathRelative(Path,QDir::currentPath()); + settings->setValue("LastFile",Path+filename.right(filename.length()-filename.lastIndexOf("/")-1)); + } + else + settings->setValue("LastFile",filename); + } +} \ No newline at end of file diff --git a/src/mainwindow.h b/src/mainwindow.h index 5f09370..7f6349c 100755 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -67,7 +67,6 @@ class KeepassMainWindow : public QMainWindow, public Ui_MainWindow{ void OnFileSettings(); void OnFileChangeKey(); void OnFileExit(); - void OnEditOpenUrl(); void OnSearch(); void OnGroupSearch(); void OnViewShowToolbar(bool); @@ -113,6 +112,7 @@ class KeepassMainWindow : public QMainWindow, public Ui_MainWindow{ void removeFromSearchResults(int sID); void updateDetailView(); void exportDatabase(IExport* exporter,QStringList filters); + void saveLastFilename(const QString& filename); QLineEdit* QuickSearchEdit; QLabel* StatusBarGeneral; QLabel* StatusBarSelection;