some work on AboutDlg,

fixed problem with new databases

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@57 b624d157-de02-0410-bad0-e51aec6abb33
master
tariq 19 years ago
parent 6154859afc
commit 49059c82f4
  1. 6
      src/Database.cpp
  2. 9
      src/Database.h
  3. 73
      src/PwManager.cpp
  4. 5
      src/PwManager.h
  5. 18
      src/dialogs/AboutDlg.cpp
  6. 15
      src/dialogs/SettingsDlg.cpp
  7. 1
      src/dialogs/SettingsDlg.h
  8. 34
      src/forms/AboutDlg.ui
  9. 37
      src/forms/MainWindow.ui
  10. 2
      src/import/Import_KWalletXml.cpp
  11. 22
      src/main.cpp
  12. 1
      src/main.h
  13. 40
      src/mainwindow.cpp
  14. 3
      src/mainwindow.h
  15. 266
      src/translations/keepass-de_DE.ts
  16. 250
      src/translations/keepass-xx_XX.ts

@ -60,3 +60,9 @@ CGroup::~CGroup(){
CEntry::~CEntry(){ CEntry::~CEntry(){
} }
Database::Database(){
file=NULL;
KeyEncRounds=6000;
CryptoAlgorithmus=ALGO_AES;
}

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
* Copyright (C) 2005 by Tarek Saidi * * Copyright (C) 2005-2006 by Tarek Saidi *
* mail@tarek-saidi.de * * mail@tarek-saidi.de *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
@ -22,6 +22,7 @@
#include <QList> #include <QList>
#include <QDateTime> #include <QDateTime>
#include <QFile>
#include "lib/SecString.h" #include "lib/SecString.h"
using namespace std; using namespace std;
@ -72,13 +73,15 @@ static bool UI_ExpandByDefault;
}; };
#define ALGO_AES 0
#define ALGO_TWOFISH 1
class Database{ class Database{
public: public:
Database();
Q_UINT32 CryptoAlgorithmus; Q_UINT32 CryptoAlgorithmus;
Q_UINT32 KeyEncRounds; Q_UINT32 KeyEncRounds;
QString filename; QFile* file;
bool modflag; bool modflag;
int SearchGroupID; int SearchGroupID;
QList<CGroup>Groups; QList<CGroup>Groups;

@ -33,6 +33,8 @@
using namespace std; using namespace std;
#include "PwManager.h" #include "PwManager.h"
#define _ERROR Errors << QString("Unexpected error in: %1, Line:%2").arg(__FILE__).arg(__LINE__);
QString PwDatabase::getError(){ QString PwDatabase::getError(){
if(Errors.size()){ if(Errors.size()){
QString r=Errors.front(); QString r=Errors.front();
@ -64,7 +66,7 @@ for(i=GroupIndex+1; i<Groups.size(); i++){
return ids; return ids;
} }
bool PwDatabase::loadDatabase(QString _filename, QString& err){ bool PwDatabase::openDatabase(QString filename, QString& err){
unsigned long total_size,crypto_size; unsigned long total_size,crypto_size;
Q_UINT32 Signature1,Signature2,Version,NumGroups,NumEntries,Flags; Q_UINT32 Signature1,Signature2,Version,NumGroups,NumEntries,Flags;
Q_UINT8 TrafoRandomSeed[32]; Q_UINT8 TrafoRandomSeed[32];
@ -72,13 +74,18 @@ Q_UINT8 FinalRandomSeed[16];
Q_UINT8 ContentsHash[32]; Q_UINT8 ContentsHash[32];
Q_UINT8 EncryptionIV[16]; Q_UINT8 EncryptionIV[16];
filename=_filename; file=new QFile(filename);
QFile file(filename); if(!file->open(QIODevice::ReadWrite)){
file.open(QIODevice::ReadOnly); if(!file->open(QIODevice::ReadOnly)){
total_size=file.size(); Errors << tr("Could not open file.");
delete file;
file=NULL;
return false;
}
}
total_size=file->size();
char* buffer = new char[total_size]; char* buffer = new char[total_size];
file.readBlock(buffer,total_size); file->readBlock(buffer,total_size);
file.close();
if(total_size < DB_HEADER_SIZE){ if(total_size < DB_HEADER_SIZE){
err=tr("Unexpected file size (DB_TOTAL_SIZE < DB_HEADER_SIZE)"); err=tr("Unexpected file size (DB_TOTAL_SIZE < DB_HEADER_SIZE)");
@ -383,8 +390,7 @@ else if(FileSize == 64){
file.close(); file.close();
return false;} return false;}
file.close(); file.close();
if(!convHexToBinaryKey(hex,(char*)FileKey)) return false; if(!convHexToBinaryKey(hex,(char*)FileKey)){return false;}
} }
else{ else{
sha256_starts(&sha32); sha256_starts(&sha32);
@ -519,6 +525,9 @@ PwDatabase::~PwDatabase(){
} }
void PwDatabase::newDatabase(){
file=new QFile();
}
bool CEntry::ReadEntryField(Q_UINT16 FieldType, Q_UINT32 FieldSize, Q_UINT8 *pData){ bool CEntry::ReadEntryField(Q_UINT16 FieldType, Q_UINT32 FieldSize, Q_UINT8 *pData){
@ -586,9 +595,13 @@ switch(FieldType)
bool PwDatabase::closeDatabase(){ bool PwDatabase::closeDatabase(){
Groups.clear(); Groups.clear();
Entries.clear(); Entries.clear();
file->close();
delete file;
file=NULL;
return true; return true;
} }
bool PwDatabase::saveDatabase(){ bool PwDatabase::saveDatabase(){
CGroup SearchGroup; CGroup SearchGroup;
Q_UINT32 NumGroups,NumEntries,Signature1,Signature2,Flags,Version; Q_UINT32 NumGroups,NumEntries,Signature1,Signature2,Flags,Version;
@ -597,10 +610,18 @@ Q_UINT8 FinalRandomSeed[16];
Q_UINT8 ContentsHash[32]; Q_UINT8 ContentsHash[32];
Q_UINT8 EncryptionIV[16]; Q_UINT8 EncryptionIV[16];
if(filename==QString::null)return false; Q_ASSERT(file);
QFile file(filename); if(!(file->openMode() & QIODevice::WriteOnly)){
unsigned int FileSize; file->close();
}
if(!file->isOpen()){
if(!file->open(QIODevice::ReadWrite)){
Errors << tr("Could not open file for writing.");
return false;
}
}
unsigned int FileSize;
Entries+=UnkownMetaStreams; ///@FIXME ID conflicts??? Entries+=UnkownMetaStreams; ///@FIXME ID conflicts???
FileSize=DB_HEADER_SIZE; FileSize=DB_HEADER_SIZE;
@ -806,7 +827,7 @@ if(CryptoAlgorithmus == ALGO_AES){
Rijndael aes; Rijndael aes;
// Initialize Rijndael/AES // Initialize Rijndael/AES
if(aes.init(Rijndael::CBC, Rijndael::Encrypt, FinalKey,Rijndael::Key32Bytes, EncryptionIV) != RIJNDAEL_SUCCESS){ if(aes.init(Rijndael::CBC, Rijndael::Encrypt, FinalKey,Rijndael::Key32Bytes, EncryptionIV) != RIJNDAEL_SUCCESS){
//TODO:ERR_MSG _ERROR
delete [] buffer; delete [] buffer;
return false;} return false;}
EncryptedPartSize = (unsigned long)aes.padEncrypt((Q_UINT8*)buffer+DB_HEADER_SIZE, EncryptedPartSize = (unsigned long)aes.padEncrypt((Q_UINT8*)buffer+DB_HEADER_SIZE,
@ -815,7 +836,7 @@ EncryptedPartSize = (unsigned long)aes.padEncrypt((Q_UINT8*)buffer+DB_HEADER_SIZ
}else if(CryptoAlgorithmus == ALGO_TWOFISH){ }else if(CryptoAlgorithmus == ALGO_TWOFISH){
CTwofish twofish; CTwofish twofish;
if(twofish.init(FinalKey, 32, EncryptionIV) == false){ if(twofish.init(FinalKey, 32, EncryptionIV) == false){
//TODO:ERR_MSG _ERROR
delete [] buffer; delete [] buffer;
return false;} return false;}
EncryptedPartSize = (unsigned long)twofish.padEncrypt((Q_UINT8*)buffer+DB_HEADER_SIZE, EncryptedPartSize = (unsigned long)twofish.padEncrypt((Q_UINT8*)buffer+DB_HEADER_SIZE,
@ -823,27 +844,20 @@ EncryptedPartSize = (unsigned long)twofish.padEncrypt((Q_UINT8*)buffer+DB_HEADER
(Q_UINT8*)buffer+DB_HEADER_SIZE); (Q_UINT8*)buffer+DB_HEADER_SIZE);
} }
if((EncryptedPartSize > 2147483446) || (EncryptedPartSize == 0)){ if((EncryptedPartSize > 2147483446) || (EncryptedPartSize == 0)){
//TODO:ERR_MSG _ERROR
delete [] buffer; delete [] buffer;
return false; return false;
} }
if(file.open(QIODevice::ReadWrite | QIODevice::Truncate)==false){ file->resize(0); //truncate
//TODO:ERR_MSG if(file->writeBlock(buffer,EncryptedPartSize+DB_HEADER_SIZE)!=EncryptedPartSize+DB_HEADER_SIZE){
delete [] buffer; delete [] buffer;
return false; return false;
} }
file->flush();
if(file.writeBlock(buffer,EncryptedPartSize+DB_HEADER_SIZE)!=EncryptedPartSize+DB_HEADER_SIZE){
//TODO:ERR_MSG
file.close();
delete [] buffer; delete [] buffer;
return false; //if(SearchGroupID!=-1)Groups.push_back(SearchGroup);
}
file.close();
delete [] buffer;
if(SearchGroupID!=-1)Groups.push_back(SearchGroup);
return true; return true;
} }
@ -990,6 +1004,7 @@ for(int i=0; i<64; i+=2){
return false;} return false;}
memcpy(dst+(i/2),&bin,1); memcpy(dst+(i/2),&bin,1);
} }
return true;
} }
void PwDatabase::moveGroup(CGroup* group, CGroup* DstGroup, int pos){ void PwDatabase::moveGroup(CGroup* group, CGroup* DstGroup, int pos){
@ -1026,7 +1041,7 @@ else{
NumParentSubGroups=Groups.size();} NumParentSubGroups=Groups.size();}
if(pos==-1)DstIndex+=(NumParentSubGroups+1); if(pos==-1)DstIndex+=(NumParentSubGroups+1);
else{ int n=0; //Counter for direct (first-level) childs else{ int n=0; //counter for direct (first-level) childs
for(i=0; i<NumParentSubGroups;i++){ for(i=0; i<NumParentSubGroups;i++){
if(n==pos)break; if(n==pos)break;
if(Groups[DstIndex+1+i].Level==DstGroup->Level+1)n++; if(Groups[DstIndex+1+i].Level==DstGroup->Level+1)n++;
@ -1311,7 +1326,7 @@ bool testDatabase(){
/* create a test database */ /* create a test database */
PwDatabase database; PwDatabase database;
kp_assert(results, database.CalcMasterKeyByPassword(dbPassword)); kp_assert(results, database.CalcMasterKeyByPassword(dbPassword));
database.filename = dbPath; database.file = new QFile(dbPath);
database.CryptoAlgorithmus = ALGO_TWOFISH; database.CryptoAlgorithmus = ALGO_TWOFISH;
CGroup* main = database.addGroup(NULL); CGroup* main = database.addGroup(NULL);
@ -1345,7 +1360,7 @@ bool testDatabase(){
PwDatabase cloneDatabase; PwDatabase cloneDatabase;
kp_assert(results, cloneDatabase.CalcMasterKeyByPassword(dbPassword)); kp_assert(results, cloneDatabase.CalcMasterKeyByPassword(dbPassword));
QString err; QString err;
bool loadedDB = cloneDatabase.loadDatabase(dbPath, err); bool loadedDB = cloneDatabase.openDatabase(dbPath, err);
if (!loadedDB){ if (!loadedDB){
kp_assert(results, loadedDB); kp_assert(results, loadedDB);
cout << err.ascii() << endl; cout << err.ascii() << endl;

@ -29,8 +29,6 @@
#define PWM_FLAG_ARCFOUR 4 #define PWM_FLAG_ARCFOUR 4
#define PWM_FLAG_TWOFISH 8 #define PWM_FLAG_TWOFISH 8
#define PWM_STD_KEYENCROUNDS 6000 #define PWM_STD_KEYENCROUNDS 6000
#define ALGO_AES 0
#define ALGO_TWOFISH 1
#include <qcolor.h> #include <qcolor.h>
#include <qobject.h> #include <qobject.h>
@ -47,9 +45,10 @@ class PwDatabase:QObject,public Database{
public: public:
PwDatabase(); PwDatabase();
~ PwDatabase(); ~ PwDatabase();
bool loadDatabase(QString filename, QString& err); bool openDatabase(QString filename, QString& err);
bool saveDatabase(); bool saveDatabase();
bool closeDatabase(); bool closeDatabase();
void newDatabase();
bool CalcMasterKeyByPassword(QString& password); bool CalcMasterKeyByPassword(QString& password);
bool CalcMasterKeyByFile(QString filename); bool CalcMasterKeyByFile(QString filename);
bool CalcMasterKeyByFileAndPw(QString filename, QString& password); bool CalcMasterKeyByFileAndPw(QString filename, QString& password);

@ -32,6 +32,24 @@ CAboutDialog::CAboutDialog(QWidget* parent, const char* name, bool modal, Qt::WF
setupUi(this); setupUi(this);
createBanner(Banner,Icon_Key32x32,tr("KeePassX %1").arg(KEEPASS_VERSION)); createBanner(Banner,Icon_Key32x32,tr("KeePassX %1").arg(KEEPASS_VERSION));
loadLicFromFile(); loadLicFromFile();
QString AboutTr=tr("<b>Current Translation: None</b><br><br>","Please replace 'None' with the language of your translation");
if(TrActive){
AboutTr+=tr("<b>Author:</b> %1<br>").arg(tr("$TRANSALTION_AUTHOR"));
QString mail=tr("$TRANSLATION_AUTHOR_EMAIL","Here you can enter your email or homepage if you want.");
if(mail!=QString()){
AboutTr+=mail+"<br>";
}
AboutTr+="<br>";
}
Edit_Translation->setText(AboutTr+tr("\
Information on how to translate KeePassX can be found under:\n\
http://keepass.berlios.de/translation-howto.html"));
QString ThanksTemplate=QString("<div style='margin-left:0px;'><b>%1</b></div><div style='margin-left:10px;'>%2</div><br><br>");
Edit_Thanks->setText(ThanksTemplate.arg(tr("Matthias Miller")).arg(tr("http://www.outofhanwell.com/<br>Mac OS X Support")));
//Edit_Thanks->setText(Edit_Thanks->text()+ThanksTemplate.arg(tr(" ")).arg(tr(" ")));
} }
CAboutDialog::~CAboutDialog() CAboutDialog::~CAboutDialog()

@ -24,6 +24,8 @@
#include <qspinbox.h> #include <qspinbox.h>
#include <qcolordialog.h> #include <qcolordialog.h>
#include <qlineedit.h> #include <qlineedit.h>
#include <QFileDialog>
#include <QDir>
#include "SettingsDlg.h" #include "SettingsDlg.h"
@ -37,6 +39,7 @@ connect(ButtonColor1, SIGNAL( clicked() ), this, SLOT( OnColor1() ) );
connect(ButtonColor2, SIGNAL( clicked() ), this, SLOT( OnColor2() ) ); connect(ButtonColor2, SIGNAL( clicked() ), this, SLOT( OnColor2() ) );
connect(ButtonTextColor, SIGNAL( clicked() ), this, SLOT( OnTextColor() ) ); 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(OnCeckBoxOpenLastChanged(int)));
connect(Button_MountDirBrowse,SIGNAL(clicked()),this,SLOT(OnMountDirBrowse()));
createBanner(Banner,Icon_Settings32x32,tr("Settings")); createBanner(Banner,Icon_Settings32x32,tr("Settings"));
CheckBox_OpenLast->setChecked(config.OpenLast); CheckBox_OpenLast->setChecked(config.OpenLast);
SpinBox_ClipboardTime->setValue(config.ClipboardTimeOut); SpinBox_ClipboardTime->setValue(config.ClipboardTimeOut);
@ -142,9 +145,9 @@ if(state==Qt::Checked){
} }
} }
void CSettingsDlg::OnMountDirBrowse(){
/*$SPECIALIZATION$*/ QString dir=QFileDialog::getExistingDirectory(this,tr("Select a directory..."),"/");
if(dir!=QString()){
Edit_MountDir->setText(dir);
//#include "settingsdlg.moc" }
}

@ -38,6 +38,7 @@ public slots:
virtual void OnColor2(); virtual void OnColor2();
virtual void OnColor1(); virtual void OnColor1();
void OnCeckBoxOpenLastChanged(int state); void OnCeckBoxOpenLastChanged(int state);
void OnMountDirBrowse();
private: private:
QColor color1,color2,textcolor; QColor color1,color2,textcolor;

@ -124,14 +124,14 @@
<widget class="QTextEdit" name="Edit_Thanks" > <widget class="QTextEdit" name="Edit_Thanks" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>0</x> <x>3</x>
<y>0</y> <y>3</y>
<width>401</width> <width>390</width>
<height>171</height> <height>166</height>
</rect> </rect>
</property> </property>
<property name="html" > <property name="readOnly" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string> <bool>true</bool>
</property> </property>
</widget> </widget>
</widget> </widget>
@ -142,12 +142,15 @@
<widget class="QTextEdit" name="Edit_Translation" > <widget class="QTextEdit" name="Edit_Translation" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>0</x> <x>3</x>
<y>0</y> <y>3</y>
<width>401</width> <width>390</width>
<height>171</height> <height>167</height>
</rect> </rect>
</property> </property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget> </widget>
</widget> </widget>
<widget class="QWidget" name="tab_3" > <widget class="QWidget" name="tab_3" >
@ -157,12 +160,15 @@
<widget class="QTextEdit" name="Edit_License" > <widget class="QTextEdit" name="Edit_License" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>0</x> <x>3</x>
<y>0</y> <y>3</y>
<width>401</width> <width>391</width>
<height>171</height> <height>167</height>
</rect> </rect>
</property> </property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget> </widget>
</widget> </widget>
</widget> </widget>

@ -104,6 +104,9 @@
<height>60</height> <height>60</height>
</size> </size>
</property> </property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -219,40 +222,6 @@
<addaction name="menuExtras" /> <addaction name="menuExtras" />
<addaction name="menuHilfe" /> <addaction name="menuHilfe" />
</widget> </widget>
<widget class="QToolBar" name="toolBar" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>15</width>
<height>6</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>22</height>
</size>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="iconSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<attribute name="toolBarArea" >
<number>4</number>
</attribute>
</widget>
<action name="FileNewAction" > <action name="FileNewAction" >
<property name="text" > <property name="text" >
<string>New Database...</string> <string>New Database...</string>

@ -72,7 +72,7 @@ for(int i=0;i<groups.length();i++){
NewEntry->Password.setString(pw,true); NewEntry->Password.setString(pw,true);
} }
} }
pwm->filename=""; pwm->file=NULL;
pwm->SearchGroupID=-1; pwm->SearchGroupID=-1;
pwm->CryptoAlgorithmus=ALGO_AES; pwm->CryptoAlgorithmus=ALGO_AES;
pwm->KeyEncRounds=6000; pwm->KeyEncRounds=6000;

@ -38,6 +38,7 @@ using namespace std;
CConfig config; CConfig config;
QString AppDir; QString AppDir;
bool TrActive;
QPixmap *Icon_Key32x32; QPixmap *Icon_Key32x32;
QPixmap *Icon_Settings32x32; QPixmap *Icon_Settings32x32;
QPixmap *Icon_Search32x32; QPixmap *Icon_Search32x32;
@ -62,6 +63,7 @@ QIcon *Icon_EditSearch;
QIcon *Icon_Configure; QIcon *Icon_Configure;
QIcon *Icon_Help; QIcon *Icon_Help;
inline void loadImages(); inline void loadImages();
inline void parseCmdLineArgs(int argc, char** argv,QString &ArgFile,QString& ArgCfg); inline void parseCmdLineArgs(int argc, char** argv,QString &ArgFile,QString& ArgCfg);
@ -107,6 +109,7 @@ if(TrFound)
else else
delete translator; delete translator;
TrActive=TrFound;
loadImages(); loadImages();
SecString::generateSessionKey(); SecString::generateSessionKey();
int r=0; int r=0;
@ -196,21 +199,10 @@ if(Img.load(AppDir+"/../share/keepass/icons/"+name)==false){
} }
#ifndef Q_WS_X11
#define _loadIcon(Icon,PATH)\
{QImage img(ThemeDir+PATH);\
Icon=new QIcon();\
/*Icon->addPixmap(QPixmap::fromImage(img));*/\
Icon->addPixmap(QPixmap::fromImage(img.scaled(16,16,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));\
}
#else
#define _loadIcon(Icon,PATH)\ #define _loadIcon(Icon,PATH)\
{QImage img(ThemeDir+PATH);\ Icon=new QIcon(ThemeDir+PATH);
Icon=new QIcon();\
Icon->addPixmap(QPixmap::fromImage(img));\
Icon->addPixmap(QPixmap::fromImage(img.scaled(16,16,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));\
}
#endif
void loadImages(){ void loadImages(){
@ -246,6 +238,7 @@ Icon_Search32x32=new QPixmap;
*Icon_Search32x32=tmpImg; *Icon_Search32x32=tmpImg;
//-------------------------- //--------------------------
_loadIcon(Icon_FileNew,"/actions/filenew.png"); _loadIcon(Icon_FileNew,"/actions/filenew.png");
_loadIcon(Icon_FileOpen,"/actions/fileopen.png"); _loadIcon(Icon_FileOpen,"/actions/fileopen.png");
_loadIcon(Icon_FileSave,"/actions/filesave.png"); _loadIcon(Icon_FileSave,"/actions/filesave.png");
@ -262,6 +255,7 @@ _loadIcon(Icon_EditOpenUrl,"/actions/run.png");
_loadIcon(Icon_EditSearch,"/actions/find.png"); _loadIcon(Icon_EditSearch,"/actions/find.png");
_loadIcon(Icon_Configure,"/actions/configure.png"); _loadIcon(Icon_Configure,"/actions/configure.png");
_loadIcon(Icon_Help,"/actions/help.png"); _loadIcon(Icon_Help,"/actions/help.png");
} }

@ -39,6 +39,7 @@ void showErrMsg(const QString& msg,QWidget* parent=NULL);
extern CConfig config; extern CConfig config;
extern QString AppDir; extern QString AppDir;
extern bool TrActive;
extern QPixmap *EntryIcons; extern QPixmap *EntryIcons;
extern QPixmap *Icon_Key32x32; extern QPixmap *Icon_Key32x32;
extern QPixmap *Icon_Settings32x32; extern QPixmap *Icon_Settings32x32;

@ -63,8 +63,6 @@ KeepassMainWindow::KeepassMainWindow(QWidget *parent, Qt::WFlags flags):QMainWin
setupUi(this); setupUi(this);
setGeometry(geometry().x(),geometry().y(),config.MainWinWidth,config.MainWinHeight); setGeometry(geometry().x(),geometry().y(),config.MainWinWidth,config.MainWinHeight);
splitter->setSizes(QList<int>() << config.MainWinSplit1 << config.MainWinSplit2); splitter->setSizes(QList<int>() << config.MainWinSplit1 << config.MainWinSplit2);
QuickSearchEdit=new QLineEdit(toolBar);
QuickSearchEdit->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
setupIcons(); setupIcons();
setupToolbar(); setupToolbar();
setStateFileOpen(false); setStateFileOpen(false);
@ -75,6 +73,7 @@ KeepassMainWindow::KeepassMainWindow(QWidget *parent, Qt::WFlags flags):QMainWin
statusBar()->addWidget(StatusBarGeneral,15); statusBar()->addWidget(StatusBarGeneral,15);
statusBar()->addWidget(StatusBarSelection,85); statusBar()->addWidget(StatusBarSelection,85);
statusBar()->setVisible(config.ShowStatusbar); statusBar()->setVisible(config.ShowStatusbar);
CGroup::UI_ExpandByDefault=config.ExpandGroupTree;
setupConnections(); setupConnections();
FileOpen=false; FileOpen=false;
Clipboard=QApplication::clipboard(); Clipboard=QApplication::clipboard();
@ -138,6 +137,8 @@ void KeepassMainWindow::setupConnections(){
connect(&ClipboardTimer, SIGNAL(timeout()), this, SLOT(OnClipboardTimeOut())); connect(&ClipboardTimer, SIGNAL(timeout()), this, SLOT(OnClipboardTimeOut()));
connect(GroupView,SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),this, connect(GroupView,SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),this,
SLOT(OnCurrentGroupChanged(QTreeWidgetItem*,QTreeWidgetItem*))); SLOT(OnCurrentGroupChanged(QTreeWidgetItem*,QTreeWidgetItem*)));
connect(GroupView,SIGNAL(itemExpanded(QTreeWidgetItem*)),this,SLOT(OnItemExpanded(QTreeWidgetItem*)));
connect(GroupView,SIGNAL(itemCollapsed(QTreeWidgetItem*)),this,SLOT(OnItemCollaped(QTreeWidgetItem*)));
connect(EntryView,SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this, connect(EntryView,SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this,
SLOT(OnEntryItemDoubleClicked(QTreeWidgetItem*,int))); SLOT(OnEntryItemDoubleClicked(QTreeWidgetItem*,int)));
connect(EntryView,SIGNAL(itemSelectionChanged()), this, SLOT(OnEntrySelectionChanged())); connect(EntryView,SIGNAL(itemSelectionChanged()), this, SLOT(OnEntrySelectionChanged()));
@ -148,6 +149,9 @@ void KeepassMainWindow::setupConnections(){
} }
void KeepassMainWindow::setupToolbar(){ void KeepassMainWindow::setupToolbar(){
toolBar=new QToolBar(this);
addToolBar(toolBar);
toolBar->setIconSize(QSize(16,16));
toolBar->addAction(FileNewAction); toolBar->addAction(FileNewAction);
toolBar->addAction(FileOpenAction); toolBar->addAction(FileOpenAction);
toolBar->addAction(FileSaveAction); toolBar->addAction(FileSaveAction);
@ -159,6 +163,8 @@ void KeepassMainWindow::setupToolbar(){
toolBar->addAction(EditPasswordToClipboardAction); toolBar->addAction(EditPasswordToClipboardAction);
toolBar->addAction(EditUsernameToClipboardAction); toolBar->addAction(EditUsernameToClipboardAction);
toolBar->addSeparator(); toolBar->addSeparator();
QuickSearchEdit=new QLineEdit(toolBar);
QuickSearchEdit->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
toolBar->addWidget(QuickSearchEdit); toolBar->addWidget(QuickSearchEdit);
} }
@ -261,7 +267,7 @@ if(PasswordDlg.password!="" && PasswordDlg.keyfile!="")
db->CalcMasterKeyByFileAndPw(PasswordDlg.keyfile,PasswordDlg.password); db->CalcMasterKeyByFileAndPw(PasswordDlg.keyfile,PasswordDlg.password);
QString err; QString err;
StatusBarGeneral->setText(tr("Loading Database...")); StatusBarGeneral->setText(tr("Loading Database..."));
if(db->loadDatabase(filename,err)==true){ if(db->openDatabase(filename,err)==true){
//SUCCESS //SUCCESS
if(config.OpenLast)config.LastFile=filename; if(config.OpenLast)config.LastFile=filename;
setCaption(tr("Keepass - %1").arg(filename)); setCaption(tr("Keepass - %1").arg(filename));
@ -274,7 +280,7 @@ else{
//ERROR //ERROR
delete db; delete db;
StatusBarGeneral->setText(tr("Loading Failed")); StatusBarGeneral->setText(tr("Loading Failed"));
if(err=="")err=tr("Unknown error in PwDatabase::loadDatabase()"); if(err=="")err=tr("Unknown error in PwDatabase::openDatabase()");
QMessageBox::critical(this,tr("Error") QMessageBox::critical(this,tr("Error")
,tr("The following error occured while opening the database:\n%1") ,tr("The following error occured while opening the database:\n%1")
.arg(err),tr("OK")); .arg(err),tr("OK"));
@ -315,6 +321,7 @@ CPasswordDialog dlg(this,"PasswordDlg",true,false,true);
dlg.setCaption("New Database"); dlg.setCaption("New Database");
db=new PwDatabase(); db=new PwDatabase();
if(dlg.exec()==1){ if(dlg.exec()==1){
db->newDatabase();
if(dlg.KeyType==BOTH || dlg.KeyType==KEYFILE){ if(dlg.KeyType==BOTH || dlg.KeyType==KEYFILE){
if(!db->createKeyFile(dlg.keyfile)){ if(!db->createKeyFile(dlg.keyfile)){
QMessageBox::warning(this,tr("Error"),tr("Could not create key file. The following error occured:\n%1").arg(db->getError()),tr("OK"),"","",0,0); QMessageBox::warning(this,tr("Error"),tr("Could not create key file. The following error occured:\n%1").arg(db->getError()),tr("OK"),"","",0,0);
@ -344,7 +351,7 @@ void KeepassMainWindow::OnFileOpen(){
if(FileOpen) if(FileOpen)
if(!closeDatabase())return; if(!closeDatabase())return;
QString filename=QFileDialog::getOpenFileName(this,tr("Open Database..."),QDir::homePath(),"*.kdb"); QString filename=QFileDialog::getOpenFileName(this,tr("Open Database..."),QDir::homePath(),"*.kdb");
if(filename!=QString::null){ if(filename!=QString()){
openDatabase(filename); openDatabase(filename);
} }
} }
@ -540,7 +547,7 @@ else Q_ASSERT(false);
} }
bool KeepassMainWindow::OnFileSave(){ bool KeepassMainWindow::OnFileSave(){
if(db->filename==QString()) if(db->file->fileName()==QString())
return OnFileSaveAs(); return OnFileSaveAs();
if(db->saveDatabase()) if(db->saveDatabase())
setStateFileModified(false); setStateFileModified(false);
@ -554,8 +561,11 @@ return true;
bool KeepassMainWindow::OnFileSaveAs(){ bool KeepassMainWindow::OnFileSaveAs(){
QString filename=QFileDialog::getSaveFileName(this,tr("Save Database As..."),QDir::homePath(),"*.kdb"); QString filename=QFileDialog::getSaveFileName(this,tr("Save Database As..."),QDir::homePath(),"*.kdb");
if(filename==QString()) return false; if(filename==QString()) return false;
db->filename=filename; Q_ASSERT(db->file);
setCaption(tr("KeePassX - %1").arg(db->filename)); if(db->file->isOpen()) db->file->close();
db->file->setFileName(filename);
setCaption(tr("KeePassX - %1").arg(filename));
return OnFileSave(); return OnFileSave();
} }
@ -566,7 +576,7 @@ if(dlg.exec())setStateFileModified(true);
void KeepassMainWindow::OnFileChangeKey(){ void KeepassMainWindow::OnFileChangeKey(){
CPasswordDialog dlg(this,"PasswordDlg",true,false,true); CPasswordDialog dlg(this,"PasswordDlg",true,false,true);
dlg.setCaption(db->filename); dlg.setCaption(db->file->fileName());
if(dlg.exec()==1){ if(dlg.exec()==1){
if(dlg.KeyType==BOTH || dlg.KeyType==KEYFILE){ if(dlg.KeyType==BOTH || dlg.KeyType==KEYFILE){
if(!db->createKeyFile(dlg.keyfile)){ if(!db->createKeyFile(dlg.keyfile)){
@ -810,10 +820,8 @@ for(int i=0; i<SearchResults.size();i++){
return; return;
} }
} }
} }
void KeepassMainWindow::OnEditUsernameToClipboard(){ void KeepassMainWindow::OnEditUsernameToClipboard(){
Clipboard->setText(currentEntry()->UserName, QClipboard::Clipboard); Clipboard->setText(currentEntry()->UserName, QClipboard::Clipboard);
ClipboardTimer.start(config.ClipboardTimeOut*1000,true); ClipboardTimer.start(config.ClipboardTimeOut*1000,true);
@ -932,6 +940,7 @@ void KeepassMainWindow::OnExtrasSettings(){
CSettingsDlg dlg(this,"SettingsDlg"); CSettingsDlg dlg(this,"SettingsDlg");
dlg.exec(); dlg.exec();
EntryView->setAlternatingRowColors(config.AlternatingRowColors); EntryView->setAlternatingRowColors(config.AlternatingRowColors);
CGroup::UI_ExpandByDefault=config.ExpandGroupTree;
} }
void KeepassMainWindow::OnHelpAbout(){ void KeepassMainWindow::OnHelpAbout(){
@ -948,3 +957,12 @@ void KeepassMainWindow::OnViewShowEntryDetails(bool show){
config.EntryDetails=show; config.EntryDetails=show;
DetailView->setVisible(config.EntryDetails); DetailView->setVisible(config.EntryDetails);
} }
void KeepassMainWindow::OnItemExpanded(QTreeWidgetItem* item){
((GroupViewItem*)item)->pGroup->UI_ItemIsExpanded=true;
}
void KeepassMainWindow::OnItemCollaped(QTreeWidgetItem* item){
((GroupViewItem*)item)->pGroup->UI_ItemIsExpanded=false;
}

@ -90,6 +90,8 @@ private slots:
void OnFileModified(); void OnFileModified();
void OnExtrasSettings(); void OnExtrasSettings();
void OnHelpAbout(); void OnHelpAbout();
void OnItemExpanded(QTreeWidgetItem*);
void OnItemCollaped(QTreeWidgetItem*);
private: private:
enum SelectionState{NONE,SINGLE,MULTIPLE,SEARCHGROUP}; enum SelectionState{NONE,SINGLE,MULTIPLE,SEARCHGROUP};
@ -118,6 +120,7 @@ private:
QLineEdit* QuickSearchEdit; QLineEdit* QuickSearchEdit;
QLabel* StatusBarGeneral; QLabel* StatusBarGeneral;
QLabel* StatusBarSelection; QLabel* StatusBarSelection;
QToolBar* toolBar;
protected: protected:
void closeEvent(QCloseEvent* event); void closeEvent(QCloseEvent* event);

@ -1,4 +1,11 @@
<!DOCTYPE TS><TS> <!DOCTYPE TS><TS>
<context>
<name></name>
<message>
<source>Could not open file (FileError=%1)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>AboutDlg</name> <name>AboutDlg</name>
<message> <message>
@ -31,7 +38,7 @@
</message> </message>
<message> <message>
<source>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation type="obsolete">&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<source>Translation</source> <source>Translation</source>
@ -74,62 +81,40 @@
<source>http://keepass.berlios.de/index.php</source> <source>http://keepass.berlios.de/index.php</source>
<translation>http://keepass.berlios.de/index.php</translation> <translation>http://keepass.berlios.de/index.php</translation>
</message> </message>
</context>
<context>
<name>CChangeKeyDlg</name>
<message>
<source>Change Master Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished">Fehler</translation>
</message>
<message>
<source>Please enter a password.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Please choose a key file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please select a key file or enter a password.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Overwrite?</source> <source>&lt;b&gt;Current Translation: None&lt;/b&gt;&lt;br&gt;&lt;br&gt;</source>
<translation type="unfinished"></translation> <comment>Please replace &apos;None&apos; with the language of your translation</comment>
<translation>&lt;b&gt;Aktuelle Übersetzung: Deutsch&lt;/b&gt;&lt;br&gt;&lt;br&gt;</translation>
</message> </message>
<message> <message>
<source>A file with this name already exists. <source>&lt;b&gt;Author:&lt;/b&gt; %1&lt;br&gt;</source>
Do you want to replace it?</source> <translation>&lt;b&gt;Autor:&lt;/b&gt; %1&lt;br&gt;</translation>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Could not open key file for writing.</source> <source>$TRANSALTION_AUTHOR</source>
<translation type="unfinished"></translation> <translation>Tarek Saidi</translation>
</message> </message>
<message> <message>
<source>Key file could not be written.</source> <source>$TRANSLATION_AUTHOR_EMAIL</source>
<translation type="unfinished"></translation> <comment>Here you can enter your email or homepage if you want.</comment>
<translation>tarek.saidi@arcor.de</translation>
</message> </message>
<message> <message>
<source>Password and password repetition are not equal. <source>Information on how to translate KeePassX can be found under:
Please check your input.</source> http://keepass.berlios.de/translation-howto.html</source>
<translation type="unfinished"></translation> <translation type="unfinished">Informationen wie Sie eine Übersetztung für KeePassX machen können finden Sie unter:
http://keepass.berlios.de/translation-howto.html</translation>
</message> </message>
</context>
<context>
<name>CChangeKeyDlg</name>
<message> <message>
<source>Open key file</source> <source>Error</source>
<translation type="unfinished"></translation> <translation type="obsolete">Fehler</translation>
</message> </message>
<message> <message>
<source>Choose Directory</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="obsolete">OK</translation>
</message> </message>
</context> </context>
<context> <context>
@ -266,28 +251,10 @@ Are you sure?</source>
</context> </context>
<context> <context>
<name>CPasswordDialog</name> <name>CPasswordDialog</name>
<message>
<source>No key file found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No key file could be found in the chosen directory.
Make sure that the volume is mounted correctly.
Please use the manual file selection for key files with a filename other than &apos;pwsafe.key&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>OK</source> <source>OK</source>
<translation type="unfinished">OK</translation> <translation type="unfinished">OK</translation>
</message> </message>
<message>
<source>Browse...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Open Key File</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Error</source> <source>Error</source>
<translation type="unfinished">Fehler</translation> <translation type="unfinished">Fehler</translation>
@ -305,100 +272,116 @@ Please use the manual file selection for key files with a filename other than &a
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Open Database</source> <source>Database Key</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Select File Manually...</source> <source>Select a Key File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>&lt; none &gt;</source> <source>*.key</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>CSearchDlg</name>
<message> <message>
<source>Notice</source> <source>Unexpected Error: File does not exist.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Please enter a search string.</source> <source>The selected key file or directory does not exist.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>OK</source> <source>The selected key file or directory is not readable
<translation type="unfinished">OK</translation> .Please check your permissions.</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Search</source> <source>The given directory does not contain any key files.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>CSettingsDlg</name>
<message> <message>
<source>Settings</source> <source>The given directory contains more then one key file.
Please specify the key file directly.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ChangeKeyDialog</name>
<message> <message>
<source>Change Master Key</source> <source>The key file found in the given directory is not readable.
Please check your permissions.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Key</source> <source>Key file could not be found.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Use password AND key file</source> <source>Key file is not readable.
Please check your permissions.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Key file or directory:</source> <source>Warning</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Password Repetition:</source> <source>Password an password repetition are not equal.
Please check your input.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Password:</source> <source>Please enter a password or select a key file.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>...</source> <source>A file with the name &apos;pwsafe.key&apos; already exisits in the given directory.
Do you want to replace it?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>&amp;Browse...</source> <source>Yes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Alt+B</source> <source>No</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Enter a Password and/or choose a key file.</source> <source>The exisiting file is not writable.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>&amp;Cancel</source> <source>A file with the this name already exisits.
Do you want to replace it?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>CSearchDlg</name>
<message> <message>
<source>Alt+C</source> <source>Notice</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>O&amp;K</source> <source>Please enter a search string.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Alt+K</source> <source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CSettingsDlg</name>
<message>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select a directory...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -673,6 +656,10 @@ Please use the manual file selection for key files with a filename other than &a
<source>Attachment</source> <source>Attachment</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>%1 items</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>KeepassGroupView</name> <name>KeepassGroupView</name>
@ -834,6 +821,35 @@ to save the changes?</source>
<source>Open Database...</source> <source>Open Database...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading Database...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Loading Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not create key file. The following error occured:
%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Export To...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>KeePassX [new]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error in Import_PwManager::importFile()()</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error in Import_KWalletXml::importFile()</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
@ -1029,6 +1045,18 @@ to save the changes?</source>
<source>Show Statusbar</source> <source>Show Statusbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Export to...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>KeePassX Handbook...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Plain Text (*.txt)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>PasswordDlg</name> <name>PasswordDlg</name>
@ -1076,6 +1104,14 @@ to save the changes?</source>
<source>Use Password AND Key File</source> <source>Use Password AND Key File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Exit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Password Repet.:</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>PwDatabase</name> <name>PwDatabase</name>
@ -1105,11 +1141,6 @@ to save the changes?</source>
</message> </message>
<message> <message>
<source>Decryption failed. <source>Decryption failed.
The key is wrong or the file is damaged</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hash test failed.
The key is wrong or the file is damaged</source> The key is wrong or the file is damaged</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1133,6 +1164,19 @@ The key is wrong or the file is damaged</source>
<source>Unexpected error: Offset is out of range. [E3]</source> <source>Unexpected error: Offset is out of range. [E3]</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Hash test failed.
The key is wrong or the file is damaged.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not open key file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Key file could not be written.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>
@ -1348,10 +1392,6 @@ Make sure you have write access to &apos;~/.keepass&apos;.</source>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Securi&amp;try</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Clear clipboard after:</source> <source>Clear clipboard after:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -1416,6 +1456,26 @@ Make sure you have write access to &apos;~/.keepass&apos;.</source>
<source>Browser Command:</source> <source>Browser Command:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Securi&amp;ty</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Alternating Row Colors</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Browse...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Media Directory:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remember last key type and location</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>SimplePasswordDialog</name> <name>SimplePasswordDialog</name>

@ -1,4 +1,11 @@
<!DOCTYPE TS><TS> <!DOCTYPE TS><TS>
<context>
<name></name>
<message>
<source>Could not open file (FileError=%1)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>AboutDlg</name> <name>AboutDlg</name>
<message> <message>
@ -29,10 +36,6 @@
<source>License</source> <source>License</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Translation</source> <source>Translation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -73,64 +76,33 @@
<source>http://keepass.berlios.de/index.php</source> <source>http://keepass.berlios.de/index.php</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>CChangeKeyDlg</name>
<message>
<source>Change Master Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please enter a password.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose a key file.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Please select a key file or enter a password.</source> <source>&lt;b&gt;Current Translation: None&lt;/b&gt;&lt;br&gt;&lt;br&gt;</source>
<comment>Please replace &apos;None&apos; with the language of your translation</comment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Overwrite?</source> <source>&lt;b&gt;Author:&lt;/b&gt; %1&lt;br&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>A file with this name already exists. <source>$TRANSALTION_AUTHOR</source>
Do you want to replace it?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Could not open key file for writing.</source> <source>$TRANSLATION_AUTHOR_EMAIL</source>
<comment>Here you can enter your email or homepage if you want.</comment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Key file could not be written.</source> <source>Information on how to translate KeePassX can be found under:
<translation type="unfinished"></translation> http://keepass.berlios.de/translation-howto.html</source>
</message>
<message>
<source>Password and password repetition are not equal.
Please check your input.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Open key file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose Directory</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>CChangeKeyDlg</name>
</context>
<context> <context>
<name>CDbSettingsDlg</name> <name>CDbSettingsDlg</name>
<message> <message>
@ -266,141 +238,142 @@ Are you sure?</source>
<context> <context>
<name>CPasswordDialog</name> <name>CPasswordDialog</name>
<message> <message>
<source>No key file found</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>No key file could be found in the chosen directory. <source>Error</source>
Make sure that the volume is mounted correctly.
Please use the manual file selection for key files with a filename other than &apos;pwsafe.key&apos;.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>OK</source> <source>Please enter a Password.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Browse...</source> <source>Please choose a key file.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Open Key File</source> <source>Please enter a Password or select a key file.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Error</source> <source>Database Key</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Please enter a Password.</source> <source>Select a Key File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Please choose a key file.</source> <source>*.key</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Please enter a Password or select a key file.</source> <source>Unexpected Error: File does not exist.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Open Database</source> <source>The selected key file or directory does not exist.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Select File Manually...</source> <source>The selected key file or directory is not readable
.Please check your permissions.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>&lt; none &gt;</source> <source>The given directory does not contain any key files.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>CSearchDlg</name>
<message> <message>
<source>Notice</source> <source>The given directory contains more then one key file.
Please specify the key file directly.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Please enter a search string.</source> <source>The key file found in the given directory is not readable.
Please check your permissions.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>OK</source> <source>Key file could not be found.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Search</source> <source>Key file is not readable.
<translation type="unfinished"></translation> Please check your permissions.</source>
</message>
</context>
<context>
<name>CSettingsDlg</name>
<message>
<source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>ChangeKeyDialog</name>
<message> <message>
<source>Change Master Key</source> <source>Warning</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Key</source> <source>Password an password repetition are not equal.
Please check your input.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Use password AND key file</source> <source>Please enter a password or select a key file.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Key file or directory:</source> <source>A file with the name &apos;pwsafe.key&apos; already exisits in the given directory.
Do you want to replace it?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Password Repetition:</source> <source>Yes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Password:</source> <source>No</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>...</source> <source>The exisiting file is not writable.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>&amp;Browse...</source> <source>A file with the this name already exisits.
Do you want to replace it?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>CSearchDlg</name>
<message> <message>
<source>Alt+B</source> <source>Notice</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Enter a Password and/or choose a key file.</source> <source>Please enter a search string.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>&amp;Cancel</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Alt+C</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context>
<context>
<name>CSettingsDlg</name>
<message> <message>
<source>O&amp;K</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Alt+K</source> <source>Select a directory...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>ChangeKeyDialog</name>
</context>
<context> <context>
<name>EditEntryDialog</name> <name>EditEntryDialog</name>
<message> <message>
@ -672,6 +645,10 @@ Please use the manual file selection for key files with a filename other than &a
<source>Attachment</source> <source>Attachment</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>%1 items</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>KeepassGroupView</name> <name>KeepassGroupView</name>
@ -833,6 +810,35 @@ to save the changes?</source>
<source>Open Database...</source> <source>Open Database...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Loading Database...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Loading Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not create key file. The following error occured:
%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Export To...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>KeePassX [new]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error in Import_PwManager::importFile()()</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error in Import_KWalletXml::importFile()</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
@ -1028,6 +1034,18 @@ to save the changes?</source>
<source>Show Statusbar</source> <source>Show Statusbar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Export to...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>KeePassX Handbook...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Plain Text (*.txt)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>PasswordDlg</name> <name>PasswordDlg</name>
@ -1075,6 +1093,14 @@ to save the changes?</source>
<source>Use Password AND Key File</source> <source>Use Password AND Key File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Exit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Password Repet.:</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>PwDatabase</name> <name>PwDatabase</name>
@ -1104,11 +1130,6 @@ to save the changes?</source>
</message> </message>
<message> <message>
<source>Decryption failed. <source>Decryption failed.
The key is wrong or the file is damaged</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hash test failed.
The key is wrong or the file is damaged</source> The key is wrong or the file is damaged</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1132,6 +1153,19 @@ The key is wrong or the file is damaged</source>
<source>Unexpected error: Offset is out of range. [E3]</source> <source>Unexpected error: Offset is out of range. [E3]</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Hash test failed.
The key is wrong or the file is damaged.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not open key file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Key file could not be written.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>
@ -1347,10 +1381,6 @@ Make sure you have write access to &apos;~/.keepass&apos;.</source>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Securi&amp;try</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Clear clipboard after:</source> <source>Clear clipboard after:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -1415,6 +1445,26 @@ Make sure you have write access to &apos;~/.keepass&apos;.</source>
<source>Browser Command:</source> <source>Browser Command:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Securi&amp;ty</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Alternating Row Colors</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Browse...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Media Directory:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remember last key type and location</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>SimplePasswordDialog</name> <name>SimplePasswordDialog</name>