applied patch #1626541,
added czech translation,
lupdate for all translations

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@122 b624d157-de02-0410-bad0-e51aec6abb33
master
tarek_saidi 18 years ago
parent 6a8c2114eb
commit 9ce6ff047b
  1. 32
      src/PwmConfig.cpp
  2. 3
      src/PwmConfig.h
  3. 10
      src/dialogs/EditEntryDlg.cpp
  4. 2
      src/dialogs/EditEntryDlg.h
  5. 6
      src/dialogs/PasswordDlg.cpp
  6. 2
      src/dialogs/PasswordDlg.h
  7. 4
      src/dialogs/SettingsDlg.cpp
  8. 13
      src/forms/EditEntryDlg.ui
  9. 53
      src/forms/SettingsDlg.ui
  10. 5
      src/lib/FileDialogs.cpp
  11. 21
      src/lib/FileDialogs.h
  12. 1
      src/src.pro
  13. 2613
      src/translations/keepass-cs_CS.ts

@ -35,7 +35,7 @@ using namespace std;
#endif #endif
#define CSTR(x)((const char*)x.toUtf8()) #define CSTR(x)((const char*)x.toUtf8())
#define QSTR(x)(QString::fromUtf8((x).c_str()))
bool CConfig::loadFromIni(QString filename){ bool CConfig::loadFromIni(QString filename){
QString defaultSearchOptions = "001101111"; QString defaultSearchOptions = "001101111";
@ -46,31 +46,32 @@ bool CConfig::loadFromIni(QString filename){
Toolbar=ini.GetValueB("UI","ShowToolbar",true); Toolbar=ini.GetValueB("UI","ShowToolbar",true);
EntryDetails=ini.GetValueB("UI","ShowEntryDetails",true); EntryDetails=ini.GetValueB("UI","ShowEntryDetails",true);
OpenLast=ini.GetValueB("Options","RememberLastFile",true); OpenLast=ini.GetValueB("Options","RememberLastFile",true);
LastFile=ini.GetValue("Options","LastFile","").c_str(); LastFile=QSTR(ini.GetValue("Options","LastFile",""));
ParseColumnString(ini.GetValue("UI","Columns","1111100000").c_str(),Columns); ParseColumnString(QSTR(ini.GetValue("UI","Columns","1111100000")),Columns);
BannerColor1=ParseColorString(ini.GetValue("Options","BannerColor1","0,85,127").c_str()); BannerColor1=ParseColorString(QSTR(ini.GetValue("Options","BannerColor1","0,85,127")));
BannerColor2=ParseColorString(ini.GetValue("Options","BannerColor2","0,117,175").c_str()); BannerColor2=ParseColorString(QSTR(ini.GetValue("Options","BannerColor2","0,117,175")));
BannerTextColor=ParseColorString(ini.GetValue("Options","BannerTextColor","222,222,222").c_str()); BannerTextColor=ParseColorString(QSTR(ini.GetValue("Options","BannerTextColor","222,222,222")));
ShowPasswords=ini.GetValueB("Options","ShowPasswords",false); ShowPasswords=ini.GetValueB("Options","ShowPasswords",false);
OpenUrlCommand=ini.GetValue("Options","UrlCmd","kfmclient openURL %1").c_str(); ShowPasswordsPasswordDlg=ini.GetValueB("Options","ShowPasswordsPasswordDlg",false);
Language=ini.GetValue("Options","LangFile","").c_str(); OpenUrlCommand=QSTR(ini.GetValue("Options","UrlCmd","kfmclient openURL %1"));
ParseBoolString(ini.GetValue("Options","SearchOptions",(const char*)defaultSearchOptions.toUtf8()).c_str(),defaultSearchOptions,SearchOptions,9); Language=QSTR(ini.GetValue("Options","LangFile",""));
ParseBoolString(QSTR(ini.GetValue("Options","SearchOptions",(const char*)defaultSearchOptions.toUtf8())),defaultSearchOptions,SearchOptions,9);
ListView_HidePasswords=ini.GetValueB("UI","HidePasswords",true); ListView_HidePasswords=ini.GetValueB("UI","HidePasswords",true);
ListView_HideUsernames=ini.GetValueB("UI","HideUsernames",false); ListView_HideUsernames=ini.GetValueB("UI","HideUsernames",false);
ParseBoolString(ini.GetValue("Options","PwGenOptions",(const char*)defaultPwGenOptions.toUtf8()).c_str(),defaultPwGenOptions,PwGenOptions,10); ParseBoolString(QSTR(ini.GetValue("Options","PwGenOptions",(const char*)defaultPwGenOptions.toUtf8())),defaultPwGenOptions,PwGenOptions,10);
PwGenLength=ini.GetValueI("Options","PwGenLength",25); PwGenLength=ini.GetValueI("Options","PwGenLength",25);
PwGenCharList=ini.GetValue("Options","PwGenCharList","").c_str(); PwGenCharList=QSTR(ini.GetValue("Options","PwGenCharList",""));
ExpandGroupTree=ini.GetValueB("Options","ExpandGroupTree",true); ExpandGroupTree=ini.GetValueB("Options","ExpandGroupTree",true);
MainWinHeight=ini.GetValueI("UI","MainWinHeight",550); MainWinHeight=ini.GetValueI("UI","MainWinHeight",550);
MainWinWidth=ini.GetValueI("UI","MainWinWidth",900); MainWinWidth=ini.GetValueI("UI","MainWinWidth",900);
MainWinSplit1=ini.GetValueI("UI","MainWinSplit1",100); MainWinSplit1=ini.GetValueI("UI","MainWinSplit1",100);
MainWinSplit2=ini.GetValueI("UI","MainWinSplit2",300); MainWinSplit2=ini.GetValueI("UI","MainWinSplit2",300);
ParseIntString(ini.GetValue("UI","ColumnSizes","15,10,10,10,10,10,10,10,10,10").c_str(),ColumnSizes,10); ParseIntString(QSTR(ini.GetValue("UI","ColumnSizes","15,10,10,10,10,10,10,10,10,10")),ColumnSizes,10);
ShowStatusbar=ini.GetValueB("UI","ShowStatusbar",true); ShowStatusbar=ini.GetValueB("UI","ShowStatusbar",true);
AlternatingRowColors=ini.GetValueB("Options","AlternatingRowColors",true); AlternatingRowColors=ini.GetValueB("Options","AlternatingRowColors",true);
MountDir=ini.GetValue("Options","MountDir",DEFAULT_MOUNT_DIR).c_str(); MountDir=QSTR(ini.GetValue("Options","MountDir",DEFAULT_MOUNT_DIR));
RememberLastKey=ini.GetValueB("Options","RememberLastKey",true); RememberLastKey=ini.GetValueB("Options","RememberLastKey",true);
LastKeyLocation=ini.GetValue("Options","LastKeyLocation","").c_str(); LastKeyLocation=QSTR(ini.GetValue("Options","LastKeyLocation",""));
LastKeyType=(tKeyType)ini.GetValueI("Options","LastKeyType",(int)PASSWORD); LastKeyType=(tKeyType)ini.GetValueI("Options","LastKeyType",(int)PASSWORD);
if(!OpenLast)RememberLastKey=false; if(!OpenLast)RememberLastKey=false;
ToolbarIconSize=ini.GetValueI("UI","ToolbarIconSize",16); ToolbarIconSize=ini.GetValueI("UI","ToolbarIconSize",16);
@ -79,7 +80,7 @@ bool CConfig::loadFromIni(QString filename){
SaveFileDlgHistory=ini.GetValueB("Options","SaveFileDlgHistory",true); SaveFileDlgHistory=ini.GetValueB("Options","SaveFileDlgHistory",true);
EnableBookmarkMenu=ini.GetValueB("Options","EnableBookmarkMenu",true); EnableBookmarkMenu=ini.GetValueB("Options","EnableBookmarkMenu",true);
GroupTreeRestore=ini.GetValueI("Options","GroupTreeRestore",1); GroupTreeRestore=ini.GetValueI("Options","GroupTreeRestore",1);
QString IntegrPluginVal=ini.GetValue("Options","IntegrPlugin","None").c_str(); QString IntegrPluginVal=QSTR(ini.GetValue("Options","IntegrPlugin","None"));
if(IntegrPluginVal=="None") if(IntegrPluginVal=="None")
IntegrPlugin=NONE; IntegrPlugin=NONE;
else if(IntegrPluginVal=="Gnome") else if(IntegrPluginVal=="Gnome")
@ -104,6 +105,7 @@ bool CConfig::saveToIni(QString filename){
ini.SetValue("Options","BannerColor2",(const char*)CreateColorString(BannerColor2).toUtf8(),true); ini.SetValue("Options","BannerColor2",(const char*)CreateColorString(BannerColor2).toUtf8(),true);
ini.SetValue("Options","BannerTextColor",(const char*)CreateColorString(BannerTextColor).toUtf8(),true); ini.SetValue("Options","BannerTextColor",(const char*)CreateColorString(BannerTextColor).toUtf8(),true);
ini.SetValueB("Options","ShowPasswords",ShowPasswords,true); ini.SetValueB("Options","ShowPasswords",ShowPasswords,true);
ini.SetValueB("Options","ShowPasswordsPasswordDlg",ShowPasswordsPasswordDlg,true);
ini.SetValue("Options","UrlCmd",(const char*)OpenUrlCommand.toUtf8(),true); ini.SetValue("Options","UrlCmd",(const char*)OpenUrlCommand.toUtf8(),true);
ini.SetValue("Options","LangFile",(const char*)Language.toUtf8(),true); ini.SetValue("Options","LangFile",(const char*)Language.toUtf8(),true);
ini.SetValue("Options","SearchOptions",(const char*)CreateBoolString(SearchOptions,9).toUtf8(),true); ini.SetValue("Options","SearchOptions",(const char*)CreateBoolString(SearchOptions,9).toUtf8(),true);

@ -46,6 +46,7 @@ class CConfig{
bool PwGenOptions[10]; bool PwGenOptions[10];
bool Columns[10]; bool Columns[10];
bool ShowPasswords; bool ShowPasswords;
bool ShowPasswordsPasswordDlg;
bool ExpandGroupTree; bool ExpandGroupTree;
bool EnableKdePlugin; bool EnableKdePlugin;
bool ShowStatusbar; bool ShowStatusbar;
@ -82,4 +83,4 @@ class CConfig{
QString CreateIntString(int* src, int count); QString CreateIntString(int* src, int count);
}; };
#endif #endif

@ -36,6 +36,7 @@
#include <qmessagebox.h> #include <qmessagebox.h>
#include <qtoolbutton.h> #include <qtoolbutton.h>
#include <QShowEvent> #include <QShowEvent>
#include <QResizeEvent>
#include "SelectIconDlg.h" #include "SelectIconDlg.h"
#include "PasswordGenDlg.h" #include "PasswordGenDlg.h"
@ -51,7 +52,9 @@ CEditEntryDlg::CEditEntryDlg(IDatabase* _db, IEntryHandle* _entry,QWidget* paren
entry=_entry; entry=_entry;
db=_db; db=_db;
setupUi(this); setupUi(this);
//not sure if this createBanner is still needed
createBanner(&BannerPixmap,Icon_Key32x32,tr("Edit Entry"),width()); createBanner(&BannerPixmap,Icon_Key32x32,tr("Edit Entry"),width());
//end
ModFlag=false; ModFlag=false;
connect(Edit_Password_w, SIGNAL(editingFinished()), this, SLOT(OnPasswordwLostFocus())); connect(Edit_Password_w, SIGNAL(editingFinished()), this, SLOT(OnPasswordwLostFocus()));
connect(Edit_Password_w, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordwTextChanged(const QString&))); connect(Edit_Password_w, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordwTextChanged(const QString&)));
@ -133,6 +136,13 @@ if(event->spontaneous()==false){
} }
} }
//Added resize event
void CEditEntryDlg::resizeEvent(QResizeEvent *event){
createBanner(&BannerPixmap,Icon_Key32x32,tr("Test 2"),width());
}
void CEditEntryDlg::paintEvent(QPaintEvent *event){ void CEditEntryDlg::paintEvent(QPaintEvent *event){
QDialog::paintEvent(event); QDialog::paintEvent(event);
QPainter painter(this); QPainter painter(this);

@ -60,6 +60,8 @@ class CEditEntryDlg : public QDialog, public Ui_EditEntryDialog
private: private:
virtual void showEvent(QShowEvent *); virtual void showEvent(QShowEvent *);
virtual void paintEvent(QPaintEvent*); virtual void paintEvent(QPaintEvent*);
// Added resizeEvent
virtual void resizeEvent(QResizeEvent *);

@ -65,7 +65,7 @@ CPasswordDialog::CPasswordDialog(QWidget* parent,IDatabase* DB,bool ShowExitButt
connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) ); connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
connect( Edit_Password, SIGNAL( textChanged(const QString&) ), this, SLOT( OnPasswordChanged(const QString&) ) ); connect( Edit_Password, SIGNAL( textChanged(const QString&) ), this, SLOT( OnPasswordChanged(const QString&) ) );
connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBox_BothChanged(int) ) ); connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBox_BothChanged(int) ) );
connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoMode() ) ); connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoModeDatabaseKey() ) );
connect( Edit_Password, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) ); connect( Edit_Password, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) );
connect( Edit_PasswordRep, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) ); connect( Edit_PasswordRep, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) );
connect( ButtonExit, SIGNAL( clicked()),this,SLOT(OnButtonExit())); connect( ButtonExit, SIGNAL( clicked()),this,SLOT(OnButtonExit()));
@ -82,7 +82,7 @@ CPasswordDialog::CPasswordDialog(QWidget* parent,IDatabase* DB,bool ShowExitButt
connect( ButtonBrowse, SIGNAL( clicked() ), this, SLOT( OnButtonBrowse_Set() ) ); connect( ButtonBrowse, SIGNAL( clicked() ), this, SLOT( OnButtonBrowse_Set() ) );
} }
if(!config.ShowPasswords)ChangeEchoMode(); if(!config.ShowPasswordsPasswordDlg)ChangeEchoModeDatabaseKey();
} }
@ -322,7 +322,7 @@ if(state==Qt::Unchecked){
} }
void CPasswordDialog::ChangeEchoMode(){ void CPasswordDialog::ChangeEchoModeDatabaseKey(){
if(Edit_Password->echoMode()==QLineEdit::Normal){ if(Edit_Password->echoMode()==QLineEdit::Normal){
Edit_Password->setEchoMode(QLineEdit::Password); Edit_Password->setEchoMode(QLineEdit::Password);
Edit_PasswordRep->setEchoMode(QLineEdit::Password);} Edit_PasswordRep->setEchoMode(QLineEdit::Password);}

@ -53,7 +53,7 @@ class CPasswordDialog : public QDialog, public Ui_PasswordDlg
void OnButtonExit(); void OnButtonExit();
void OnPasswordChanged(const QString &txt); void OnPasswordChanged(const QString &txt);
void OnCheckBox_BothChanged(int state); void OnCheckBox_BothChanged(int state);
void ChangeEchoMode(); void ChangeEchoModeDatabaseKey();
void OnComboTextChanged(const QString&); void OnComboTextChanged(const QString&);
}; };

@ -74,6 +74,7 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog)
color2=config.BannerColor2; color2=config.BannerColor2;
textcolor=config.BannerTextColor; textcolor=config.BannerTextColor;
CheckBox_ShowPasswords->setChecked(config.ShowPasswords); CheckBox_ShowPasswords->setChecked(config.ShowPasswords);
CheckBox_ShowPasswords_PasswordDlg->setChecked(config.ShowPasswordsPasswordDlg);
checkBox_ShowSysTrayIcon->setChecked(config.ShowSysTrayIcon); checkBox_ShowSysTrayIcon->setChecked(config.ShowSysTrayIcon);
checkBox_MinimizeToTray->setChecked(config.MinimizeToTray); checkBox_MinimizeToTray->setChecked(config.MinimizeToTray);
checkBox_SaveFileDlgHistory->setChecked(config.SaveFileDlgHistory); checkBox_SaveFileDlgHistory->setChecked(config.SaveFileDlgHistory);
@ -146,6 +147,7 @@ void CSettingsDlg::apply(){
config.BannerColor2=color2; config.BannerColor2=color2;
config.BannerTextColor=textcolor; config.BannerTextColor=textcolor;
config.ShowPasswords=CheckBox_ShowPasswords->isChecked(); config.ShowPasswords=CheckBox_ShowPasswords->isChecked();
config.ShowPasswordsPasswordDlg=CheckBox_ShowPasswords_PasswordDlg->isChecked();
config.OpenUrlCommand=Edit_BrowserCmd->text(); config.OpenUrlCommand=Edit_BrowserCmd->text();
config.AlternatingRowColors=CheckBox_AlternatingRowColors->isChecked(); config.AlternatingRowColors=CheckBox_AlternatingRowColors->isChecked();
config.MountDir=Edit_MountDir->text(); config.MountDir=Edit_MountDir->text();
@ -234,4 +236,4 @@ void CSettingsDlg::OnIntPluginGnome(bool toggled){
void CSettingsDlg::OnIntPluginKde(bool toggled){ void CSettingsDlg::OnIntPluginKde(bool toggled){
Label_IntPlugin_Info->show(); Label_IntPlugin_Info->show();
} }

@ -14,8 +14,8 @@
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy> <sizepolicy>
<hsizetype>0</hsizetype> <hsizetype>5</hsizetype>
<vsizetype>0</vsizetype> <vsizetype>5</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -28,13 +28,16 @@
</property> </property>
<property name="maximumSize" > <property name="maximumSize" >
<size> <size>
<width>500</width> <width>16777215</width>
<height>526</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
<string>Edit Entry</string> <string>Edit Entry</string>
</property> </property>
<property name="sizeGripEnabled" >
<bool>true</bool>
</property>
<property name="modal" > <property name="modal" >
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -51,7 +54,7 @@
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType" >
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>

@ -62,7 +62,7 @@
<enum>QTabWidget::Rounded</enum> <enum>QTabWidget::Rounded</enum>
</property> </property>
<property name="currentIndex" > <property name="currentIndex" >
<number>4</number> <number>3</number>
</property> </property>
<widget class="QWidget" name="tab" > <widget class="QWidget" name="tab" >
<attribute name="title" > <attribute name="title" >
@ -198,16 +198,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QCheckBox" name="CheckBox_ShowPasswords" >
<property name="text" >
<string>Sh&amp;ow passwords in plain text by default</string>
</property>
<property name="shortcut" >
<string>Alt+O</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="checkBox_EnableBookmarkMenu" > <widget class="QCheckBox" name="checkBox_EnableBookmarkMenu" >
<property name="text" > <property name="text" >
@ -685,6 +675,46 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Show passwords in plain text in:</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="CheckBox_ShowPasswords" >
<property name="text" >
<string>Edit Entry Dialog</string>
</property>
<property name="shortcut" >
<string>Alt+O</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="CheckBox_ShowPasswords_PasswordDlg" >
<property name="text" >
<string>Key Dialogs</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
@ -917,7 +947,6 @@
<layoutdefault spacing="6" margin="11" /> <layoutdefault spacing="6" margin="11" />
<tabstops> <tabstops>
<tabstop>tabWidget4</tabstop> <tabstop>tabWidget4</tabstop>
<tabstop>CheckBox_ShowPasswords</tabstop>
<tabstop>ButtonColor1</tabstop> <tabstop>ButtonColor1</tabstop>
<tabstop>ButtonTextColor</tabstop> <tabstop>ButtonTextColor</tabstop>
<tabstop>ButtonColor2</tabstop> <tabstop>ButtonColor2</tabstop>

@ -52,9 +52,6 @@ QString KpxFileDialogs::saveFile(QWidget* Parent, const QString& Name, const QSt
} }
QString QtStandardFileDialogs::openExistingFileDialog(QWidget* parent,QString title,QString dir,QStringList Filters){ QString QtStandardFileDialogs::openExistingFileDialog(QWidget* parent,QString title,QString dir,QStringList Filters){
QFileDialog FileDlg(parent,title,dir); QFileDialog FileDlg(parent,title,dir);
FileDlg.setFilters(Filters); FileDlg.setFilters(Filters);
@ -81,3 +78,5 @@ QString QtStandardFileDialogs::saveFileDialog(QWidget* parent,QString title,QStr
if(!FileDlg.exec())return QString(); if(!FileDlg.exec())return QString();
return FileDlg.selectedFiles()[0]; return FileDlg.selectedFiles()[0];
} }

@ -22,8 +22,29 @@
#include <QObject> #include <QObject>
#include <QFileDialog> #include <QFileDialog>
#include <QList>
#include "plugins/interfaces/IFileDialog.h" #include "plugins/interfaces/IFileDialog.h"
/*
class FileDlgHistory{
class HistoryEntry{
public:
QString DlgId;
QString Dir;
int Filter;
QString toString();
void fromString(const QString& str);
};
public:
void set(const QString& DlgId,const QString& Dir,int Filter);
int getFilter(const QString& DlgId);
QString getDir(const QString& DlgId);
void clear();
private:
QList
};
*/
class KpxFileDialogs{ class KpxFileDialogs{
public: public:
static void setPlugin(IFileDialog* FileDlgPlugin); static void setPlugin(IFileDialog* FileDlgPlugin);

@ -47,6 +47,7 @@ TRANSLATIONS += translations/keepass-de_DE.ts \
translations/keepass-ru_RU.ts \ translations/keepass-ru_RU.ts \
translations/keepass-es_ES.ts \ translations/keepass-es_ES.ts \
translations/keepass-fr_FR.ts \ translations/keepass-fr_FR.ts \
translations/keepass-cs_CS.ts \
translations/keepass-xx_XX.ts translations/keepass-xx_XX.ts
HEADERS += lib/IniReader.h \ HEADERS += lib/IniReader.h \
lib/UrlLabel.h \ lib/UrlLabel.h \

File diff suppressed because it is too large Load Diff