From 6252c2bfaeacd7977958c6b0c7376db7b21cdcb2 Mon Sep 17 00:00:00 2001 From: nils Date: Fri, 25 Jun 2010 17:23:54 +0000 Subject: added warning, if file exists in file encryption git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@362 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- TODO | 9 +-- fileencryptiondialog.cpp | 14 +++- release/ts/gpg4usb_de.ts | 192 ++++++++++++++++++++++++-------------------- release/ts/gpg4usb_pt_BR.ts | 168 ++++++++++++++++++++------------------ release/ts/gpg4usb_ru.ts | 166 +++++++++++++++++++++----------------- 5 files changed, 298 insertions(+), 251 deletions(-) diff --git a/TODO b/TODO index 8c9d4fc..c805117 100644 --- a/TODO +++ b/TODO @@ -1,15 +1,8 @@ TODO: ----- - -Release 0.2.4 -- Open File from command Line [DONE] -- possibility to save which private keys are checked on closing (partially solving "encrypt to self") [DONE] -- add translation for spanish [DONE] -- link to online tutorial in help menu [DONE] - Release 0.2.5 - minimal MIME support (understand and decode "Content-Encoding" header, e.g. "quoted printable") -- File-Encryption: Warning if file overwritten +- File-Encryption: Warning if file overwritten [DONE] - more doku on building gpg4usb (especially on windows) - doku for translating gpg4usb - add translation for french diff --git a/fileencryptiondialog.cpp b/fileencryptiondialog.cpp index d1f02ef..25db7f0 100755 --- a/fileencryptiondialog.cpp +++ b/fileencryptiondialog.cpp @@ -38,7 +38,6 @@ FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath : QDialog(parent) { - mCtx = ctx; setWindowTitle(tr("Encrypt / Decrypt File")); resize(500, 200); @@ -136,8 +135,9 @@ void FileEncryptionDialog::selectOutputFile() path = QFileInfo(outputFileEdit->text()).absolutePath(); } - QString outfileName = QFileDialog::getSaveFileName(this, tr("Save File"), path); + QString outfileName = QFileDialog::getSaveFileName(this, tr("Save File"),path, NULL ,NULL ,QFileDialog::DontConfirmOverwrite); outputFileEdit->setText(outfileName); + } void FileEncryptionDialog::executeAction() @@ -173,8 +173,14 @@ void FileEncryptionDialog::executeAction() QDataStream out(&outfile); out.writeRawData(outBuffer->data(), outBuffer->length()); - accept(); - QMessageBox::information(0, "Done", "Output saved to " + outputFileEdit->text()); + QMessageBox::StandardButton ret; + ret = QMessageBox::warning(this, tr("File"), + tr("File exists! Do you want to overwrite it?"), + QMessageBox::Ok|QMessageBox::Cancel); + if (ret == QMessageBox::Ok){ + accept(); + QMessageBox::information(0, "Done", "Output saved to " + outputFileEdit->text()); + } } void FileEncryptionDialog::showKeyList() diff --git a/release/ts/gpg4usb_de.ts b/release/ts/gpg4usb_de.ts index 84d3139..f665d31 100644 --- a/release/ts/gpg4usb_de.ts +++ b/release/ts/gpg4usb_de.ts @@ -71,51 +71,57 @@ FileEncryptionDialog - + Encrypt / Decrypt File Datei Ver/Entschlüsseln - + + File Datei - + Action Aktion - + ... - + Input Eingabedatei - + Output Ausgabedatei - + &Encrypt &Verschlüsseln - + &Decrypt &Entschlüsseln - + Open File Datei Öffnen + + + File exists! Do you want to overwrite it? + + Files Dateien @@ -125,7 +131,7 @@ Alle Dateien (*) - + Save File Datei Speichern @@ -144,7 +150,7 @@ GpgWin - + &Open... Ö&ffnen... @@ -153,12 +159,12 @@ Strg+O - + Open an existing file Öffen Datei - + &Save &Speichern @@ -167,12 +173,12 @@ Strg+S - + Save the current File Speichere Datei - + Save &As Speichern &unter @@ -181,12 +187,12 @@ Strg+A - + Save the current File as... Speichere aktuelle Datei als.... - + &Print &Drucken @@ -195,12 +201,12 @@ Strg+P - + Print Document Drucken - + &Quit &Beenden @@ -209,12 +215,12 @@ Strg+Q - + Quit Program Beende das Programm - + &Paste E&infügen @@ -223,12 +229,12 @@ Strg+V - + Paste Text From Clipboard Füge Text aus der Zwischenablage ein - + Cu&t &Ausschneiden @@ -237,12 +243,12 @@ Strg+X - + Cut the current selection's contents to the clipboard aktuelle Auswahl ausschneiden und in Zwischenablage einfügen - + &Copy &Kopieren @@ -251,27 +257,27 @@ Strg+C - + Copy the current selection's contents to the clipboard aktuelle Auswahl in Zwischenablage kopieren - + Select &All Alles &markieren - + Select the whole text Den ganzen Text markieren - + Open settings dialog Öffne den Einstellungsdialog - + &Encrypt &Verschlüsseln @@ -280,12 +286,12 @@ Ctrl+E - + Encrypt Message Verschlüssele den Text - + &Decrypt &Entschlüsseln @@ -294,200 +300,210 @@ Ctrl+D - + Decrypt Message Entschlüssele den Text - + Import New Key From File Importiere einen neuen Schlüssel aus Datei - + Import New Key From Editor Importiere einen neuen Schlüssel aus dem Textfeld - + &About &Info - + Show the application's About box Zeige die Information über die Anwendung - - - + + + &File &Datei - + &Edit &Bearbeiten - + &Help &Hilfe - + File Datei - + Edit Bearbeiten - + &Undo &Rückgängig - + Undo Last Edit Action Mache die letzte Aktion rückgängig - + + &Redo + + + + + Redo Last Edit Action + + + + Se&ttings Ei&nstellungen - + &File Encryption Datei Verschlüsselung &Datei Verschlüsselung - + Encrypt/Decrypt File Ver-/Entschlüssele Datei - + Key Management Schlüsselverwaltung - + Open Keymanagement Öffne die Schlüsselverwaltung - + Open Import New Key Dialog Öffne den Schlüsselimport Dialog - + Online &Tutorial Online &Dokumentation - + Open Online Tutorial Öffne die Online Dokumentation - + Append Selected Key(s) To Text Hänge die ausgewählten Schlüssel an den Text an - + Append The Selected Keys To Text in Editor Hänge den gewählten Schhlüssel an den Text im Editor an - + &Keys Sch&lüssel - + &Import Key From... &Importiere Schlüssel aus... - + &View &Ansicht - + Key Schlüssel - - + + Ready Fertig - + Encrypt for: Verschlüssele für: - + Attached files: Angehängte Dateien: - - + + Application Anwendung - + Cannot read file %1: %2. Kann Datei nicht lesen %1: %2. - + File loaded Datei geladen - + %1[*] - %2 - + The document has been modified. Do you want to save your changes? Die Datei würde verändert. Möchten Sie die Änderung speichern? - + Cannot write file %1: %2. Kann Datei nicht lesen %1: %2. - + Saved '%1' %1 gespeichert - + <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), Viriato (es)<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> <center>Diese Anwendung ermöglicht einfaches<br>Ver- und Entschlüsseln von Texten und Dateien.<br>Sie steht unter der GPL v2.0<br><br><b>Entwickler:</b><br>Bene, Heimer, Juergen, Nils, Ubbo<br><br><b>Übersetzung:</b><br>Alessandro (pt_br), Alex (fr), Kirill (ru), Viriato (es)<br><br>Falls Sie irgendwelche Fragen und/oder <br>Vorschläge haben, kontaktieren Sie uns über<br>gpg4usb at cpunk.de</a><br><br>oder treffen sie uns einfach in unserem XMPP-Channel:<br>gpg4usb at conference.jabber.ccc.de</center> - + Open Key Öffne Datei @@ -496,45 +512,45 @@ Do you want to save your changes? <center>Diese Anwendung erlaubt das einfache<br> Ver-und Entschlüsseln von Texten und Dateien.<br>Die Anwendung ist lizensiert unter der GPL v2.0<br><br><b>Entwickler:</b><br>Bene, Heimer, Juergen, Nils, Ubbo<br><br><b>Übersetzung:</b><br>Kirill (ru), Alessandro (pt)<br><br>Falls sie Fragen oder Anregungen haben,<br> kontaktieren sie uns unter gpg4usb at cpunk.de</a><br><br>oder treffen sie uns in unserem XMPP-Channel:<br>gpg4usb at conference.jabber.ccc.de</center> - + couldn't open file: Konnte Datei nicht öffnen: - - + + &Editor &Editor - - + + &Clipboard &Zwischenablage - + Import New Key From Clipboard Importiere neuen Schlüssel aus der Zwischenablage - - + + Import Key Schlüsselimport - + &Crypt &Crypt - + Crypt Crypt - + About Über @@ -543,17 +559,17 @@ Do you want to save your changes? <center>Diese Anwendung ermöglicht einfaches<br>Ver- und Entschlüsseln von Texten und Dateien.<br>Sie steht unter der GPL v2.0<br><br><b>Entwickler:</b><br>Bene, Heimer, Juergen, Nils, Ubbo<br><br><b>Übersetzung:</b><br>Alessandro (pt_br), Alex (fr), Kirill (ru), Viriato (es)<br><br>Falls Sie irgendwelche Fragen und/oder <br>Vorschläge haben, kontaktieren Sie uns über<br>gpg4usb at cpunk.de</a><br><br>oder treffen sie uns einfach in unserem XMPP-Channel:<br>gpg4usb at conference.jabber.ccc.de</center> - + Key Files Schlüssel Dateien - + All Files Alle Dateien - + Import Key From... Impoertiere neuen Schlüssel aus... diff --git a/release/ts/gpg4usb_pt_BR.ts b/release/ts/gpg4usb_pt_BR.ts index f3a8b9e..999e80d 100644 --- a/release/ts/gpg4usb_pt_BR.ts +++ b/release/ts/gpg4usb_pt_BR.ts @@ -43,51 +43,57 @@ FileEncryptionDialog - + Encrypt / Decrypt File Encriptar / Decriptar Arquivo - + + File Arquivo - + Action Ação - + ... ... - + Input Entrada - + Output Saída - + &Encrypt &Encriptar - + &Decrypt &Decriptar - + Open File Abrir Arquivo + + + File exists! Do you want to overwrite it? + + Files Arquivos @@ -97,7 +103,7 @@ Todos os Arquivos (*) - + Save File Salvar Arquivo @@ -187,7 +193,7 @@ Sair - + &Paste i used this without accelerator & to avoid confusion with windows native paste (ctrl+v) &Colar @@ -197,12 +203,12 @@ Ctrl+V - + Paste Text From Clipboard Colar Texto da Área de Transferência - + Cu&t i used this without accelerator & to avoid confusion with native windows cut ctrl+x &Recortar @@ -212,12 +218,12 @@ Ctrl+X - + Cut the current selection's contents to the clipboard Recortar a seleção atual para a Área de Transferência - + &Copy &Copiar @@ -226,32 +232,32 @@ Ctrl+C - + Copy the current selection's contents to the clipboard Copiar a seleção para a área de transferência - + Select &All Selecionar &Tudo - + Select the whole text Selecionar o texto completo - + Se&ttings Con&figurações - + Open settings dialog Abrir janela de configurações - + &Encrypt &Encriptar @@ -260,12 +266,12 @@ Ctrl+E - + Encrypt Message Encriptar Mensagem - + &Decrypt &Decriptar @@ -274,52 +280,52 @@ Ctrl+D - + Decrypt Message Decriptar Mensagem - + &File Encryption Encriptar &Arquivo - + Encrypt/Decrypt File Encriptar/Decriptar Arquivo - + Import New Key From File Importar Nova Chave do Arquivo - + Import New Key From Editor Importar Nova Chave do Editor - + Key Management Gerenciador de Chaves - + Open Keymanagement Abrir Gerenciador de Chaves - + Open Import New Key Dialog Abrir Diálogo de Importação de Nova Chave - + &About &Sobre - + Show the application's About box Exibe a janela 'sobre' @@ -328,29 +334,29 @@ <center>Esse programa serve para encriptar e<br>decriptar mensagens de texto ou arquivos.<br>E é liberado sob a licença GPL v2.0<br><br><b>Desenvolvedores:</b><br>Bene, Heimer, Juergen, Nils, Ubbo<br><br><b>Tradução:</b><br>Alessandro (pt_br), Alex (fr), Kirill (ru)<br><br>Caso tenha dúvidas e/ou sugestões,<br>envie uma mensagem para<br>gpg4usb at cpunk.de</a><br><br>ou nos encontre no nosso canal xmpp:<br>gpg4usb at conference.jabber.ccc.de</center> - - - + + + &File &Arquivo - + &Edit E&ditar - + &Help A&juda - + File Arquivo - + Edit Editar @@ -365,100 +371,110 @@ Desfazer Última Edição - + + &Redo + + + + + Redo Last Edit Action + + + + Online &Tutorial &Tutorial Online - + Open Online Tutorial Abrir Tutorial Online - + Append Selected Key(s) To Text Anexar Chaves Marcadas no Texto - + Append The Selected Keys To Text in Editor Anexar Chaves Marcadas no Texto do Editor - + &Keys &Chaves - + &Import Key From... &Importar Chave de... - + &View E&xibir - + Key Chave - - + + Ready Pronto - + Encrypt for: Encriptar para: - + Attached files: Arquivos anexos: - - + + Application Aplicação - + Cannot read file %1: %2. Não leu o arquivo %1: %2. - + File loaded Arquivo carregado - + %1[*] - %2 %1[*] - %2 - + The document has been modified. Do you want to save your changes? O documento foi alterado. Deseja salvar as alterações? - + Cannot write file %1: %2. Não escreveu o arquivo %1: %2. - + Saved '%1' i used inverse order because its more natural speak in this way '%1' salvo @@ -468,70 +484,70 @@ Deseja salvar as alterações? <center> Este aplicativo permite a encriptação/decriptação<br>simplificada das suas mensagens de texto ou arquivos.<br>E é liberado sob licença GPL-V2.0<br><br>Desenvolvedores:</b><br>Bene, Heimer, Juergen, Nils, Ubbo<br><br><b>Tradução:</b><br>Krill(ru)<br>Alessandro Benevenuto (pt-br)<br><br>Caso tenha dúvidas e/ou sugestões, entre em<br>contatoatravés de gpg4usb at cpunk.de</a><br><br>ou no canal xmpp<br>gpg4usb at conference.jabber.ccc.de</center> - + Open Key Abrir a Chave - + Key Files Arquivos de Chaves - + All Files Todos os Arquivos - + couldn't open file: Não pode abrir o arquivo: - - + + &Editor &Editor - - + + &Clipboard Área de &Transferência - + Import New Key From Clipboard Importar Nova Chave da Área de Transferência - - + + Import Key Importar Chave - + &Crypt &Encriptar - + Crypt Encriptar - + About Sobre - + <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), Viriato (es)<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> <center>Esse programa serve para encriptar e<br>decriptar mensagens de texto ou arquivos.<br>E é liberado sob a licença GPL V2.0<br><br><b>Desenvolvedores:</b><br>Bene, Heimer, Juergen, Nils, Ubbo<br><br><b>Tradução:</b><br>Alessandro (pt_br), Alex (fr), Kirill (ru), Viriato (es)<br><br>Caso tenha duvidas e/ou sugestões,<br>envie uma mensagem para<br>gpg4usb at cpunk.de</a><br><br>ou nos encontre no nosso canal xmppl:<br>gpg4usb at conference.jabber.ccc.de</center> - + Import Key From... Importar Chave de... diff --git a/release/ts/gpg4usb_ru.ts b/release/ts/gpg4usb_ru.ts index 8656922..083469a 100644 --- a/release/ts/gpg4usb_ru.ts +++ b/release/ts/gpg4usb_ru.ts @@ -47,51 +47,57 @@ FileEncryptionDialog - + Encrypt / Decrypt File За-/Расшифровать файл - + + File Файл - + Action Действие - + ... ... - + Input Файл ввода - + Output Файл вывода - + &Encrypt З&ашифровать - + &Decrypt Расшифро&вать - + Open File Открыть файл + + + File exists! Do you want to overwrite it? + + Files Файлы @@ -101,7 +107,7 @@ Все файлы - + Save File Сохранить файл @@ -182,309 +188,319 @@ + &Redo + + + + + Redo Last Edit Action + + + + &Paste &Вставить - + Paste Text From Clipboard Вставить текст из Буфера Обмена - + Cu&t &Вырезать - + Cut the current selection's contents to the clipboard Вырезать выделенные элементы в Буфер Обмена - + &Copy &Копировать - + Copy the current selection's contents to the clipboard Копировать выделенные элементы в Буфер Обмена - + Select &All В&ыделить всё - + Select the whole text Выделить весь текст - + Open settings dialog Открыть окно настроек - + &Encrypt З&ашифровать - + Encrypt Message Зашифровать текст - + &Decrypt Расшифро&вать - + Decrypt Message Расшифровать текст - + Import New Key From File Импорт нового ключа из файла - + Import New Key From Editor Импорт нового ключа из редактора - + &About &О программе - + Show the application's About box Показать инфо о программе - - - + + + &File Ф&айл - + &Edit &Правка - + &Help &Справка - + File Файл - + Edit Правка - + Se&ttings &Настройки - + &File Encryption Шифрование &файлов - + Encrypt/Decrypt File За-/Расшифровать файл - + Key Management Менеджер ключей - + Open Keymanagement Открыть Менеджер ключей - + Open Import New Key Dialog Открыть окно импорта ключей - + Online &Tutorial Онлайн-&руководство - + Open Online Tutorial Открыть онлайн-руководство - + Append Selected Key(s) To Text Добавить выбранн. ключ(и) к тексту - + Append The Selected Keys To Text in Editor Добавить выбранный ключ к тексту в редакторе - + &Keys &Ключи - + &Import Key From... &Импорт ключа из... - + &View &Вид - + Key Ключ - - + + Ready Готово - + Encrypt for: Зашифровать для: - + Attached files: Прикреплённые файлы: - - + + Application Приложение - + Cannot read file %1: %2. Не удалось прочесть файл %1: %2. - + File loaded Файл загружен - + %1[*] - %2 - + The document has been modified. Do you want to save your changes? Документ был редактирован. Сохранить изменения? - + Cannot write file %1: %2. Не удалось записать файл %1: %2. - + Saved '%1' "%1" сохранён - + <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), Viriato (es)<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 Открыть ключ - + couldn't open file: Не удалось открыть файл: - - + + &Editor Окна &редактора - - + + &Clipboard &Буфера Обмена - + Import New Key From Clipboard Импорт нового ключа из Буфера Обмена - - + + Import Key Импорт ключа - + &Crypt &Шифрование - + Crypt Шифрование - + About О программе - + Key Files Файлы ключей - + All Files Все файлы - + Import Key From... Импорт ключа из... -- cgit v1.2.3