AutoType: GUI connections,

Added French translation

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@71 b624d157-de02-0410-bad0-e51aec6abb33
master
tariq 19 years ago
parent 9e8f6a336a
commit 079f3c8ace
  1. BIN
      share/keepass/icons/nuvola/32x32/apps/ktouch.png
  2. 21
      src/lib/AutoType.cpp
  3. 6
      src/lib/AutoType.h
  4. 3
      src/main.cpp
  5. 1
      src/main.h
  6. 15
      src/mainwindow.cpp
  7. 1
      src/mainwindow.h
  8. 1
      src/src.pro
  9. 12
      src/translations/keepass-de_DE.ts
  10. 12
      src/translations/keepass-es_ES.ts
  11. 1648
      src/translations/keepass-fr_FR.ts
  12. 12
      src/translations/keepass-ru_RU.ts
  13. 12
      src/translations/keepass-xx_XX.ts

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -60,9 +60,24 @@ switch(mods){
}
void AutoType::perform(const QString& string){
QString str=string;
//replace all {..} string templates
void AutoType::perform(CEntry* entry, QString& err){
QString str;
int c=entry->Additional.count("Auto-Type:");
if(c>1){
err=tr("More than one 'Auto-Type:' key sequence found.\nAllowed is only one per entry.");
return;}
if(c==1){
int start=entry->Additional.indexOf("Auto-Type:")+10;
int len;
if(entry->Additional.size()==10)return;
for(len=0;len<entry->Additional.size();len++){
if(entry->Additional.size()==(start+len))break;
if(entry->Additional.at(start+len)==QChar('\n'))break;}
if(!len)return;
str=entry->Additional.mid(start,len);
}
else
str="{USERNAME}{TAB}{PASSWORD}{ENTER}";
QList<Q_UINT16> Keys;
for(int i=0;i<str.length();i++){

@ -21,6 +21,7 @@
#ifndef _AUTOTYPE_H_
#define _AUTOTYPE_H_
#include <QObject>
#include <QWidget>
#include <QString>
#ifdef Q_WS_X11
@ -30,16 +31,17 @@
#include <X11/keysymdef.h>
#include <X11/Xlib.h>
#endif
#include "Database.h"
typedef struct tKeysymMap{
Q_UINT16 keysym;
Q_UINT16 unicode;
};
class AutoType{
class AutoType:public QObject{
public:
static QWidget* MainWin;
static void perform(const QString& KeePassAutoTypeString);
static void perform(CEntry* entry,QString& errors);
private:
static tKeysymMap KeysymMap[];
static Q_UINT16 getKeysym(const QChar& unicode);

@ -72,7 +72,7 @@ QIcon *Icon_EditOpenUrl;
QIcon *Icon_EditSearch;
QIcon *Icon_Configure;
QIcon *Icon_Help;
QIcon *Icon_AutoType;
inline void loadImages();
inline void parseCmdLineArgs(int argc, char** argv,QString &ArgFile,QString& ArgCfg);
@ -280,6 +280,7 @@ _loadIcon(Icon_EditOpenUrl,"/actions/run.png");
_loadIcon(Icon_EditSearch,"/actions/find.png");
_loadIcon(Icon_Configure,"/actions/configure.png");
_loadIcon(Icon_Help,"/actions/help.png");
_loadIcon(Icon_AutoType,"/apps/ktouch.png");
}

@ -64,6 +64,7 @@ extern QIcon *Icon_EditOpenUrl;
extern QIcon *Icon_EditSearch;
extern QIcon *Icon_Configure;
extern QIcon *Icon_Help;
extern QIcon *Icon_AutoType;
#endif

@ -113,6 +113,7 @@ void KeepassMainWindow::setupConnections(){
connect(EditSaveAttachmentAction, SIGNAL(triggered()), this, SLOT(OnEditSaveAttachment()));
connect(EditSearchAction, SIGNAL(triggered()), this, SLOT(OnEditSearch()));
connect(EditGroupSearchAction, SIGNAL(triggered()), this, SLOT(OnEditGroupSearch()));
connect(EditAutoTypeAction,SIGNAL(triggered()),this,SLOT(OnEditAutoType()));
connect(ViewShowToolbarAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowToolbar(bool)));
connect(ViewShowEntryDetailsAction,SIGNAL(toggled(bool)),this,SLOT(OnViewShowEntryDetails(bool)));
@ -194,6 +195,7 @@ EditDeleteGroupAction->setIcon(*Icon_EditDelete);
EditSearchAction->setIcon(*Icon_EditSearch);
EditGroupSearchAction->setIcon(*Icon_EditSearch);
ExtrasSettingsAction->setIcon(*Icon_Configure);
EditAutoTypeAction->setIcon(*Icon_AutoType);
HelpHandbookAction->setIcon(*Icon_Help);
}
@ -211,6 +213,7 @@ void KeepassMainWindow::setupMenus(){
EntryView->ContextMenu->addAction(EditUsernameToClipboardAction);
EntryView->ContextMenu->addAction(EditOpenUrlAction);
EntryView->ContextMenu->addAction(EditSaveAttachmentAction);
EntryView->ContextMenu->addAction(EditAutoTypeAction);
EntryView->ContextMenu->addSeparator();
EntryView->ContextMenu->addAction(EditNewEntryAction);
EntryView->ContextMenu->addAction(EditEditEntryAction);
@ -245,6 +248,7 @@ void KeepassMainWindow::setupMenus(){
EditDeleteEntryAction->setShortcut(tr("Ctrl+D"));
EditCloneEntryAction->setShortcut(tr("Ctrl+K"));
EditSearchAction->setShortcut(tr("Ctrl+F"));
EditAutoTypeAction->setShortcut(tr("Ctrl+V"));
#ifdef Q_WS_MAC
FileCloseAction->setShortcut(tr("Ctrl+W"));
FileSaveAsAction->setShortcut(tr("Shift+Ctrl+S"));
@ -502,6 +506,7 @@ switch(EntrySelection){
EditCloneEntryAction->setText(tr("Clone Entry"));
EditDeleteEntryAction->setEnabled(false);
EditDeleteEntryAction->setText(tr("Delete Entry"));
EditAutoTypeAction->setEnabled(false);
break;
case SINGLE:
EditPasswordToClipboardAction->setEnabled(true);
@ -513,6 +518,7 @@ switch(EntrySelection){
EditCloneEntryAction->setText(tr("Clone Entry"));
EditDeleteEntryAction->setEnabled(true);
EditDeleteEntryAction->setText(tr("Delete Entry"));
EditAutoTypeAction->setEnabled(true);
break;
case MULTIPLE:
EditPasswordToClipboardAction->setEnabled(false);
@ -524,6 +530,7 @@ switch(EntrySelection){
EditCloneEntryAction->setText(tr("Clone Entries"));
EditDeleteEntryAction->setEnabled(true);
EditDeleteEntryAction->setText(tr("Delete Entries"));
EditAutoTypeAction->setEnabled(false);
break;
default: Q_ASSERT(false);
}
@ -539,6 +546,7 @@ switch(EntrySelection){
EditCloneEntryAction->setText(tr("Clone Entry"));
EditDeleteEntryAction->setEnabled(false);
EditDeleteEntryAction->setText(tr("Delete Entry"));
EditAutoTypeAction->setEnabled(false);
break;
case SINGLE:
EditPasswordToClipboardAction->setEnabled(true);
@ -550,6 +558,7 @@ switch(EntrySelection){
EditCloneEntryAction->setText(tr("Clone Entry"));
EditDeleteEntryAction->setEnabled(true);
EditDeleteEntryAction->setText(tr("Delete Entry"));
EditAutoTypeAction->setEnabled(true);
break;
case MULTIPLE:
EditPasswordToClipboardAction->setEnabled(false);
@ -561,6 +570,7 @@ switch(EntrySelection){
EditCloneEntryAction->setText(tr("Clone Entries"));
EditDeleteEntryAction->setEnabled(true);
EditDeleteEntryAction->setText(tr("Delete Entries"));
EditAutoTypeAction->setEnabled(false);
break;
default: Q_ASSERT(false);
}
@ -1003,3 +1013,8 @@ void KeepassMainWindow::OnItemCollaped(QTreeWidgetItem* item){
((GroupViewItem*)item)->pGroup->UI_ItemIsExpanded=false;
}
void KeepassMainWindow::OnEditAutoType(){
Q_ASSERT(EntryView->selectedItems().size()==1);
QString error;
AutoType::perform(((EntryViewItem*)(EntryView->selectedItems()[0]))->pEntry,error);
}

@ -80,6 +80,7 @@ private slots:
void OnEditOpenUrl();
void OnEditSearch();
void OnEditGroupSearch();
void OnEditAutoType();
void OnViewShowToolbar(bool);
void OnViewShowEntryDetails(bool);
void OnCurrentGroupChanged(QTreeWidgetItem*,QTreeWidgetItem*);

@ -36,6 +36,7 @@ FORMS += forms/EditGroupDlg.ui \
TRANSLATIONS += translations/keepass-de_DE.ts \
translations/keepass-ru_RU.ts \
translations/keepass-es_ES.ts \
translations/keepass-fr_FR.ts \
translations/keepass-xx_XX.ts
HEADERS += lib/IniReader.h \
lib/UrlLabel.h \

@ -45,6 +45,14 @@ General Public License (GPL) Version 2.</translation>
<translation>http://keepass.berlios.de/</translation>
</message>
</context>
<context>
<name>AutoType</name>
<message>
<source>More than one &apos;Auto-Type:&apos; key sequence found.
Allowed is only one per entry.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CAboutDialog</name>
<message>
@ -904,6 +912,10 @@ die Änderungen speichern?</translation>
<source>Unknown error in PwDatabase::openDatabase()</source>
<translation>Unbekannter Fehler in PwDatabase::openDatabase()</translation>
</message>
<message>
<source>Ctrl+V</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>

@ -43,6 +43,14 @@ General Public License (GPL) version 2.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AutoType</name>
<message>
<source>More than one &apos;Auto-Type:&apos; key sequence found.
Allowed is only one per entry.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CAboutDialog</name>
<message>
@ -899,6 +907,10 @@ to save the changes?</source>
<source>Unknown error in PwDatabase::openDatabase()</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+V</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>

File diff suppressed because it is too large Load Diff

@ -43,6 +43,14 @@ General Public License (GPL) version 2.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AutoType</name>
<message>
<source>More than one &apos;Auto-Type:&apos; key sequence found.
Allowed is only one per entry.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CAboutDialog</name>
<message>
@ -884,6 +892,10 @@ to save the changes?</source>
<source>Unknown error in PwDatabase::openDatabase()</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+V</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>

@ -43,6 +43,14 @@ General Public License (GPL) version 2.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AutoType</name>
<message>
<source>More than one &apos;Auto-Type:&apos; key sequence found.
Allowed is only one per entry.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CAboutDialog</name>
<message>
@ -884,6 +892,10 @@ to save the changes?</source>
<source>Unknown error in PwDatabase::openDatabase()</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ctrl+V</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>