work on Auto-Type feature,
the save attachment file dialog now adopts the entry.BinaryDesc string as default filename git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@74 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#include <qcombobox.h>
|
||||
#include <qpainter.h>
|
||||
#include <qpen.h>
|
||||
#include <q3filedialog.h>
|
||||
#include <QFileDialog>
|
||||
#include <qmessagebox.h>
|
||||
#include <qtoolbutton.h>
|
||||
//Added by qt3to4:
|
||||
@@ -260,7 +260,7 @@ Edit_Password_w->setPaletteBackgroundColor(QColor(255,255,255)); ///@FIXME Stand
|
||||
|
||||
void CEditEntryDlg::OnNewAttachment()
|
||||
{
|
||||
QString filename=Q3FileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Anhang hinzufügen..."));
|
||||
QString filename=QFileDialog::getOpenFileName(this,tr("Add Attachment..."),QDir::homeDirPath());
|
||||
if(filename=="")return;
|
||||
QFile file(filename);
|
||||
if(file.open(QIODevice::ReadOnly)==false){
|
||||
@@ -294,8 +294,11 @@ saveAttachment(entry,this);
|
||||
|
||||
void CEditEntryDlg::saveAttachment(CEntry* pEntry, QWidget* ParentWidget)
|
||||
{
|
||||
QString filename=Q3FileDialog::getSaveFileName(QDir::homeDirPath(),"",ParentWidget,tr("Save Attachment..."));
|
||||
if(filename=="")return;
|
||||
QFileDialog FileDlg(ParentWidget,tr("Save Attachment..."),QDir::homeDirPath());
|
||||
FileDlg.selectFile(pEntry->BinaryDesc);
|
||||
FileDlg.setAcceptMode(QFileDialog::AcceptSave);
|
||||
if(!FileDlg.exec())return;
|
||||
QString filename=FileDlg.selectedFiles()[0];
|
||||
QFile file(filename);
|
||||
if(file.exists()){
|
||||
int r=QMessageBox::warning(ParentWidget,tr("Overwrite?"),tr("A file with this name already exists.\nDo you want to replace it?"),tr("Yes"),tr("No"),NULL,1,1);
|
||||
|
||||
Reference in New Issue
Block a user