From c4ad3750fbe7035d3720d6d0fb38fc81dbc5d1e4 Mon Sep 17 00:00:00 2001 From: nils Date: Wed, 5 May 2010 07:07:21 +0000 Subject: changed QList to QStringList and reverted gpg4usb.pro (no static building) and added spanish translation files git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@312 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- attachments.cpp | 2 +- context.cpp | 6 +- context.h | 6 +- gpg4usb.pro | 3 +- gpgwin.cpp | 2 +- keylist.cpp | 8 +- keylist.h | 4 +- keymgmt.cpp | 2 +- keymgmt.h | 2 +- release/ts/gpg4usb_es.qm | 1 + release/ts/gpg4usb_es.ts | 879 +++++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 898 insertions(+), 17 deletions(-) create mode 100644 release/ts/gpg4usb_es.qm create mode 100644 release/ts/gpg4usb_es.ts diff --git a/attachments.cpp b/attachments.cpp index 57ca8b9..09c76be 100644 --- a/attachments.cpp +++ b/attachments.cpp @@ -95,7 +95,7 @@ void Attachments::encryptFile() foreach(QString inFilename, *(getSelected())) { QByteArray *outBuffer = new QByteArray(); - QList *uidList = m_keyList->getChecked(); + QStringList *uidList = m_keyList->getChecked(); QFile infile; infile.setFileName(inFilename); diff --git a/context.cpp b/context.cpp index 9cf06a9..a737b11 100644 --- a/context.cpp +++ b/context.cpp @@ -125,7 +125,7 @@ void Context::generateKey(QString *params) /** Export Key to QByteArray * */ -bool Context::exportKeys(QList *uidList, QByteArray *outBuffer) +bool Context::exportKeys(QStringList *uidList, QByteArray *outBuffer) { size_t read_bytes; gpgme_data_t out = 0; @@ -218,7 +218,7 @@ GpgKeyList Context::listKeys() /** Delete keys */ -void Context::deleteKeys(QList *uidList) +void Context::deleteKeys(QStringList *uidList) { QString tmp; @@ -236,7 +236,7 @@ void Context::deleteKeys(QList *uidList) /** Encrypt inBuffer for reciepients-uids, write * result to outBuffer */ -bool Context::encrypt(QList *uidList, const QByteArray &inBuffer, QByteArray *outBuffer) +bool Context::encrypt(QStringList *uidList, const QByteArray &inBuffer, QByteArray *outBuffer) { gpgme_data_t in = 0, out = 0; diff --git a/context.h b/context.h index 7cc4439..35f3aad 100644 --- a/context.h +++ b/context.h @@ -60,11 +60,11 @@ public: ~Context(); // Destructor void importKey(QByteArray inBuffer); - bool exportKeys(QList *uidList, QByteArray *outBuffer); + bool exportKeys(QStringList *uidList, QByteArray *outBuffer); void generateKey(QString *params); GpgKeyList listKeys(); - void deleteKeys(QList *uidList); - bool encrypt(QList *uidList, const QByteArray &inBuffer, + void deleteKeys(QStringList *uidList); + bool encrypt(QStringList *uidList, const QByteArray &inBuffer, QByteArray *outBuffer); bool decrypt(const QByteArray &inBuffer, QByteArray *outBuffer); void clearCache(); diff --git a/gpg4usb.pro b/gpg4usb.pro index 87589b1..27c7b48 100644 --- a/gpg4usb.pro +++ b/gpg4usb.pro @@ -16,7 +16,7 @@ HEADERS += context.h gpgwin.h keylist.h keymgmt.h fileencryptiondialog.h keygent SOURCES += context.cpp gpgwin.cpp main.cpp keylist.cpp keymgmt.cpp fileencryptiondialog.cpp keygenthread.cpp keydetailsdialog.cpp settingsdialog.cpp RC_FILE = gpg4usb.rc # comment out line below for static building -# LIBS += -lgpgme -lgpg-error +LIBS += -lgpgme -lgpg-error DEFINES += _FILE_OFFSET_BITS=64 TRANSLATIONS = release/ts/gpg4usb_en.ts \ @@ -24,3 +24,4 @@ TRANSLATIONS = release/ts/gpg4usb_en.ts \ release/ts/gpg4usb_ru.ts \ release/ts/gpg4usb_fr.ts \ release/ts/gpg4usb_pt_BR.ts \ + release/ts/gpg4usb_es.ts \ diff --git a/gpgwin.cpp b/gpgwin.cpp index 8210f28..ddb2f44 100644 --- a/gpgwin.cpp +++ b/gpgwin.cpp @@ -444,7 +444,7 @@ void GpgWin::about() void GpgWin::encrypt() { - QList *uidList = mKeyList->getChecked(); + QStringList *uidList = mKeyList->getChecked(); QByteArray *tmp = new QByteArray(); if (mCtx->encrypt(uidList, edit->toPlainText().toUtf8(), tmp)) { diff --git a/keylist.cpp b/keylist.cpp index be9aa7a..76e9291 100644 --- a/keylist.cpp +++ b/keylist.cpp @@ -97,9 +97,9 @@ void KeyList::refresh() } -QList *KeyList::getChecked() +QStringList *KeyList::getChecked() { - QList *ret = new QList(); + QStringList *ret = new QStringList(); for (int i = 0; i < mKeyList->rowCount(); i++) { if (mKeyList->item(i, 0)->checkState() == Qt::Checked) { *ret << mKeyList->item(i, 4)->text(); @@ -108,9 +108,9 @@ QList *KeyList::getChecked() return ret; } -QList *KeyList::getSelected() +QStringList *KeyList::getSelected() { - QList *ret = new QList(); + QStringList *ret = new QStringList(); for (int i = 0; i < mKeyList->rowCount(); i++) { if (mKeyList->item(i, 0)->isSelected() == 1) { diff --git a/keylist.h b/keylist.h index ff039b5..f5034d4 100644 --- a/keylist.h +++ b/keylist.h @@ -43,8 +43,8 @@ public: void addMenuAction(QAction *act); KeyList(GpgME::Context *ctx, QString iconpath, QWidget *parent = 0); - QList *getChecked(); - QList *getSelected(); + QStringList *getChecked(); + QStringList *getSelected(); public slots: void refresh(); diff --git a/keymgmt.cpp b/keymgmt.cpp index a7b7b21..ed59914 100755 --- a/keymgmt.cpp +++ b/keymgmt.cpp @@ -174,7 +174,7 @@ void KeyMgmt::deleteCheckedKeys() deleteKeysWithWarning(mKeyList->getSelected()); } -void KeyMgmt::deleteKeysWithWarning(QList *uidList) { +void KeyMgmt::deleteKeysWithWarning(QStringList *uidList) { /** * TODO: Different Messages for private/public key, check if diff --git a/keymgmt.h b/keymgmt.h index a99562c..a12b5b5 100755 --- a/keymgmt.h +++ b/keymgmt.h @@ -69,7 +69,7 @@ private: void createActions(); void createToolBars(); int checkPassWordStrength(); - void deleteKeysWithWarning(QList *uidList); + void deleteKeysWithWarning(QStringList *uidList); KeyList *mKeyList; QString mIconPath; diff --git a/release/ts/gpg4usb_es.qm b/release/ts/gpg4usb_es.qm new file mode 100644 index 0000000..be651ee --- /dev/null +++ b/release/ts/gpg4usb_es.qm @@ -0,0 +1 @@ +<¸dÊÍ!¿`¡½Ý \ No newline at end of file diff --git a/release/ts/gpg4usb_es.ts b/release/ts/gpg4usb_es.ts new file mode 100644 index 0000000..454bd35 --- /dev/null +++ b/release/ts/gpg4usb_es.ts @@ -0,0 +1,879 @@ + + + + + FileEncryptionDialog + + + Encrypt / Decrypt File + + + + + + File + + + + + Action + + + + + Input + + + + + ... + + + + + Output + + + + + &Encrypt + + + + + &Decrypt + + + + + Open File + + + + + Save File + + + + + couldn't open file: + + + + + Cannot write file %1: +%2. + + + + + GpgWin + + + &Open... + + + + + Ctrl+O + + + + + Open an existing file + + + + + &Save + + + + + Ctrl+S + + + + + Save the current File + + + + + Save &As + + + + + Save the current File as... + + + + + &Print + + + + + Ctrl+P + + + + + Print Document + + + + + &Quit + + + + + Ctrl+Q + + + + + Quit Program + + + + + &Paste + + + + + Ctrl+V + + + + + Paste Text From Clipboard + + + + + Cu&t + + + + + Ctrl+X + + + + + Cut the current selection's contents to the clipboard + + + + + &Copy + + + + + Ctrl+C + + + + + Copy the current selection's contents to the clipboard + + + + + Select &All + + + + + Ctrl+A + + + + + Select the whole text + + + + + Se&ttings + + + + + Open settings dialog + + + + + &Encrypt + + + + + Ctrl+E + + + + + Encrypt Message + + + + + &Decrypt + + + + + Ctrl+D + + + + + Decrypt Message + + + + + &File Encryption + + + + + Encrypt/Decrypt File + + + + + + + &File + + + + + Import New Key From File + + + + + + &Editor + + + + + Import New Key From Editor + + + + + + &Clipboard + + + + + Import New Key From Clipboard + + + + + Key Management + + + + + Open Keymanagement + + + + + + Import Key + + + + + Open Import New Key Dialog + + + + + &About + + + + + Show the application's About box + + + + + Append Selected Key(s) To Text + + + + + Append The Selected Keys To Text in Editor + + + + + &Edit + + + + + &Crypt + + + + + &Keys + + + + + &Import Key From... + + + + + &View + + + + + &Help + + + + + Crypt + + + + + Key + + + + + Edit + + + + + + Ready + + + + + Encrypt for: + + + + + + Application + + + + + Cannot read file %1: +%2. + + + + + File loaded + + + + + %1[*] - %2 + + + + + The document has been modified. +Do you want to save your changes? + + + + + File + + + + + Cannot write file %1: +%2. + + + + + Saved '%1' + + + + + About + + + + + <center>This Application allows you to do simple<br>encryption/decryption of your text-message or file.<br>It's licensed under the GPL v2.0<br><br><b>Developer:</b><br>Bene, Heimer, Juergen, Nils, Ubbo<br><br><b>Translation:</b><br>Alessandro (pt_br), Alex (fr), Kirill (ru)<br><br>If you have any questions and/or<br>suggestions, contact us at<br>gpg4usb at cpunk.de</a><br><br>or feel free to meet us in our xmpp-channel:<br>gpg4usb at conference.jabber.ccc.de</center> + + + + + Open Key + + + + + Key Files + + + + + All Files + + + + + couldn't open file: + + + + + Import Key From... + + + + + KeyDetailsDialog + + + Owner details + + + + + Key details + + + + + Fingerprint + + + + + Name: + + + + + E-Mailaddress: + + + + + Comment: + + + + + Key size: + + + + + Expires on: + + + + + Created on: + + + + + Algorithm: + + + + + Never + + + + + / Never + + + + + Private Key + + + + + Export Private Key + + + + + Keydetails + + + + + Exporting private Key + + + + + You are about to export your private key. +This is NOT your public key, so don't give it away. +Make sure you keep it save. + + + + + Export Key To File + + + + + Key Files + + + + + KeyList + + + Name + + + + + EMail + + + + + KeyMgmt + + + Keymanagement + + + + + &Close Key Management + + + + + Ctrl+Q + + + + + Close Key Management + + + + + Import From &File + + + + + Import New Key From File + + + + + Import From &Clipboard + + + + + Import New Key From Clipboard + + + + + Export To &Clipboard + + + + + Export Selected Key(s) To Clipboard + + + + + Export To &File + + + + + Export Selected Key(s) To File + + + + + Delete Selected Key(s) + + + + + Delete the Selected keys + + + + + Delete Checked Key(s) + + + + + Delete the Checked keys + + + + + + Generate Key + + + + + Generate New Key + + + + + Show Keydetails + + + + + Show Details for this Key + + + + + &File + + + + + &Key + + + + + Crypt + + + + + Open Key + + + + + + Key Files + + + + + Couldn't Open File: + + + + + Deleting Keys + + + + + Are you sure that you want to delete the selected keys?. +The action can not be undone. + + + + + Export Key To File + + + + + Name: + + + + + E-Mailaddress:: + + + + + Comment: + + + + + KeySize (in Bit): + + + + + Expiration Date: + + + + + Password: + + + + + Repeat Password: + + + + + Never Expire + + + + + Password: Strength +Weak -> Strong + + + + + Password Strength + + + + + Name must contain at least five characters. + + + + + + Password and Repeat don't match. + + + + + Generating Key... + + + + + Collecting random data for key generation. + This may take a while. + To speed up the process use your computer + (e.g. browse the net, listen to music,...) + + + + + SettingsDialog + + + Settings + + + + + Iconsize + + + + + small + + + + + medium + + + + + large + + + + + Iconstyle + + + + + just text + + + + + just icons + + + + + text and icons + + + + + Windowstate + + + + + save window size and position on exit + + + + + Language + + + + + Language change is applied after restarting program. + + + + + System Default + + + + + English + + + + -- cgit v1.2.3