diff options
42 files changed, 2580 insertions, 2115 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6fa10ee..553bd6d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,9 @@ jobs: - name: Install Dependence (macOS) run: | - brew install cmake git autoconf automake qt@5 + brew install cmake git autoconf automake qt@5 gcc + brew link qt@5 + brew link gcc if: matrix.os == 'macos-latest' @@ -74,10 +76,10 @@ jobs: - name: Build GpgME run: | cd .. - git clone https://github.com/gpg/gpgme + git clone https://github.com/saturneric/gpgme cd gpgme ./autogen.sh - ./configure && make -j2 + ./configure --enable-maintainer-mode --enable-languages=cpp && make -j2 sudo make install cd ${{github.workspace}} if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' @@ -88,7 +90,7 @@ jobs: git clone https://github.com/saturneric/gpgme cd gpgme ./autogen.sh - ./configure --enable-static=true --enable-languages=cpp LDFLAGS="-static" && make -j2 + ./configure --enable-maintainer-mode --enable-static=true --enable-languages=cpp LDFLAGS="-static" && make -j2 make install if: matrix.os == 'windows-latest' @@ -101,7 +103,15 @@ jobs: - name: Build GpgFrontend # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config $env.BUILD_TYPE}} -- -j 2 - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + if: matrix.os == 'ubuntu-latest' + + - name: Build GpgFrontend (macOS App Bundle) + # Build your program with the given configuration + run: | + cmake --build ${{github.workspace}}/build --config $env.BUILD_TYPE}} -- -j 3 + macdeployqt ${{github.workspace}}/build/release/GpgFrontend.app + + if: matrix.os == 'macos-latest' - name: Configure CMake & Build Binary(Windows) shell: msys2 {0} diff --git a/CMakeLists.txt b/CMakeLists.txt index a3a3ea4c..75029131 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(GpgFrontend VERSION 1.0.5 LANGUAGES CXX) +project(GpgFrontend VERSION 1.0.6 LANGUAGES CXX) message(STATUS "GPGFrontend Build Configuration Started CMAKE Version ${CMAKE_VERSION}") @@ -38,9 +38,11 @@ message(STATUS "Define EXECUTABLE_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}") message(STATUS "Define CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}") if(${CMAKE_BUILD_TYPE} STREQUAL "Release") + set(BUILD_FLAG 0) message(STATUS "Build Type RELEASE") set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") else() + set(BUILD_FLAG 1) message(STATUS "Build Type DEBUG") set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Wall") endif() @@ -70,6 +72,7 @@ endif() set(BUILD_VERSION ${PROJECT_VERSION}_${CMAKE_SYSTEM}_${CMAKE_SYSTEM_PROCESSOR}_${CMAKE_BUILD_TYPE}) set(GIT_VERSION ${GIT_BRANCH_NAME}_${GIT_COMMIT_HASH}) +set(AppName GpgFrontend) string(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%d %H:%M:%S") message(STATUS "Build Timestamp ${BUILD_TIMESTAMP}") @@ -81,6 +84,8 @@ IF (MINGW) message(STATUS "Configuration For OS Platform Microsoft Windows") message(STATUS "Build Environment MINGW") + set(OS_PLATFORM 0) + set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") include_directories( @@ -97,6 +102,8 @@ if(APPLE) message(STATUS "Configuration For OS Platform MacOS") + set(OS_PLATFORM 1) + set(ENV{Qt5_DIR} /usr/local/opt/qt5/lib/cmake) include_directories( @@ -115,7 +122,7 @@ endif() if(LINUX) message(STATUS "Configuration For OS Platform LINUX") - set(Platform LINUX) + set(OS_PLATFORM 2) include_directories( include @@ -131,6 +138,8 @@ if(LINUX) endif() +message(STATUS "OS_PLATFORM ${OS_PLATFORM}") + find_package(Qt5 COMPONENTS Core Test Widgets PrintSupport Network LinguistTools REQUIRED) add_subdirectory(src) @@ -258,7 +258,7 @@ in one of these ways: (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a + dirModel, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no @@ -59,13 +59,8 @@ the delivery process.** ## Features - Can run on **Windows, Linux and macOS**. - - Open source, free, no need to install. - -- For Windows user, just double-click, and then you can use it freely. - -- For macOS and Linux user, just type few command before running it. - +- For Windows and macOS user, just double-click, and then you can use it freely. - Supports multiple languages. Don’t forget to help me translate this software. ## Usage @@ -95,29 +90,17 @@ awesome operations. 1. [Download](https://gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.3.1_20210420.exe) gnupg-w32-******.exe 2. Double Click it to install it -3. [Download](https://github.com/saturneric/GpgFrontend/releases) GpgFrontend Windows Edition +3. [Download GpgFrontend](https://github.com/saturneric/GpgFrontend/releases) Windows Edition from release 4. Unzip gpgfrontend-windows-latest-*******.zip -5. Go into the directory and double click gpgfrontend.exe +5. Go into the directory and double click GpgFrontend.exe #### macOS -1. Install Homebrew [Here](https://brew.sh/) if you don't know it. -2. Install gnupg - ```shell - % brew update - % brew install gnupg qt@5 gpgme - ``` -3. [Download](https://github.com/saturneric/GpgFrontend/releases) GpgFrontend macOS Edition -4. Unzip GpgFrontend -5. Get into folder and Give gpgfrontend permission to execute - ```shell - % cd gpgfrontend-macos-latest-*******/ - % chmod u+x gpgfrontend - ``` -6. Just run it - ```shell - % ./gpgfrontend - ``` +1. [Download GpgFrontend](https://github.com/saturneric/GpgFrontend/releases) macOS edition from release +2. Double-Click GpgFrontend.dmg to load it +3. Double click and run it + (due to macOS security policy, you may need a little more step). +4. If it satisfies you, you can drag it into your Application folder. #### Debian/Ubuntu/CentOS @@ -125,22 +108,22 @@ awesome operations. - For Debian/Ubuntu ```shell $ sudo apt update - $ sudo apt install gpg libgpgme11 qt-default + $ sudo apt install gpg qt-default ``` - For CentOS ```shell - $ sudo yum install gnupg gpgme qt5-qtbase + $ sudo yum install gnupg qt5-qtbase ``` -2. [Download](https://github.com/saturneric/GpgFrontend/releases) GpgFrontend Linux Edition -3. Unzip GpgFrontend +2. [Download GpgFrontend](https://github.com/saturneric/GpgFrontend/releases) Linux edition from release +3. Unzip gpgfrontend-ubuntu-latest-*******.zip 4. Get into folder and Give gpgfrontend permission to execute ```shell $ cd gpgfrontend-ubuntu-latest-*******/ - $ chmod u+x gpgfrontend + $ chmod u+x GpgFrontend ``` 5. Just run it ```shell - $ ./gpgfrontend + $ ./GpgFrontend ``` ## Document @@ -199,5 +182,4 @@ mingw-w64: http://mingw-w64.org/doku.php The icons of this software use materials from Alibaba vector icon library. The Alibaba vector icon library is free to use. The icons in the free library aren't registered as trademarks. There is no copyright issue involved and can be used -commercially. - +commercially.
\ No newline at end of file diff --git a/gpgfrontend.icns b/gpgfrontend.icns Binary files differnew file mode 100644 index 00000000..89b13163 --- /dev/null +++ b/gpgfrontend.icns diff --git a/include/GpgFrontend.h.in b/include/GpgFrontend.h.in index cec3be69..3c3e72cc 100644 --- a/include/GpgFrontend.h.in +++ b/include/GpgFrontend.h.in @@ -16,9 +16,19 @@ #include <gpgme.h> +#define WINDOWS 0 +#define MACOS 1 +#define LINUX 2 + +#define RELEASE 0 +#define DEBUG 1 + #define PROJECT_NAME "@PROJECT_NAME@" #define BUILD_VERSION "@BUILD_VERSION@" #define GIT_VERSION "@GIT_VERSION@" +#define OS_PLATFORM @OS_PLATFORM@ + +#define BUILD_FLAG @BUILD_FLAG@ #define VERSION_MAJOR @CMAKE_PROJECT_VERSION_MAJOR@ #define VERSION_MINOR @CMAKE_PROJECT_VERSION_MINOR@ @@ -29,4 +39,11 @@ #define GIT_BRANCH_NAME "@GIT_BRANCH_NAME@" #define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@" -#endif //GPGFRONTEND_H_IN
\ No newline at end of file +#if OS_PLATFORM == MACOS && BUILD_FLAG == RELEASE +# define RESOURCE_DIR(appDir) (appDir + "/../Resources/") +#else +# define RESOURCE_DIR(appDir) (appDir) +#endif + + +#endif //GPGFRONTEND_H_IN diff --git a/include/MainWindow.h b/include/MainWindow.h index 95a10210..efe56919 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -26,9 +26,9 @@ #define __GPGWIN_H__ #include "gpg/GpgConstants.h" -#include "ui/Attachments.h" +#include "ui/widgets/Attachments.h" #include "ui/KeyMgmt.h" -#include "ui/TextEdit.h" +#include "ui/widgets/TextEdit.h" #include "ui/FileEncryptionDialog.h" #include "ui/SettingsDialog.h" #include "ui/AboutDialog.h" @@ -41,6 +41,8 @@ #include "gpg/result_analyse/EncryptResultAnalyse.h" #include "gpg/result_analyse/DecryptResultAnalyse.h" +#include "gpg/GpgFileOpera.h" + /** * @brief @@ -176,6 +178,11 @@ private slots: void slotFileVerify(); /** + * @details Open File Opera Tab + */ + void slotOpenFileTab(); + + /** * @details Open settings-dialog. */ void slotOpenSettingsDialog(); @@ -339,6 +346,7 @@ private: GpgME::GpgContext *mCtx; /**< TODO */ KeyMgmt *keyMgmt; /**< TODO */ KeyServerImportDialog *importDialog; /**< TODO */ + bool attachmentDockCreated; bool restartNeeded; }; diff --git a/include/gpg/GpgFileOpera.h b/include/gpg/GpgFileOpera.h new file mode 100644 index 00000000..c6b4aec8 --- /dev/null +++ b/include/gpg/GpgFileOpera.h @@ -0,0 +1,37 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#ifndef GPGFRONTEND_GPGFILEOPERA_H +#define GPGFRONTEND_GPGFILEOPERA_H + +#include "GpgFrontend.h" +#include "gpg/GpgContext.h" + +class GpgFileOpera { +public: + static bool encryptFile(GpgME::GpgContext *ctx, QVector<GpgKey> &keys, const QString &mPath); +}; + + +#endif //GPGFRONTEND_GPGFILEOPERA_H diff --git a/include/ui/FindWidget.h b/include/ui/FindWidget.h index 2e9c67b0..1142b649 100644 --- a/include/ui/FindWidget.h +++ b/include/ui/FindWidget.h @@ -25,7 +25,7 @@ #ifndef FINDWIDGET_H #define FINDWIDGET_H -#include "EditorPage.h" +#include "ui/widgets/EditorPage.h" /** * @brief Class for handling the find widget shown at buttom of a textedit-page diff --git a/include/ui/VerifyDetailsDialog.h b/include/ui/VerifyDetailsDialog.h index a1f28e5d..ece2f1e7 100644 --- a/include/ui/VerifyDetailsDialog.h +++ b/include/ui/VerifyDetailsDialog.h @@ -25,7 +25,7 @@ #ifndef __VERIFYDETAILSDIALOG_H__ #define __VERIFYDETAILSDIALOG_H__ -#include "ui/EditorPage.h" +#include "ui/widgets/EditorPage.h" #include "ui/widgets/VerifyKeyDetailBox.h" class VerifyDetailsDialog : public QDialog { diff --git a/include/ui/Attachments.h b/include/ui/widgets/Attachments.h index 19b6ef37..00433028 100644 --- a/include/ui/Attachments.h +++ b/include/ui/widgets/Attachments.h @@ -25,7 +25,7 @@ #ifndef __ATTACHMENTS_H__ #define __ATTACHMENTS_H__ -#include "AttachmentTableModel.h" +#include "ui/AttachmentTableModel.h" class Attachments : public QWidget { Q_OBJECT diff --git a/include/ui/EditorPage.h b/include/ui/widgets/EditorPage.h index a06d6cd6..a06d6cd6 100644 --- a/include/ui/EditorPage.h +++ b/include/ui/widgets/EditorPage.h diff --git a/include/ui/widgets/FilePage.h b/include/ui/widgets/FilePage.h new file mode 100644 index 00000000..c343571d --- /dev/null +++ b/include/ui/widgets/FilePage.h @@ -0,0 +1,59 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#ifndef GPGFRONTEND_FILEPAGE_H +#define GPGFRONTEND_FILEPAGE_H + +#include <GpgFrontend.h> + +class FilePage : public QWidget { +Q_OBJECT +public: + + explicit FilePage(QWidget* parent = nullptr); + + QString getSelected() const; + + +private slots: + + void fileTreeViewItemClicked(const QModelIndex &index); + void fileTreeViewItemDoubleClicked(const QModelIndex &index); + + void slotUpLevel(); + void slotGoPath(); + +private: + QFileSystemModel *dirModel; + QTreeView *dirTreeView; + QLineEdit *pathEdit; + QString mPath; + + QPushButton *upLevelButton; + QPushButton *goPathButton; + +}; + + +#endif //GPGFRONTEND_FILEPAGE_H diff --git a/include/ui/HelpPage.h b/include/ui/widgets/HelpPage.h index 0b5e4ca3..0b5e4ca3 100644 --- a/include/ui/HelpPage.h +++ b/include/ui/widgets/HelpPage.h diff --git a/include/ui/widgets/InfoBoardWidget.h b/include/ui/widgets/InfoBoardWidget.h index 88c7cb04..9d3dbd16 100644 --- a/include/ui/widgets/InfoBoardWidget.h +++ b/include/ui/widgets/InfoBoardWidget.h @@ -25,7 +25,7 @@ #ifndef __VERIFYNOTIFICATION_H__ #define __VERIFYNOTIFICATION_H__ -#include "ui/EditorPage.h" +#include "EditorPage.h" #include "ui/VerifyDetailsDialog.h" #include "gpg/result_analyse/VerifyResultAnalyse.h" diff --git a/include/ui/TextEdit.h b/include/ui/widgets/TextEdit.h index 8219814b..99b8bcc7 100644 --- a/include/ui/TextEdit.h +++ b/include/ui/widgets/TextEdit.h @@ -25,9 +25,10 @@ #ifndef __TEXTEDIT_H__ #define __TEXTEDIT_H__ -#include "ui/EditorPage.h" -#include "ui/HelpPage.h" -#include "QuitDialog.h" +#include "ui/widgets/EditorPage.h" +#include "ui/widgets/HelpPage.h" +#include "ui/widgets/FilePage.h" +#include "ui/QuitDialog.h" /** @@ -59,32 +60,38 @@ public: */ bool maybeSaveAnyTab(); - int tabCount() const; + [[nodiscard]] int tabCount() const; /** * @details textpage of the currently activated tab * @return \li reference to QTextEdit if tab has one * \li 0 otherwise (e.g. if helppage) */ - QTextEdit *curTextPage() const; + [[nodiscard]] QTextEdit *curTextPage() const; - QTextBrowser *curHelpPage() const; + [[nodiscard]] QTextBrowser *curHelpPage() const; /** * @details List of currently unsaved tabs. * @returns QHash<int, QString> Hash of tabindexes and title of unsaved tabs. */ - QHash<int, QString> unsavedDocuments() const; + [[nodiscard]] QHash<int, QString> unsavedDocuments() const; QTabWidget *tabWidget; /** Widget containing the tabs of the editor */ public slots: /** - * @details Return pointer to the currently activated tabpage. + * @details Return pointer to the currently activated text edit tab page. * */ - EditorPage *slotCurPage() const; + [[nodiscard]] EditorPage *slotCurPageTextEdit() const; + + /** + * @details Return pointer to the currently activated file treeview tab page. + * + */ + [[nodiscard]] FilePage *slotCurPageFileTreeView() const; /** * @details Insert a ">" at the begining of every line of current textedit. @@ -137,6 +144,11 @@ public slots: void slotNewHelpTab(const QString& title, const QString& path) const; /** + * New File Tab to do file operation + */ + void slotNewFileTab() const; + + /** * @details put a * in front of current tabs title, if current textedit is modified */ void slotShowModified() const; @@ -240,8 +252,7 @@ private slots: void slotSelectAll() const; protected: - // void dragEnterEvent(QDragEnterEvent *event); - // void dropEvent(QDropEvent* event); + /**************************************************************************************** * Name: saveFile * Description: Saves the content of currentTab to the file filename diff --git a/resource/COPYING b/resource/COPYING index b4e13b15..78af1af5 100644 --- a/resource/COPYING +++ b/resource/COPYING @@ -258,7 +258,7 @@ in one of these ways: (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a + dirModel, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no diff --git a/resource/conf/gpgfrontend.ini b/resource/conf/gpgfrontend.ini index 41285185..1fc723e4 100644 --- a/resource/conf/gpgfrontend.ini +++ b/resource/conf/gpgfrontend.ini @@ -3,7 +3,7 @@ keyServerList=http://keys.gnupg.net, https://keyserver.ubuntu.com, http://pool.s defaultKeyServer=https://keyserver.ubuntu.com [int] -lang=zh +lang=en_us [wizard] showWizard=true diff --git a/resource/ts/gpg_frontend_fr.ts b/resource/ts/gpg_frontend_fr.ts index 57983343..78ca3d4f 100644 --- a/resource/ts/gpg_frontend_fr.ts +++ b/resource/ts/gpg_frontend_fr.ts @@ -101,35 +101,35 @@ <context> <name>Attachments</name> <message> - <location filename="../../src/ui/Attachments.cpp" line="78"/> - <location filename="../../src/ui/Attachments.cpp" line="113"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="78"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="113"/> <source>Save File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="79"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="79"/> <source>Save this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="83"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="83"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="84"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="84"/> <source>Open this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="119"/> - <location filename="../../src/ui/Attachments.cpp" line="164"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="119"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="164"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="120"/> - <location filename="../../src/ui/Attachments.cpp" line="165"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="120"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="165"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> @@ -1307,16 +1307,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> - <source>Upload Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> - <source>Update Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="191"/> <source>Exporting private Key</source> <translation type="unfinished"></translation> @@ -1339,12 +1329,12 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Couldn't open %1 for writing</source> + <source>Export Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Export Error</source> + <source>Couldn't open %1 for writing</source> <translation type="unfinished"></translation> </message> <message> @@ -1352,6 +1342,16 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source>Never Expire</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> + <source>Upload Key Pair</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> + <source>Update Key Pair</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeyPairSubkeyTab</name> @@ -1697,6 +1697,29 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> + <source>Not Key Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> + <source>Timeout</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> + <source>Key Server Not Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> + <source>Connection Error</source> + <translation type="unfinished"></translation> + </message> + <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="233"/> <source><h4>CToo many responses from keyserver!</h4></source> <translation type="unfinished"></translation> @@ -1737,34 +1760,6 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> - <source>Upload Keys from Keyserver</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> - <source>Timeout</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> - <source>Not Key Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> - <source>Key Server Not Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> - <source>Connection Error</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="413"/> <source><h4>Key Updated</h4></source> <translation type="unfinished"></translation> @@ -1774,6 +1769,11 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source><h4>Key Imported</h4></source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> + <source>Upload Keys from Keyserver</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeySetExpireDateDialog</name> @@ -1875,546 +1875,546 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>MainWindow</name> <message> - <location filename="../../src/MainWindow.cpp" line="175"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="36"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="83"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="281"/> + <source>No Key Selected</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="43"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="90"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="288"/> + <source>Invalid Operation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="44"/> + <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="45"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="92"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="290"/> + <source><br/>For example the Following Key: <br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="91"/> + <source>The selected key contains a key that does not actually have a signature function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="289"/> + <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="54"/> + <source>There is one unencrypted file in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source>There are </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source> unencrypted files in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="30"/> <source>&New</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="181"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="36"/> <source>Open a new file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="184"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="39"/> <source>&Open...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="187"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="42"/> <source>Open an existing file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="190"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="45"/> <source>&Save</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="193"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="48"/> <source>Save the current File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="196"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="51"/> <source>Save &As</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="199"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="54"/> <source>Save the current File as...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="202"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="57"/> <source>&Print</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="205"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="60"/> <source>Print Document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="208"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="63"/> <source>&Close</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="210"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="65"/> <source>Close file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="213"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="68"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="216"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="71"/> <source>Quit Program</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="221"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="76"/> <source>&Undo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="223"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="78"/> <source>Undo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="226"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="81"/> <source>&Redo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="228"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="83"/> <source>Redo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="231"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="86"/> <source>Zoom In</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="235"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="90"/> <source>Zoom Out</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="239"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="94"/> <source>&Paste</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="242"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="97"/> <source>Paste Text From Clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="245"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="100"/> <source>Cu&t</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="248"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="103"/> <source>Cut the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="252"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="107"/> <source>&Copy</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="255"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="110"/> <source>Copy the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="259"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="114"/> <source>&Quote</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="261"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="116"/> <source>Quote whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="264"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="119"/> <source>Select &All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="267"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="122"/> <source>Select the whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="270"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="125"/> <source>&Find</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="272"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="127"/> <source>Find a word</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="275"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="130"/> <source>Remove &spacing</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="278"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="133"/> <source>Remove double linebreaks, e.g. in pasted text from webmailer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="281"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="136"/> <source>Se&ttings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="282"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="137"/> <source>Open settings dialog</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="288"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="143"/> <source>&Encrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="291"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="146"/> <source>Encrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="294"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="149"/> <source>&Encrypt &Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="297"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="152"/> <source>Encrypt and Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="300"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="155"/> <source>&Decrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="303"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="158"/> <source>Decrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="306"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="161"/> <source>&Decrypt &Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="309"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="164"/> <source>Decrypt and Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="315"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="170"/> <source>&Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="316"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="171"/> <source>Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="319"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="174"/> <source>&Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="320"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="175"/> <source>Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="323"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="178"/> <source>&Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="324"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="179"/> <source>Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="327"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="182"/> <source>&Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="328"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="183"/> <source>Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="332"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="187"/> <source>&Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="335"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="190"/> <source>Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="338"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="193"/> <source>&Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="341"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="196"/> <source>Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="347"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="202"/> <source>&Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="349"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="204"/> <source>Import New Key From Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="352"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="207"/> <source>Manage &keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="354"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="209"/> <source>Open Keymanagement</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="359"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="214"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="361"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="216"/> <source>Show the application's About box</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="364"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="219"/> <source>Open &Wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="365"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="220"/> <source>Open the wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="370"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="225"/> <source>Append Selected Key(s) To Text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="371"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="226"/> <source>Append The Selected Keys To Text in Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="374"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="229"/> <source>Copy EMail-address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="375"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="230"/> <source>Copy selected EMailaddress to clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="379"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="234"/> <source>Show Key Details</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="380"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="235"/> <source>Show Details for this Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="383"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="238"/> <source>Refresh Key From Key Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="384"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="239"/> <source>Refresh key from default key server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="387"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="242"/> <source>Upload Public Key(s) To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="388"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="243"/> <source>Upload The Selected Public Keys To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="402"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="257"/> <source>Remove PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="405"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="260"/> <source>Add PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="446"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="265"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="458"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="277"/> <source>&Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="476"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="295"/> <source>&File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="482"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="301"/> <source>&Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="493"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="312"/> <source>&Keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="494"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="313"/> <source>&Import Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="503"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="322"/> <source>&Steganography</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="512"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="331"/> <source>&View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="514"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="333"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="522"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="341"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="530"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="349"/> <source>Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="540"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="359"/> <source>Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="545"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="364"/> <source>Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="552"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="371"/> <source>Special Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="564"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="383"/> <source>Import key from...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="565"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="384"/> <source>Import key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="573"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="393"/> <source>Opera File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="574"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="394"/> <source>File Crypto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="592"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="412"/> <source>Ready</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="599"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="419"/> <source>Key ToolBox</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="607"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="427"/> <source>Information Board</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="627"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="447"/> <source>Attached files:</source> <translation type="unfinished"></translation> </message> - <message> - <location filename="../../src/MainWindow.cpp" line="690"/> - <source>There is one unencrypted file in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source>There are </source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source> unencrypted files in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="724"/> - <location filename="../../src/MainWindow.cpp" line="771"/> - <location filename="../../src/MainWindow.cpp" line="1074"/> - <source>No Key Selected</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="731"/> - <location filename="../../src/MainWindow.cpp" line="778"/> - <location filename="../../src/MainWindow.cpp" line="1081"/> - <source>Invalid Operation</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="732"/> - <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="733"/> - <location filename="../../src/MainWindow.cpp" line="780"/> - <location filename="../../src/MainWindow.cpp" line="1083"/> - <source><br/>For example the Following Key: <br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="779"/> - <source>The selected key contains a key that does not actually have a signature function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="1082"/> - <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>MimeTab</name> @@ -2717,56 +2717,56 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>TextEdit</name> <message> - <location filename="../../src/ui/TextEdit.cpp" line="49"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="49"/> <source>untitled</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="68"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="76"/> <source>Open file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="93"/> - <location filename="../../src/ui/TextEdit.cpp" line="371"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="101"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="379"/> <source>Application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="94"/> - <location filename="../../src/ui/TextEdit.cpp" line="372"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="102"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="380"/> <source>Cannot read file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="143"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="151"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="144"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="152"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="165"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="173"/> <source>Save file </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="229"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="237"/> <source>Unsaved document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="230"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="238"/> <source><h3>The document "%1" has been modified.<br/>Do you want to save your changes?</h3></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="232"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="240"/> <source><b>Note:</b> If you don't save these files, all changes are lost.<br/></source> <translation type="unfinished"></translation> </message> diff --git a/resource/ts/gpg_frontend_ru.ts b/resource/ts/gpg_frontend_ru.ts index 16f73ce5..370d406c 100644 --- a/resource/ts/gpg_frontend_ru.ts +++ b/resource/ts/gpg_frontend_ru.ts @@ -101,35 +101,35 @@ <context> <name>Attachments</name> <message> - <location filename="../../src/ui/Attachments.cpp" line="78"/> - <location filename="../../src/ui/Attachments.cpp" line="113"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="78"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="113"/> <source>Save File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="79"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="79"/> <source>Save this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="83"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="83"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="84"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="84"/> <source>Open this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="119"/> - <location filename="../../src/ui/Attachments.cpp" line="164"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="119"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="164"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="120"/> - <location filename="../../src/ui/Attachments.cpp" line="165"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="120"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="165"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> @@ -1307,16 +1307,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> - <source>Upload Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> - <source>Update Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="191"/> <source>Exporting private Key</source> <translation type="unfinished"></translation> @@ -1339,12 +1329,12 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Couldn't open %1 for writing</source> + <source>Export Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Export Error</source> + <source>Couldn't open %1 for writing</source> <translation type="unfinished"></translation> </message> <message> @@ -1352,6 +1342,16 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source>Never Expire</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> + <source>Upload Key Pair</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> + <source>Update Key Pair</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeyPairSubkeyTab</name> @@ -1697,6 +1697,29 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> + <source>Not Key Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> + <source>Timeout</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> + <source>Key Server Not Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> + <source>Connection Error</source> + <translation type="unfinished"></translation> + </message> + <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="233"/> <source><h4>CToo many responses from keyserver!</h4></source> <translation type="unfinished"></translation> @@ -1737,34 +1760,6 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> - <source>Upload Keys from Keyserver</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> - <source>Timeout</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> - <source>Not Key Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> - <source>Key Server Not Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> - <source>Connection Error</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="413"/> <source><h4>Key Updated</h4></source> <translation type="unfinished"></translation> @@ -1774,6 +1769,11 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source><h4>Key Imported</h4></source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> + <source>Upload Keys from Keyserver</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeySetExpireDateDialog</name> @@ -1875,546 +1875,546 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>MainWindow</name> <message> - <location filename="../../src/MainWindow.cpp" line="175"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="36"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="83"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="281"/> + <source>No Key Selected</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="43"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="90"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="288"/> + <source>Invalid Operation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="44"/> + <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="45"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="92"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="290"/> + <source><br/>For example the Following Key: <br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="91"/> + <source>The selected key contains a key that does not actually have a signature function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="289"/> + <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="54"/> + <source>There is one unencrypted file in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source>There are </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source> unencrypted files in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="30"/> <source>&New</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="181"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="36"/> <source>Open a new file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="184"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="39"/> <source>&Open...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="187"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="42"/> <source>Open an existing file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="190"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="45"/> <source>&Save</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="193"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="48"/> <source>Save the current File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="196"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="51"/> <source>Save &As</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="199"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="54"/> <source>Save the current File as...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="202"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="57"/> <source>&Print</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="205"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="60"/> <source>Print Document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="208"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="63"/> <source>&Close</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="210"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="65"/> <source>Close file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="213"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="68"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="216"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="71"/> <source>Quit Program</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="221"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="76"/> <source>&Undo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="223"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="78"/> <source>Undo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="226"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="81"/> <source>&Redo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="228"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="83"/> <source>Redo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="231"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="86"/> <source>Zoom In</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="235"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="90"/> <source>Zoom Out</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="239"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="94"/> <source>&Paste</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="242"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="97"/> <source>Paste Text From Clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="245"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="100"/> <source>Cu&t</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="248"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="103"/> <source>Cut the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="252"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="107"/> <source>&Copy</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="255"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="110"/> <source>Copy the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="259"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="114"/> <source>&Quote</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="261"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="116"/> <source>Quote whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="264"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="119"/> <source>Select &All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="267"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="122"/> <source>Select the whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="270"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="125"/> <source>&Find</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="272"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="127"/> <source>Find a word</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="275"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="130"/> <source>Remove &spacing</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="278"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="133"/> <source>Remove double linebreaks, e.g. in pasted text from webmailer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="281"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="136"/> <source>Se&ttings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="282"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="137"/> <source>Open settings dialog</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="288"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="143"/> <source>&Encrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="291"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="146"/> <source>Encrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="294"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="149"/> <source>&Encrypt &Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="297"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="152"/> <source>Encrypt and Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="300"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="155"/> <source>&Decrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="303"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="158"/> <source>Decrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="306"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="161"/> <source>&Decrypt &Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="309"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="164"/> <source>Decrypt and Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="315"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="170"/> <source>&Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="316"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="171"/> <source>Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="319"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="174"/> <source>&Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="320"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="175"/> <source>Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="323"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="178"/> <source>&Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="324"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="179"/> <source>Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="327"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="182"/> <source>&Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="328"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="183"/> <source>Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="332"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="187"/> <source>&Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="335"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="190"/> <source>Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="338"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="193"/> <source>&Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="341"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="196"/> <source>Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="347"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="202"/> <source>&Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="349"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="204"/> <source>Import New Key From Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="352"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="207"/> <source>Manage &keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="354"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="209"/> <source>Open Keymanagement</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="359"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="214"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="361"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="216"/> <source>Show the application's About box</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="364"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="219"/> <source>Open &Wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="365"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="220"/> <source>Open the wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="370"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="225"/> <source>Append Selected Key(s) To Text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="371"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="226"/> <source>Append The Selected Keys To Text in Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="374"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="229"/> <source>Copy EMail-address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="375"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="230"/> <source>Copy selected EMailaddress to clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="379"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="234"/> <source>Show Key Details</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="380"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="235"/> <source>Show Details for this Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="383"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="238"/> <source>Refresh Key From Key Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="384"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="239"/> <source>Refresh key from default key server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="387"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="242"/> <source>Upload Public Key(s) To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="388"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="243"/> <source>Upload The Selected Public Keys To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="402"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="257"/> <source>Remove PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="405"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="260"/> <source>Add PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="446"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="265"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="458"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="277"/> <source>&Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="476"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="295"/> <source>&File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="482"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="301"/> <source>&Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="493"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="312"/> <source>&Keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="494"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="313"/> <source>&Import Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="503"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="322"/> <source>&Steganography</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="512"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="331"/> <source>&View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="514"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="333"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="522"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="341"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="530"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="349"/> <source>Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="540"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="359"/> <source>Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="545"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="364"/> <source>Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="552"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="371"/> <source>Special Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="564"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="383"/> <source>Import key from...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="565"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="384"/> <source>Import key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="573"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="393"/> <source>Opera File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="574"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="394"/> <source>File Crypto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="592"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="412"/> <source>Ready</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="599"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="419"/> <source>Key ToolBox</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="607"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="427"/> <source>Information Board</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="627"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="447"/> <source>Attached files:</source> <translation type="unfinished"></translation> </message> - <message> - <location filename="../../src/MainWindow.cpp" line="690"/> - <source>There is one unencrypted file in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source>There are </source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source> unencrypted files in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="724"/> - <location filename="../../src/MainWindow.cpp" line="771"/> - <location filename="../../src/MainWindow.cpp" line="1074"/> - <source>No Key Selected</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="731"/> - <location filename="../../src/MainWindow.cpp" line="778"/> - <location filename="../../src/MainWindow.cpp" line="1081"/> - <source>Invalid Operation</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="732"/> - <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="733"/> - <location filename="../../src/MainWindow.cpp" line="780"/> - <location filename="../../src/MainWindow.cpp" line="1083"/> - <source><br/>For example the Following Key: <br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="779"/> - <source>The selected key contains a key that does not actually have a signature function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="1082"/> - <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>MimeTab</name> @@ -2717,56 +2717,56 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>TextEdit</name> <message> - <location filename="../../src/ui/TextEdit.cpp" line="49"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="49"/> <source>untitled</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="68"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="76"/> <source>Open file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="93"/> - <location filename="../../src/ui/TextEdit.cpp" line="371"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="101"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="379"/> <source>Application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="94"/> - <location filename="../../src/ui/TextEdit.cpp" line="372"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="102"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="380"/> <source>Cannot read file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="143"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="151"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="144"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="152"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="165"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="173"/> <source>Save file </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="229"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="237"/> <source>Unsaved document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="230"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="238"/> <source><h3>The document "%1" has been modified.<br/>Do you want to save your changes?</h3></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="232"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="240"/> <source><b>Note:</b> If you don't save these files, all changes are lost.<br/></source> <translation type="unfinished"></translation> </message> diff --git a/resource/ts/gpgfrontend_en_us.ts b/resource/ts/gpgfrontend_en_us.ts index ac4ccb41..09ec9879 100644 --- a/resource/ts/gpgfrontend_en_us.ts +++ b/resource/ts/gpgfrontend_en_us.ts @@ -101,35 +101,35 @@ <context> <name>Attachments</name> <message> - <location filename="../../src/ui/Attachments.cpp" line="78"/> - <location filename="../../src/ui/Attachments.cpp" line="113"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="78"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="113"/> <source>Save File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="79"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="79"/> <source>Save this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="83"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="83"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="84"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="84"/> <source>Open this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="119"/> - <location filename="../../src/ui/Attachments.cpp" line="164"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="119"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="164"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="120"/> - <location filename="../../src/ui/Attachments.cpp" line="165"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="120"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="165"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> @@ -1307,16 +1307,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> - <source>Upload Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> - <source>Update Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="191"/> <source>Exporting private Key</source> <translation type="unfinished"></translation> @@ -1339,12 +1329,12 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Couldn't open %1 for writing</source> + <source>Export Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Export Error</source> + <source>Couldn't open %1 for writing</source> <translation type="unfinished"></translation> </message> <message> @@ -1352,6 +1342,16 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source>Never Expire</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> + <source>Upload Key Pair</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> + <source>Update Key Pair</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeyPairSubkeyTab</name> @@ -1697,6 +1697,29 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> + <source>Not Key Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> + <source>Timeout</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> + <source>Key Server Not Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> + <source>Connection Error</source> + <translation type="unfinished"></translation> + </message> + <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="233"/> <source><h4>CToo many responses from keyserver!</h4></source> <translation type="unfinished"></translation> @@ -1737,34 +1760,6 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> - <source>Upload Keys from Keyserver</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> - <source>Timeout</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> - <source>Not Key Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> - <source>Key Server Not Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> - <source>Connection Error</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="413"/> <source><h4>Key Updated</h4></source> <translation type="unfinished"></translation> @@ -1774,6 +1769,11 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source><h4>Key Imported</h4></source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> + <source>Upload Keys from Keyserver</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeySetExpireDateDialog</name> @@ -1875,546 +1875,546 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>MainWindow</name> <message> - <location filename="../../src/MainWindow.cpp" line="175"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="36"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="83"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="281"/> + <source>No Key Selected</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="43"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="90"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="288"/> + <source>Invalid Operation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="44"/> + <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="45"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="92"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="290"/> + <source><br/>For example the Following Key: <br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="91"/> + <source>The selected key contains a key that does not actually have a signature function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="289"/> + <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="54"/> + <source>There is one unencrypted file in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source>There are </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source> unencrypted files in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="30"/> <source>&New</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="181"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="36"/> <source>Open a new file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="184"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="39"/> <source>&Open...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="187"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="42"/> <source>Open an existing file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="190"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="45"/> <source>&Save</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="193"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="48"/> <source>Save the current File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="196"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="51"/> <source>Save &As</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="199"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="54"/> <source>Save the current File as...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="202"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="57"/> <source>&Print</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="205"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="60"/> <source>Print Document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="208"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="63"/> <source>&Close</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="210"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="65"/> <source>Close file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="213"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="68"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="216"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="71"/> <source>Quit Program</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="221"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="76"/> <source>&Undo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="223"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="78"/> <source>Undo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="226"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="81"/> <source>&Redo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="228"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="83"/> <source>Redo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="231"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="86"/> <source>Zoom In</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="235"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="90"/> <source>Zoom Out</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="239"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="94"/> <source>&Paste</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="242"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="97"/> <source>Paste Text From Clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="245"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="100"/> <source>Cu&t</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="248"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="103"/> <source>Cut the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="252"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="107"/> <source>&Copy</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="255"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="110"/> <source>Copy the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="259"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="114"/> <source>&Quote</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="261"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="116"/> <source>Quote whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="264"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="119"/> <source>Select &All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="267"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="122"/> <source>Select the whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="270"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="125"/> <source>&Find</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="272"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="127"/> <source>Find a word</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="275"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="130"/> <source>Remove &spacing</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="278"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="133"/> <source>Remove double linebreaks, e.g. in pasted text from webmailer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="281"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="136"/> <source>Se&ttings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="282"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="137"/> <source>Open settings dialog</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="288"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="143"/> <source>&Encrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="291"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="146"/> <source>Encrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="294"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="149"/> <source>&Encrypt &Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="297"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="152"/> <source>Encrypt and Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="300"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="155"/> <source>&Decrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="303"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="158"/> <source>Decrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="306"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="161"/> <source>&Decrypt &Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="309"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="164"/> <source>Decrypt and Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="315"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="170"/> <source>&Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="316"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="171"/> <source>Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="319"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="174"/> <source>&Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="320"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="175"/> <source>Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="323"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="178"/> <source>&Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="324"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="179"/> <source>Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="327"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="182"/> <source>&Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="328"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="183"/> <source>Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="332"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="187"/> <source>&Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="335"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="190"/> <source>Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="338"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="193"/> <source>&Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="341"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="196"/> <source>Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="347"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="202"/> <source>&Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="349"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="204"/> <source>Import New Key From Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="352"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="207"/> <source>Manage &keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="354"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="209"/> <source>Open Keymanagement</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="359"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="214"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="361"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="216"/> <source>Show the application's About box</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="364"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="219"/> <source>Open &Wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="365"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="220"/> <source>Open the wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="370"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="225"/> <source>Append Selected Key(s) To Text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="371"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="226"/> <source>Append The Selected Keys To Text in Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="374"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="229"/> <source>Copy EMail-address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="375"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="230"/> <source>Copy selected EMailaddress to clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="379"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="234"/> <source>Show Key Details</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="380"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="235"/> <source>Show Details for this Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="383"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="238"/> <source>Refresh Key From Key Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="384"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="239"/> <source>Refresh key from default key server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="387"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="242"/> <source>Upload Public Key(s) To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="388"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="243"/> <source>Upload The Selected Public Keys To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="402"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="257"/> <source>Remove PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="405"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="260"/> <source>Add PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="446"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="265"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="458"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="277"/> <source>&Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="476"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="295"/> <source>&File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="482"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="301"/> <source>&Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="493"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="312"/> <source>&Keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="494"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="313"/> <source>&Import Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="503"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="322"/> <source>&Steganography</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="512"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="331"/> <source>&View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="514"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="333"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="522"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="341"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="530"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="349"/> <source>Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="540"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="359"/> <source>Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="545"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="364"/> <source>Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="552"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="371"/> <source>Special Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="564"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="383"/> <source>Import key from...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="565"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="384"/> <source>Import key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="573"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="393"/> <source>Opera File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="574"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="394"/> <source>File Crypto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="592"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="412"/> <source>Ready</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="599"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="419"/> <source>Key ToolBox</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="607"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="427"/> <source>Information Board</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="627"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="447"/> <source>Attached files:</source> <translation type="unfinished"></translation> </message> - <message> - <location filename="../../src/MainWindow.cpp" line="690"/> - <source>There is one unencrypted file in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source>There are </source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source> unencrypted files in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="724"/> - <location filename="../../src/MainWindow.cpp" line="771"/> - <location filename="../../src/MainWindow.cpp" line="1074"/> - <source>No Key Selected</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="731"/> - <location filename="../../src/MainWindow.cpp" line="778"/> - <location filename="../../src/MainWindow.cpp" line="1081"/> - <source>Invalid Operation</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="732"/> - <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="733"/> - <location filename="../../src/MainWindow.cpp" line="780"/> - <location filename="../../src/MainWindow.cpp" line="1083"/> - <source><br/>For example the Following Key: <br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="779"/> - <source>The selected key contains a key that does not actually have a signature function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="1082"/> - <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>MimeTab</name> @@ -2717,56 +2717,56 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>TextEdit</name> <message> - <location filename="../../src/ui/TextEdit.cpp" line="49"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="49"/> <source>untitled</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="68"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="76"/> <source>Open file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="93"/> - <location filename="../../src/ui/TextEdit.cpp" line="371"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="101"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="379"/> <source>Application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="94"/> - <location filename="../../src/ui/TextEdit.cpp" line="372"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="102"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="380"/> <source>Cannot read file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="143"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="151"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="144"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="152"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="165"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="173"/> <source>Save file </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="229"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="237"/> <source>Unsaved document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="230"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="238"/> <source><h3>The document "%1" has been modified.<br/>Do you want to save your changes?</h3></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="232"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="240"/> <source><b>Note:</b> If you don't save these files, all changes are lost.<br/></source> <translation type="unfinished"></translation> </message> diff --git a/resource/ts/gpgfrontend_zh_chs.ts b/resource/ts/gpgfrontend_zh_chs.ts index cade93a5..c6722829 100644 --- a/resource/ts/gpgfrontend_zh_chs.ts +++ b/resource/ts/gpgfrontend_zh_chs.ts @@ -101,35 +101,35 @@ <context> <name>Attachments</name> <message> - <location filename="../../src/ui/Attachments.cpp" line="78"/> - <location filename="../../src/ui/Attachments.cpp" line="113"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="78"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="113"/> <source>Save File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="79"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="79"/> <source>Save this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="83"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="83"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="84"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="84"/> <source>Open this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="119"/> - <location filename="../../src/ui/Attachments.cpp" line="164"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="119"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="164"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="120"/> - <location filename="../../src/ui/Attachments.cpp" line="165"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="120"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="165"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> @@ -1307,16 +1307,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> - <source>Upload Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> - <source>Update Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="191"/> <source>Exporting private Key</source> <translation type="unfinished"></translation> @@ -1339,12 +1329,12 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Couldn't open %1 for writing</source> + <source>Export Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Export Error</source> + <source>Couldn't open %1 for writing</source> <translation type="unfinished"></translation> </message> <message> @@ -1352,6 +1342,16 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source>Never Expire</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> + <source>Upload Key Pair</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> + <source>Update Key Pair</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeyPairSubkeyTab</name> @@ -1697,6 +1697,29 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> + <source>Not Key Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> + <source>Timeout</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> + <source>Key Server Not Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> + <source>Connection Error</source> + <translation type="unfinished"></translation> + </message> + <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="233"/> <source><h4>CToo many responses from keyserver!</h4></source> <translation type="unfinished"></translation> @@ -1737,34 +1760,6 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> - <source>Upload Keys from Keyserver</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> - <source>Timeout</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> - <source>Not Key Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> - <source>Key Server Not Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> - <source>Connection Error</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="413"/> <source><h4>Key Updated</h4></source> <translation type="unfinished"></translation> @@ -1774,6 +1769,11 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source><h4>Key Imported</h4></source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> + <source>Upload Keys from Keyserver</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeySetExpireDateDialog</name> @@ -1875,546 +1875,546 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>MainWindow</name> <message> - <location filename="../../src/MainWindow.cpp" line="175"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="36"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="83"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="281"/> + <source>No Key Selected</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="43"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="90"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="288"/> + <source>Invalid Operation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="44"/> + <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="45"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="92"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="290"/> + <source><br/>For example the Following Key: <br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="91"/> + <source>The selected key contains a key that does not actually have a signature function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="289"/> + <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="54"/> + <source>There is one unencrypted file in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source>There are </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source> unencrypted files in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="30"/> <source>&New</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="181"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="36"/> <source>Open a new file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="184"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="39"/> <source>&Open...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="187"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="42"/> <source>Open an existing file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="190"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="45"/> <source>&Save</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="193"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="48"/> <source>Save the current File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="196"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="51"/> <source>Save &As</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="199"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="54"/> <source>Save the current File as...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="202"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="57"/> <source>&Print</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="205"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="60"/> <source>Print Document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="208"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="63"/> <source>&Close</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="210"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="65"/> <source>Close file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="213"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="68"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="216"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="71"/> <source>Quit Program</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="221"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="76"/> <source>&Undo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="223"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="78"/> <source>Undo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="226"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="81"/> <source>&Redo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="228"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="83"/> <source>Redo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="231"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="86"/> <source>Zoom In</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="235"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="90"/> <source>Zoom Out</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="239"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="94"/> <source>&Paste</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="242"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="97"/> <source>Paste Text From Clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="245"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="100"/> <source>Cu&t</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="248"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="103"/> <source>Cut the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="252"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="107"/> <source>&Copy</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="255"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="110"/> <source>Copy the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="259"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="114"/> <source>&Quote</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="261"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="116"/> <source>Quote whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="264"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="119"/> <source>Select &All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="267"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="122"/> <source>Select the whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="270"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="125"/> <source>&Find</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="272"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="127"/> <source>Find a word</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="275"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="130"/> <source>Remove &spacing</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="278"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="133"/> <source>Remove double linebreaks, e.g. in pasted text from webmailer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="281"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="136"/> <source>Se&ttings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="282"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="137"/> <source>Open settings dialog</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="288"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="143"/> <source>&Encrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="291"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="146"/> <source>Encrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="294"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="149"/> <source>&Encrypt &Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="297"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="152"/> <source>Encrypt and Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="300"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="155"/> <source>&Decrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="303"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="158"/> <source>Decrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="306"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="161"/> <source>&Decrypt &Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="309"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="164"/> <source>Decrypt and Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="315"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="170"/> <source>&Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="316"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="171"/> <source>Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="319"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="174"/> <source>&Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="320"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="175"/> <source>Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="323"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="178"/> <source>&Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="324"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="179"/> <source>Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="327"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="182"/> <source>&Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="328"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="183"/> <source>Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="332"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="187"/> <source>&Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="335"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="190"/> <source>Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="338"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="193"/> <source>&Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="341"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="196"/> <source>Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="347"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="202"/> <source>&Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="349"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="204"/> <source>Import New Key From Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="352"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="207"/> <source>Manage &keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="354"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="209"/> <source>Open Keymanagement</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="359"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="214"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="361"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="216"/> <source>Show the application's About box</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="364"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="219"/> <source>Open &Wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="365"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="220"/> <source>Open the wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="370"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="225"/> <source>Append Selected Key(s) To Text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="371"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="226"/> <source>Append The Selected Keys To Text in Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="374"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="229"/> <source>Copy EMail-address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="375"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="230"/> <source>Copy selected EMailaddress to clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="379"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="234"/> <source>Show Key Details</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="380"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="235"/> <source>Show Details for this Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="383"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="238"/> <source>Refresh Key From Key Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="384"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="239"/> <source>Refresh key from default key server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="387"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="242"/> <source>Upload Public Key(s) To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="388"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="243"/> <source>Upload The Selected Public Keys To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="402"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="257"/> <source>Remove PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="405"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="260"/> <source>Add PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="446"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="265"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="458"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="277"/> <source>&Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="476"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="295"/> <source>&File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="482"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="301"/> <source>&Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="493"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="312"/> <source>&Keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="494"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="313"/> <source>&Import Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="503"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="322"/> <source>&Steganography</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="512"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="331"/> <source>&View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="514"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="333"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="522"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="341"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="530"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="349"/> <source>Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="540"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="359"/> <source>Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="545"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="364"/> <source>Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="552"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="371"/> <source>Special Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="564"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="383"/> <source>Import key from...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="565"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="384"/> <source>Import key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="573"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="393"/> <source>Opera File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="574"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="394"/> <source>File Crypto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="592"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="412"/> <source>Ready</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="599"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="419"/> <source>Key ToolBox</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="607"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="427"/> <source>Information Board</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="627"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="447"/> <source>Attached files:</source> <translation type="unfinished"></translation> </message> - <message> - <location filename="../../src/MainWindow.cpp" line="690"/> - <source>There is one unencrypted file in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source>There are </source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source> unencrypted files in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="724"/> - <location filename="../../src/MainWindow.cpp" line="771"/> - <location filename="../../src/MainWindow.cpp" line="1074"/> - <source>No Key Selected</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="731"/> - <location filename="../../src/MainWindow.cpp" line="778"/> - <location filename="../../src/MainWindow.cpp" line="1081"/> - <source>Invalid Operation</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="732"/> - <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="733"/> - <location filename="../../src/MainWindow.cpp" line="780"/> - <location filename="../../src/MainWindow.cpp" line="1083"/> - <source><br/>For example the Following Key: <br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="779"/> - <source>The selected key contains a key that does not actually have a signature function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="1082"/> - <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>MimeTab</name> @@ -2717,56 +2717,56 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>TextEdit</name> <message> - <location filename="../../src/ui/TextEdit.cpp" line="49"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="49"/> <source>untitled</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="68"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="76"/> <source>Open file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="93"/> - <location filename="../../src/ui/TextEdit.cpp" line="371"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="101"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="379"/> <source>Application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="94"/> - <location filename="../../src/ui/TextEdit.cpp" line="372"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="102"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="380"/> <source>Cannot read file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="143"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="151"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="144"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="152"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="165"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="173"/> <source>Save file </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="229"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="237"/> <source>Unsaved document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="230"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="238"/> <source><h3>The document "%1" has been modified.<br/>Do you want to save your changes?</h3></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="232"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="240"/> <source><b>Note:</b> If you don't save these files, all changes are lost.<br/></source> <translation type="unfinished"></translation> </message> diff --git a/resource/ts/gpgfrontend_zh_cht.ts b/resource/ts/gpgfrontend_zh_cht.ts index cade93a5..c6722829 100644 --- a/resource/ts/gpgfrontend_zh_cht.ts +++ b/resource/ts/gpgfrontend_zh_cht.ts @@ -101,35 +101,35 @@ <context> <name>Attachments</name> <message> - <location filename="../../src/ui/Attachments.cpp" line="78"/> - <location filename="../../src/ui/Attachments.cpp" line="113"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="78"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="113"/> <source>Save File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="79"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="79"/> <source>Save this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="83"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="83"/> <source>Open File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="84"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="84"/> <source>Open this file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="119"/> - <location filename="../../src/ui/Attachments.cpp" line="164"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="119"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="164"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/Attachments.cpp" line="120"/> - <location filename="../../src/ui/Attachments.cpp" line="165"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="120"/> + <location filename="../../src/ui/widgets/Attachments.cpp" line="165"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> @@ -1307,16 +1307,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> - <source>Upload Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> - <source>Update Key Pair</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="191"/> <source>Exporting private Key</source> <translation type="unfinished"></translation> @@ -1339,12 +1329,12 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Couldn't open %1 for writing</source> + <source>Export Error</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="208"/> - <source>Export Error</source> + <source>Couldn't open %1 for writing</source> <translation type="unfinished"></translation> </message> <message> @@ -1352,6 +1342,16 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source>Never Expire</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="298"/> + <source>Upload Key Pair</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/keypair_details/KeyPairDetailTab.cpp" line="300"/> + <source>Update Key Pair</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeyPairSubkeyTab</name> @@ -1697,6 +1697,29 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> + <source>Not Key Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> + <source>Timeout</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> + <source>Key Server Not Found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> + <source>Connection Error</source> + <translation type="unfinished"></translation> + </message> + <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="233"/> <source><h4>CToo many responses from keyserver!</h4></source> <translation type="unfinished"></translation> @@ -1737,34 +1760,6 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> - <source>Upload Keys from Keyserver</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="219"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="389"/> - <source>Timeout</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="216"/> - <source>Not Key Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="222"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="392"/> - <source>Key Server Not Found</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="225"/> - <location filename="../../src/ui/KeyServerImportDialog.cpp" line="395"/> - <source>Connection Error</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../../src/ui/KeyServerImportDialog.cpp" line="413"/> <source><h4>Key Updated</h4></source> <translation type="unfinished"></translation> @@ -1774,6 +1769,11 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <source><h4>Key Imported</h4></source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../../src/ui/KeyServerImportDialog.cpp" line="476"/> + <source>Upload Keys from Keyserver</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>KeySetExpireDateDialog</name> @@ -1875,546 +1875,546 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>MainWindow</name> <message> - <location filename="../../src/MainWindow.cpp" line="175"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="36"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="83"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="281"/> + <source>No Key Selected</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="43"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="90"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="288"/> + <source>Invalid Operation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="44"/> + <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="45"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="92"/> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="290"/> + <source><br/>For example the Following Key: <br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="91"/> + <source>The selected key contains a key that does not actually have a signature function.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotFunction.cpp" line="289"/> + <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="54"/> + <source>There is one unencrypted file in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source>There are </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowSlotUI.cpp" line="56"/> + <source> unencrypted files in attachment folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="30"/> <source>&New</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="181"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="36"/> <source>Open a new file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="184"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="39"/> <source>&Open...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="187"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="42"/> <source>Open an existing file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="190"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="45"/> <source>&Save</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="193"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="48"/> <source>Save the current File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="196"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="51"/> <source>Save &As</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="199"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="54"/> <source>Save the current File as...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="202"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="57"/> <source>&Print</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="205"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="60"/> <source>Print Document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="208"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="63"/> <source>&Close</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="210"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="65"/> <source>Close file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="213"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="68"/> <source>&Quit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="216"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="71"/> <source>Quit Program</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="221"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="76"/> <source>&Undo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="223"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="78"/> <source>Undo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="226"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="81"/> <source>&Redo</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="228"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="83"/> <source>Redo Last Edit Action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="231"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="86"/> <source>Zoom In</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="235"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="90"/> <source>Zoom Out</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="239"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="94"/> <source>&Paste</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="242"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="97"/> <source>Paste Text From Clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="245"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="100"/> <source>Cu&t</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="248"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="103"/> <source>Cut the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="252"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="107"/> <source>&Copy</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="255"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="110"/> <source>Copy the current selection's contents to the clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="259"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="114"/> <source>&Quote</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="261"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="116"/> <source>Quote whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="264"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="119"/> <source>Select &All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="267"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="122"/> <source>Select the whole text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="270"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="125"/> <source>&Find</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="272"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="127"/> <source>Find a word</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="275"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="130"/> <source>Remove &spacing</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="278"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="133"/> <source>Remove double linebreaks, e.g. in pasted text from webmailer</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="281"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="136"/> <source>Se&ttings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="282"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="137"/> <source>Open settings dialog</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="288"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="143"/> <source>&Encrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="291"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="146"/> <source>Encrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="294"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="149"/> <source>&Encrypt &Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="297"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="152"/> <source>Encrypt and Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="300"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="155"/> <source>&Decrypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="303"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="158"/> <source>Decrypt Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="306"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="161"/> <source>&Decrypt &Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="309"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="164"/> <source>Decrypt and Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="315"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="170"/> <source>&Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="316"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="171"/> <source>Encrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="319"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="174"/> <source>&Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="320"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="175"/> <source>Decrypt File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="323"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="178"/> <source>&Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="324"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="179"/> <source>Sign File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="327"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="182"/> <source>&Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="328"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="183"/> <source>Verify File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="332"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="187"/> <source>&Sign</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="335"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="190"/> <source>Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="338"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="193"/> <source>&Verify</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="341"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="196"/> <source>Verify Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="347"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="202"/> <source>&Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="349"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="204"/> <source>Import New Key From Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="352"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="207"/> <source>Manage &keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="354"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="209"/> <source>Open Keymanagement</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="359"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="214"/> <source>&About</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="361"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="216"/> <source>Show the application's About box</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="364"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="219"/> <source>Open &Wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="365"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="220"/> <source>Open the wizard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="370"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="225"/> <source>Append Selected Key(s) To Text</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="371"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="226"/> <source>Append The Selected Keys To Text in Editor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="374"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="229"/> <source>Copy EMail-address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="375"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="230"/> <source>Copy selected EMailaddress to clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="379"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="234"/> <source>Show Key Details</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="380"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="235"/> <source>Show Details for this Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="383"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="238"/> <source>Refresh Key From Key Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="384"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="239"/> <source>Refresh key from default key server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="387"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="242"/> <source>Upload Public Key(s) To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="388"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="243"/> <source>Upload The Selected Public Keys To Server</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="402"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="257"/> <source>Remove PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="405"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="260"/> <source>Add PGP Header</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="446"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="265"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="458"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="277"/> <source>&Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="476"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="295"/> <source>&File...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="482"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="301"/> <source>&Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="493"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="312"/> <source>&Keys</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="494"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="313"/> <source>&Import Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="503"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="322"/> <source>&Steganography</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="512"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="331"/> <source>&View</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="514"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="333"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="522"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="341"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="530"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="349"/> <source>Crypt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="540"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="359"/> <source>Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="545"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="364"/> <source>Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="552"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="371"/> <source>Special Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="564"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="383"/> <source>Import key from...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="565"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="384"/> <source>Import key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="573"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="393"/> <source>Opera File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="574"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="394"/> <source>File Crypto</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="592"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="412"/> <source>Ready</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="599"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="419"/> <source>Key ToolBox</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="607"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="427"/> <source>Information Board</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/MainWindow.cpp" line="627"/> + <location filename="../../src/ui/main_window/MainWindowUI.cpp" line="447"/> <source>Attached files:</source> <translation type="unfinished"></translation> </message> - <message> - <location filename="../../src/MainWindow.cpp" line="690"/> - <source>There is one unencrypted file in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source>There are </source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="692"/> - <source> unencrypted files in attachment folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="724"/> - <location filename="../../src/MainWindow.cpp" line="771"/> - <location filename="../../src/MainWindow.cpp" line="1074"/> - <source>No Key Selected</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="731"/> - <location filename="../../src/MainWindow.cpp" line="778"/> - <location filename="../../src/MainWindow.cpp" line="1081"/> - <source>Invalid Operation</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="732"/> - <source>The selected key contains a key that does not actually have a encrypt function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="733"/> - <location filename="../../src/MainWindow.cpp" line="780"/> - <location filename="../../src/MainWindow.cpp" line="1083"/> - <source><br/>For example the Following Key: <br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="779"/> - <source>The selected key contains a key that does not actually have a signature function.<br/></source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../src/MainWindow.cpp" line="1082"/> - <source>The selected key cannot be used for signing and encryption at the same time.<br/></source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>MimeTab</name> @@ -2717,56 +2717,56 @@ This is NOT your Public Key, so DON'T give it away.<br />Do you REALL <context> <name>TextEdit</name> <message> - <location filename="../../src/ui/TextEdit.cpp" line="49"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="49"/> <source>untitled</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="68"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="76"/> <source>Open file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="93"/> - <location filename="../../src/ui/TextEdit.cpp" line="371"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="101"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="379"/> <source>Application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="94"/> - <location filename="../../src/ui/TextEdit.cpp" line="372"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="102"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="380"/> <source>Cannot read file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="143"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="151"/> <source>File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="144"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="152"/> <source>Cannot write file %1: %2.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="165"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="173"/> <source>Save file </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="229"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="237"/> <source>Unsaved document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="230"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="238"/> <source><h3>The document "%1" has been modified.<br/>Do you want to save your changes?</h3></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../src/ui/TextEdit.cpp" line="232"/> + <location filename="../../src/ui/widgets/TextEdit.cpp" line="240"/> <source><b>Note:</b> If you don't save these files, all changes are lost.<br/></source> <translation type="unfinished"></translation> </message> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1cc424ca..1a3d2860 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,12 +10,20 @@ set_property(SOURCE gpgfrontend.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_SOURCE file(GLOB_RECURSE GPGFRONTEND_HEADER_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/include/*.h) -qt5_wrap_cpp(QT5_MOCS ${GPGFRONTEND_HEADER_FILES} TARGET gpgfrontend) +qt5_wrap_cpp(QT5_MOCS ${GPGFRONTEND_HEADER_FILES} TARGET ${AppName}) # Set Binary Output Path set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release) message(STATUS "CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") +# Set Resource Output Path +if(APPLE) + set(RESOURCE_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Resources) +else() + set(RESOURCE_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +endif() +message(STATUS "RESOURCE_OUTPUT_DIRECTORY ${RESOURCE_OUTPUT_DIRECTORY}") + # Get ALL SOURCE FILES file(GLOB_RECURSE ALL_SOURCE_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/src/*.cpp) @@ -23,7 +31,7 @@ file(GLOB_RECURSE ALL_SOURCE_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/src/*.cpp) set(QT_TS_FILES gpgfrontend_en_us.ts gpgfrontend_zh_chs.ts gpgfrontend_zh_cht.ts gpg_frontend_fr.ts gpg_frontend_ru.ts) list(TRANSFORM QT_TS_FILES PREPEND ${CMAKE_SOURCE_DIR}/resource/ts/) message(STATUS "QT_TS_FILES ${QT_TS_FILES}") -set(QT_QM_FILES_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ts) +set(QT_QM_FILES_OUTPUT_DIR ${RESOURCE_OUTPUT_DIRECTORY}/ts) set_source_files_properties(${QT_TS_FILES} PROPERTIES OUTPUT_LOCATION ${QT_QM_FILES_OUTPUT_DIR}) QT5_create_translation(QON_QM_FILES ${CMAKE_SOURCE_DIR} ${QT_TS_FILES}) message(STATUS "QON_QM_FILES ${QON_QM_FILES}") @@ -33,9 +41,15 @@ add_custom_target(translations DEPENDS ${QON_QM_FILES}) configure_file(${CMAKE_SOURCE_DIR}/include/GpgFrontend.h.in ${CMAKE_SOURCE_DIR}/include/GpgFrontend.h @ONLY) # Copy Resource Files -file(COPY ${CMAKE_SOURCE_DIR}/resource/css DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) -file(COPY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) -file(COPY ${CMAKE_SOURCE_DIR}/resource/conf DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) +file(COPY ${CMAKE_SOURCE_DIR}/resource/css DESTINATION ${RESOURCE_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) +file(COPY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION ${RESOURCE_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) +file(COPY ${CMAKE_SOURCE_DIR}/resource/conf DESTINATION ${RESOURCE_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + +if(APPLE) + file(COPY ${CMAKE_SOURCE_DIR}/gpgfrontend.icns DESTINATION ${RESOURCE_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + # Refresh App Bundle + file(REMOVE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${AppName}.app) +endif() # Copy Utils Files if(MINGW) @@ -54,22 +68,45 @@ set(RESOURCE_FILES ${CMAKE_SOURCE_DIR}/gpgfrontend.qrc ${APP_ICON_RESOURCE_WINDO add_custom_target(resources ALL DEPENDS ${RESOURCE_FILES}) add_dependencies(resources translations) -if((${CMAKE_BUILD_TYPE} STREQUAL "Release") AND (MINGW)) - add_executable(gpgfrontend WIN32 ${BASE_SOURCE} ${RESOURCE_FILES} ${QT5_MOCS}) +if(${CMAKE_BUILD_TYPE} STREQUAL "Release") + if(MINGW) + add_executable(${AppName} WIN32 ${BASE_SOURCE} ${RESOURCE_FILES} ${QT5_MOCS}) + elseif(APPLE) + add_executable(${AppName} MACOSX_BUNDLE ${ICON_RESOURCE} ${BASE_SOURCE} ${RESOURCE_FILES} ${QT5_MOCS}) + set_target_properties(${AppName} PROPERTIES + BUNDLE True + MACOSX_BUNDLE_GUI_IDENTIFIER org.gnupg.gpgfrontend + MACOSX_BUNDLE_BUNDLE_NAME ${AppName} + MACOSX_BUNDLE_LONG_VERSION_STRING ${BUILD_VERSION} + MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION} + MACOSX_BUNDLE_BUNDLE_VERSION ${BUILD_VERSION} + MACOSX_BUNDLE_ICON_FILE "gpgfrontend.icns" + ) + add_custom_command(TARGET ${AppName} POST_BUILD + COMMAND /bin/rm -rf ./${AppName}.app/Contents/Resources + WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + COMMENT "Deleting Resources IN App Bundle") + add_custom_command(TARGET ${AppName} POST_BUILD + COMMAND /bin/mv -n ./Resources ./${AppName}.app/Contents/ + WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + COMMENT "Copying Resources INTO App Bundle Resource") + else() + add_executable(${AppName} ${BASE_SOURCE} ${RESOURCE_FILES} ${QT5_MOCS}) + endif() else() - add_executable(gpgfrontend ${BASE_SOURCE} ${RESOURCE_FILES} ${QT5_MOCS}) + add_executable(${AppName} ${BASE_SOURCE} ${RESOURCE_FILES} ${QT5_MOCS}) endif() IF (MINGW) message(STATUS "Link Application Static Library For MINGW") - target_link_libraries(gpgfrontend + target_link_libraries(${AppName} gpgfrontend-ui gpg Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core) else() message(STATUS "Link Application Static Library For UNIX") - target_link_libraries(gpgfrontend + target_link_libraries(${AppName} gpgfrontend-ui gpg Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core) endif() diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 471de47d..67274a65 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -26,7 +26,7 @@ MainWindow::MainWindow() : appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { mCtx = new GpgME::GpgContext(); @@ -169,472 +169,6 @@ void MainWindow::saveSettings() { } } -void MainWindow::createActions() { - /* Main Menu - */ - newTabAct = new QAction(tr("&New"), this); - newTabAct->setIcon(QIcon(":misc_doc.png")); - QList<QKeySequence> newTabActShortcutList; - newTabActShortcutList.append(QKeySequence(Qt::CTRL + Qt::Key_N)); - newTabActShortcutList.append(QKeySequence(Qt::CTRL + Qt::Key_T)); - newTabAct->setShortcuts(newTabActShortcutList); - newTabAct->setToolTip(tr("Open a new file")); - connect(newTabAct, SIGNAL(triggered()), edit, SLOT(slotNewTab())); - - openAct = new QAction(tr("&Open..."), this); - openAct->setIcon(QIcon(":fileopen.png")); - openAct->setShortcut(QKeySequence::Open); - openAct->setToolTip(tr("Open an existing file")); - connect(openAct, SIGNAL(triggered()), edit, SLOT(slotOpen())); - - saveAct = new QAction(tr("&Save"), this); - saveAct->setIcon(QIcon(":filesave.png")); - saveAct->setShortcut(QKeySequence::Save); - saveAct->setToolTip(tr("Save the current File")); - connect(saveAct, SIGNAL(triggered()), edit, SLOT(slotSave())); - - saveAsAct = new QAction(tr("Save &As") + "...", this); - saveAsAct->setIcon(QIcon(":filesaveas.png")); - saveAsAct->setShortcut(QKeySequence::SaveAs); - saveAsAct->setToolTip(tr("Save the current File as...")); - connect(saveAsAct, SIGNAL(triggered()), edit, SLOT(slotSaveAs())); - - printAct = new QAction(tr("&Print"), this); - printAct->setIcon(QIcon(":fileprint.png")); - printAct->setShortcut(QKeySequence::Print); - printAct->setToolTip(tr("Print Document")); - connect(printAct, SIGNAL(triggered()), edit, SLOT(slotPrint())); - - closeTabAct = new QAction(tr("&Close"), this); - closeTabAct->setShortcut(QKeySequence::Close); - closeTabAct->setToolTip(tr("Close file")); - connect(closeTabAct, SIGNAL(triggered()), edit, SLOT(slotCloseTab())); - - quitAct = new QAction(tr("&Quit"), this); - quitAct->setShortcut(QKeySequence::Quit); - quitAct->setIcon(QIcon(":exit.png")); - quitAct->setToolTip(tr("Quit Program")); - connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); - - /* Edit Menu - */ - undoAct = new QAction(tr("&Undo"), this); - undoAct->setShortcut(QKeySequence::Undo); - undoAct->setToolTip(tr("Undo Last Edit Action")); - connect(undoAct, SIGNAL(triggered()), edit, SLOT(slotUndo())); - - redoAct = new QAction(tr("&Redo"), this); - redoAct->setShortcut(QKeySequence::Redo); - redoAct->setToolTip(tr("Redo Last Edit Action")); - connect(redoAct, SIGNAL(triggered()), edit, SLOT(slotRedo())); - - zoomInAct = new QAction(tr("Zoom In"), this); - zoomInAct->setShortcut(QKeySequence::ZoomIn); - connect(zoomInAct, SIGNAL(triggered()), edit, SLOT(slotZoomIn())); - - zoomOutAct = new QAction(tr("Zoom Out"), this); - zoomOutAct->setShortcut(QKeySequence::ZoomOut); - connect(zoomOutAct, SIGNAL(triggered()), edit, SLOT(slotZoomOut())); - - pasteAct = new QAction(tr("&Paste"), this); - pasteAct->setIcon(QIcon(":button_paste.png")); - pasteAct->setShortcut(QKeySequence::Paste); - pasteAct->setToolTip(tr("Paste Text From Clipboard")); - connect(pasteAct, SIGNAL(triggered()), edit, SLOT(slotPaste())); - - cutAct = new QAction(tr("Cu&t"), this); - cutAct->setIcon(QIcon(":button_cut.png")); - cutAct->setShortcut(QKeySequence::Cut); - cutAct->setToolTip(tr("Cut the current selection's contents to the " - "clipboard")); - connect(cutAct, SIGNAL(triggered()), edit, SLOT(slotCut())); - - copyAct = new QAction(tr("&Copy"), this); - copyAct->setIcon(QIcon(":button_copy.png")); - copyAct->setShortcut(QKeySequence::Copy); - copyAct->setToolTip(tr("Copy the current selection's contents to the " - "clipboard")); - connect(copyAct, SIGNAL(triggered()), edit, SLOT(slotCopy())); - - quoteAct = new QAction(tr("&Quote"), this); - quoteAct->setIcon(QIcon(":quote.png")); - quoteAct->setToolTip(tr("Quote whole text")); - connect(quoteAct, SIGNAL(triggered()), edit, SLOT(slotQuote())); - - selectAllAct = new QAction(tr("Select &All"), this); - selectAllAct->setIcon(QIcon(":edit.png")); - selectAllAct->setShortcut(QKeySequence::SelectAll); - selectAllAct->setToolTip(tr("Select the whole text")); - connect(selectAllAct, SIGNAL(triggered()), edit, SLOT(slotSelectAll())); - - findAct = new QAction(tr("&Find"), this); - findAct->setShortcut(QKeySequence::Find); - findAct->setToolTip(tr("Find a word")); - connect(findAct, SIGNAL(triggered()), this, SLOT(slotFind())); - - cleanDoubleLinebreaksAct = new QAction(tr("Remove &spacing"), this); - cleanDoubleLinebreaksAct->setIcon(QIcon(":format-line-spacing-triple.png")); - //cleanDoubleLineBreaksAct->setShortcut(QKeySequence::SelectAll); - cleanDoubleLinebreaksAct->setToolTip(tr("Remove double linebreaks, e.g. in pasted text from webmailer")); - connect(cleanDoubleLinebreaksAct, SIGNAL(triggered()), this, SLOT(slotCleanDoubleLinebreaks())); - - openSettingsAct = new QAction(tr("Se&ttings"), this); - openSettingsAct->setToolTip(tr("Open settings dialog")); - openSettingsAct->setShortcut(QKeySequence::Preferences); - connect(openSettingsAct, SIGNAL(triggered()), this, SLOT(slotOpenSettingsDialog())); - - /* Crypt Menu - */ - encryptAct = new QAction(tr("&Encrypt"), this); - encryptAct->setIcon(QIcon(":encrypted.png")); - encryptAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E)); - encryptAct->setToolTip(tr("Encrypt Message")); - connect(encryptAct, SIGNAL(triggered()), this, SLOT(slotEncrypt())); - - encryptSignAct = new QAction(tr("&Encrypt &Sign"), this); - encryptSignAct->setIcon(QIcon(":encrypted_signed.png")); - encryptSignAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_E)); - encryptSignAct->setToolTip(tr("Encrypt and Sign Message")); - connect(encryptSignAct, SIGNAL(triggered()), this, SLOT(slotEncryptSign())); - - decryptAct = new QAction(tr("&Decrypt"), this); - decryptAct->setIcon(QIcon(":decrypted.png")); - decryptAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D)); - decryptAct->setToolTip(tr("Decrypt Message")); - connect(decryptAct, SIGNAL(triggered()), this, SLOT(slotDecrypt())); - - decryptVerifyAct = new QAction(tr("&Decrypt &Verify"), this); - decryptVerifyAct->setIcon(QIcon(":decrypted_verified.png")); - decryptVerifyAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D)); - decryptVerifyAct->setToolTip(tr("Decrypt and Verify Message")); - connect(decryptVerifyAct, SIGNAL(triggered()), this, SLOT(slotDecryptVerify())); - - /* - * File encryption submenu - */ - fileEncryptAct = new QAction(tr("&Encrypt File"), this); - fileEncryptAct->setToolTip(tr("Encrypt File")); - connect(fileEncryptAct, SIGNAL(triggered()), this, SLOT(slotFileEncrypt())); - - fileDecryptAct = new QAction(tr("&Decrypt File"), this); - fileDecryptAct->setToolTip(tr("Decrypt File")); - connect(fileDecryptAct, SIGNAL(triggered()), this, SLOT(slotFileDecrypt())); - - fileSignAct = new QAction(tr("&Sign File"), this); - fileSignAct->setToolTip(tr("Sign File")); - connect(fileSignAct, SIGNAL(triggered()), this, SLOT(slotFileSign())); - - fileVerifyAct = new QAction(tr("&Verify File"), this); - fileVerifyAct->setToolTip(tr("Verify File")); - connect(fileVerifyAct, SIGNAL(triggered()), this, SLOT(slotFileVerify())); - - - signAct = new QAction(tr("&Sign"), this); - signAct->setIcon(QIcon(":signature.png")); - signAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_I)); - signAct->setToolTip(tr("Sign Message")); - connect(signAct, SIGNAL(triggered()), this, SLOT(slotSign())); - - verifyAct = new QAction(tr("&Verify"), this); - verifyAct->setIcon(QIcon(":verify.png")); - verifyAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_V)); - verifyAct->setToolTip(tr("Verify Message")); - connect(verifyAct, SIGNAL(triggered()), this, SLOT(slotVerify())); - - /* Key Menu - */ - - importKeyFromEditAct = new QAction(tr("&Editor"), this); - importKeyFromEditAct->setIcon(QIcon(":txt.png")); - importKeyFromEditAct->setToolTip(tr("Import New Key From Editor")); - connect(importKeyFromEditAct, SIGNAL(triggered()), this, SLOT(slotImportKeyFromEdit())); - - openKeyManagementAct = new QAction(tr("Manage &keys"), this); - openKeyManagementAct->setIcon(QIcon(":keymgmt.png")); - openKeyManagementAct->setToolTip(tr("Open Keymanagement")); - connect(openKeyManagementAct, SIGNAL(triggered()), this, SLOT(slotOpenKeyManagement())); - - /* About Menu - */ - aboutAct = new QAction(tr("&About"), this); - aboutAct->setIcon(QIcon(":help.png")); - aboutAct->setToolTip(tr("Show the application's About box")); - connect(aboutAct, SIGNAL(triggered()), this, SLOT(slotAbout())); - - startWizardAct = new QAction(tr("Open &Wizard"), this); - startWizardAct->setToolTip(tr("Open the wizard")); - connect(startWizardAct, SIGNAL(triggered()), this, SLOT(slotStartWizard())); - - /* Popup-Menu-Action for KeyList - */ - appendSelectedKeysAct = new QAction(tr("Append Selected Key(s) To Text"), this); - appendSelectedKeysAct->setToolTip(tr("Append The Selected Keys To Text in Editor")); - connect(appendSelectedKeysAct, SIGNAL(triggered()), this, SLOT(slotAppendSelectedKeys())); - - copyMailAddressToClipboardAct = new QAction(tr("Copy EMail-address"), this); - copyMailAddressToClipboardAct->setToolTip(tr("Copy selected EMailaddress to clipboard")); - connect(copyMailAddressToClipboardAct, SIGNAL(triggered()), this, SLOT(slotCopyMailAddressToClipboard())); - - // TODO: find central place for shared actions, to avoid code-duplication with keymgmt.cpp - showKeyDetailsAct = new QAction(tr("Show Key Details"), this); - showKeyDetailsAct->setToolTip(tr("Show Details for this Key")); - connect(showKeyDetailsAct, SIGNAL(triggered()), this, SLOT(slotShowKeyDetails())); - - refreshKeysFromKeyserverAct = new QAction(tr("Refresh Key From Key Server"), this); - refreshKeysFromKeyserverAct->setToolTip(tr("Refresh key from default key server")); - connect(refreshKeysFromKeyserverAct, SIGNAL(triggered()), this, SLOT(refreshKeysFromKeyserver())); - - uploadKeyToServerAct = new QAction(tr("Upload Public Key(s) To Server"), this); - uploadKeyToServerAct->setToolTip(tr("Upload The Selected Public Keys To Server")); - connect(uploadKeyToServerAct, SIGNAL(triggered()), this, SLOT(uploadKeyToServer())); - /* Key-Shortcuts for Tab-Switchung-Action - */ - switchTabUpAct = new QAction(this); - switchTabUpAct->setShortcut(QKeySequence::NextChild); - connect(switchTabUpAct, SIGNAL(triggered()), edit, SLOT(slotSwitchTabUp())); - this->addAction(switchTabUpAct); - - switchTabDownAct = new QAction(this); - switchTabDownAct->setShortcut(QKeySequence::PreviousChild); - connect(switchTabDownAct, SIGNAL(triggered()), edit, SLOT(slotSwitchTabDown())); - this->addAction(switchTabDownAct); - - cutPgpHeaderAct = new QAction(tr("Remove PGP Header"), this); - connect(cutPgpHeaderAct, SIGNAL(triggered()), this, SLOT(slotCutPgpHeader())); - - addPgpHeaderAct = new QAction(tr("Add PGP Header"), this); - connect(addPgpHeaderAct, SIGNAL(triggered()), this, SLOT(slotAddPgpHeader())); -} - -void MainWindow::slotDisableTabActions(int number) { - bool disable; - - if (number == -1) { - disable = true; - } else { - disable = false; - } - printAct->setDisabled(disable); - saveAct->setDisabled(disable); - saveAsAct->setDisabled(disable); - quoteAct->setDisabled(disable); - cutAct->setDisabled(disable); - copyAct->setDisabled(disable); - pasteAct->setDisabled(disable); - closeTabAct->setDisabled(disable); - selectAllAct->setDisabled(disable); - findAct->setDisabled(disable); - verifyAct->setDisabled(disable); - signAct->setDisabled(disable); - encryptAct->setDisabled(disable); - decryptAct->setDisabled(disable); - - redoAct->setDisabled(disable); - undoAct->setDisabled(disable); - zoomOutAct->setDisabled(disable); - zoomInAct->setDisabled(disable); - cleanDoubleLinebreaksAct->setDisabled(disable); - quoteAct->setDisabled(disable); - appendSelectedKeysAct->setDisabled(disable); - importKeyFromEditAct->setDisabled(disable); - - cutPgpHeaderAct->setDisabled(disable); - addPgpHeaderAct->setDisabled(disable); -} - -void MainWindow::createMenus() { - fileMenu = menuBar()->addMenu(tr("&File")); - fileMenu->addAction(newTabAct); - fileMenu->addAction(openAct); - fileMenu->addSeparator(); - fileMenu->addAction(saveAct); - fileMenu->addAction(saveAsAct); - fileMenu->addSeparator(); - fileMenu->addAction(printAct); - fileMenu->addSeparator(); - fileMenu->addAction(closeTabAct); - fileMenu->addAction(quitAct); - - editMenu = menuBar()->addMenu(tr("&Edit")); - editMenu->addAction(undoAct); - editMenu->addAction(redoAct); - editMenu->addSeparator(); - editMenu->addAction(zoomInAct); - editMenu->addAction(zoomOutAct); - editMenu->addSeparator(); - editMenu->addAction(copyAct); - editMenu->addAction(cutAct); - editMenu->addAction(pasteAct); - editMenu->addAction(selectAllAct); - editMenu->addAction(findAct); - editMenu->addSeparator(); - editMenu->addAction(quoteAct); - editMenu->addAction(cleanDoubleLinebreaksAct); - editMenu->addSeparator(); - editMenu->addAction(openSettingsAct); - - fileEncMenu = new QMenu(tr("&File...")); - fileEncMenu->addAction(fileEncryptAct); - fileEncMenu->addAction(fileDecryptAct); - fileEncMenu->addAction(fileSignAct); - fileEncMenu->addAction(fileVerifyAct); - - cryptMenu = menuBar()->addMenu(tr("&Crypt")); - cryptMenu->addAction(encryptAct); - cryptMenu->addAction(encryptSignAct); - cryptMenu->addAction(decryptAct); - cryptMenu->addAction(decryptVerifyAct); - cryptMenu->addSeparator(); - cryptMenu->addAction(signAct); - cryptMenu->addAction(verifyAct); - cryptMenu->addSeparator(); - cryptMenu->addMenu(fileEncMenu); - - keyMenu = menuBar()->addMenu(tr("&Keys")); - importKeyMenu = keyMenu->addMenu(tr("&Import Key")); - importKeyMenu->setIcon(QIcon(":key_import.png")); - importKeyMenu->addAction(keyMgmt->importKeyFromFileAct); - importKeyMenu->addAction(importKeyFromEditAct); - importKeyMenu->addAction(keyMgmt->importKeyFromClipboardAct); - importKeyMenu->addAction(keyMgmt->importKeyFromKeyServerAct); - importKeyMenu->addAction(keyMgmt->importKeyFromKeyServerAct); - keyMenu->addAction(openKeyManagementAct); - - steganoMenu = menuBar()->addMenu(tr("&Steganography")); - steganoMenu->addAction(cutPgpHeaderAct); - steganoMenu->addAction(addPgpHeaderAct); - - // Hide menu, when steganography menu is disabled in settings - if (!settings.value("advanced/steganography").toBool()) { - this->menuBar()->removeAction(steganoMenu->menuAction()); - } - - viewMenu = menuBar()->addMenu(tr("&View")); - - helpMenu = menuBar()->addMenu(tr("&Help")); - helpMenu->addAction(startWizardAct); - helpMenu->addSeparator(); - helpMenu->addAction(aboutAct); - -} - -void MainWindow::createToolBars() { - fileToolBar = addToolBar(tr("File")); - fileToolBar->setObjectName("fileToolBar"); - fileToolBar->addAction(newTabAct); - fileToolBar->addAction(openAct); - fileToolBar->addAction(saveAct); - fileToolBar->hide(); - viewMenu->addAction(fileToolBar->toggleViewAction()); - - cryptToolBar = addToolBar(tr("Crypt")); - cryptToolBar->setObjectName("cryptToolBar"); - cryptToolBar->addAction(encryptAct); - cryptToolBar->addAction(encryptSignAct); - cryptToolBar->addAction(decryptAct); - cryptToolBar->addAction(decryptVerifyAct); - cryptToolBar->addAction(signAct); - cryptToolBar->addAction(verifyAct); - viewMenu->addAction(cryptToolBar->toggleViewAction()); - - keyToolBar = addToolBar(tr("Key")); - keyToolBar->setObjectName("keyToolBar"); - keyToolBar->addAction(openKeyManagementAct); - viewMenu->addAction(keyToolBar->toggleViewAction()); - - editToolBar = addToolBar(tr("Edit")); - editToolBar->setObjectName("editToolBar"); - editToolBar->addAction(copyAct); - editToolBar->addAction(pasteAct); - editToolBar->addAction(selectAllAct); - viewMenu->addAction(editToolBar->toggleViewAction()); - - specialEditToolBar = addToolBar(tr("Special Edit")); - specialEditToolBar->setObjectName("specialEditToolBar"); - specialEditToolBar->addAction(quoteAct); - specialEditToolBar->addAction(cleanDoubleLinebreaksAct); - specialEditToolBar->hide(); - viewMenu->addAction(specialEditToolBar->toggleViewAction()); - - // Add dropdown menu for key import to keytoolbar - importButton = new QToolButton(); - importButton->setMenu(importKeyMenu); - importButton->setPopupMode(QToolButton::InstantPopup); - importButton->setIcon(QIcon(":key_import.png")); - importButton->setToolTip(tr("Import key from...")); - importButton->setText(tr("Import key")); - keyToolBar->addWidget(importButton); - - // Add dropdown menu for file encryption/decryption to crypttoolbar - fileEncButton = new QToolButton(); - fileEncButton->setMenu(fileEncMenu); - fileEncButton->setPopupMode(QToolButton::InstantPopup); - fileEncButton->setIcon(QIcon(":fileencryption.png")); - fileEncButton->setToolTip(tr("Opera File")); - fileEncButton->setText(tr("File Crypto")); - cryptToolBar->addWidget(fileEncButton); - -} - -void MainWindow::createStatusBar() { - auto *statusBarBox = new QWidget(); - auto *statusBarBoxLayout = new QHBoxLayout(); - QPixmap *pixmap; - - // icon which should be shown if there are files in attachments-folder - pixmap = new QPixmap(":statusbar_icon.png"); - statusBarIcon = new QLabel(); - statusBar()->addWidget(statusBarIcon); - - statusBarIcon->setPixmap(*pixmap); - statusBar()->insertPermanentWidget(0, statusBarIcon, 0); - statusBarIcon->hide(); - statusBar()->showMessage(tr("Ready"), 2000); - statusBarBox->setLayout(statusBarBoxLayout); -} - -void MainWindow::createDockWindows() { - /* KeyList-Dockwindow - */ - keyListDock = new QDockWidget(tr("Key ToolBox"), this); - keyListDock->setObjectName("EncryptDock"); - keyListDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); - keyListDock->setMinimumWidth(460); - addDockWidget(Qt::RightDockWidgetArea, keyListDock); - keyListDock->setWidget(mKeyList); - viewMenu->addAction(keyListDock->toggleViewAction()); - - infoBoardDock = new QDockWidget(tr("Information Board"), this); - infoBoardDock->setObjectName("Information Board"); - infoBoardDock->setAllowedAreas(Qt::BottomDockWidgetArea); - addDockWidget(Qt::BottomDockWidgetArea, infoBoardDock); - infoBoardDock->setWidget(infoBoard); - infoBoardDock->widget()->layout()->setContentsMargins(0, 0, 0, 0); - viewMenu->addAction(infoBoardDock->toggleViewAction()); - - /* Attachments-Dockwindow - */ - if (settings.value("mime/parseMime").toBool()) { - createAttachmentDock(); - } -} - -void MainWindow::createAttachmentDock() { - if (attachmentDockCreated) { - return; - } - mAttachments = new Attachments(); - attachmentDock = new QDockWidget(tr("Attached files:"), this); - attachmentDock->setObjectName("AttachmentDock"); - attachmentDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); - addDockWidget(Qt::LeftDockWidgetArea, attachmentDock); - attachmentDock->setWidget(mAttachments); - // hide till attachment is decrypted - viewMenu->addAction(attachmentDock->toggleViewAction()); - attachmentDock->hide(); - attachmentDockCreated = true; -} - void MainWindow::closeAttachmentDock() { if (!attachmentDockCreated) { return; @@ -660,494 +194,3 @@ void MainWindow::closeEvent(QCloseEvent *event) { mCtx->clearPasswordCache(); } -void MainWindow::slotAbout() { - new AboutDialog(this); -} - -void MainWindow::slotSetStatusBarText(const QString &text) { - statusBar()->showMessage(text, 20000); -} - -void MainWindow::slotStartWizard() { - auto *wizard = new Wizard(mCtx, keyMgmt, this); - wizard->show(); - wizard->setModal(true); -} - - -void MainWindow::slotCheckAttachmentFolder() { - // TODO: always check? - if (!settings.value("mime/parseMime").toBool()) { - return; - } - - QString attachmentDir = qApp->applicationDirPath() + "/attachments/"; - // filenum minus . and .. - uint filenum = QDir(attachmentDir).count() - 2; - if (filenum > 0) { - QString statusText; - if (filenum == 1) { - statusText = tr("There is one unencrypted file in attachment folder"); - } else { - statusText = tr("There are ") + QString::number(filenum) + tr(" unencrypted files in attachment folder"); - } - statusBarIcon->setStatusTip(statusText); - statusBarIcon->show(); - } else { - statusBarIcon->hide(); - } -} - -void MainWindow::slotImportKeyFromEdit() { - if (edit->tabCount() == 0 || edit->slotCurPage() == 0) { - return; - } - - keyMgmt->slotImportKeys(edit->curTextPage()->toPlainText().toUtf8()); -} - -void MainWindow::slotOpenKeyManagement() { - keyMgmt->show(); - keyMgmt->raise(); - keyMgmt->activateWindow(); -} - -void MainWindow::slotEncrypt() { - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - QVector<GpgKey> keys; - mKeyList->getCheckedKeys(keys); - - if (keys.count() == 0) { - QMessageBox::critical(nullptr, tr("No Key Selected"), tr("No Key Selected")); - return; - } - - for (const auto &key : keys) { - if (!GpgME::GpgContext::checkIfKeyCanEncr(key)) { - QMessageBox::information(nullptr, - tr("Invalid Operation"), - tr("The selected key contains a key that does not actually have a encrypt function.<br/>") - + tr("<br/>For example the Following Key: <br/>") + key.uids.first().uid); - return; - - } - } - - auto *tmp = new QByteArray(); - - gpgme_encrypt_result_t result = nullptr; - auto error = mCtx->encrypt(keys, edit->curTextPage()->toPlainText().toUtf8(), tmp, &result); - - auto resultAnalyse = new EncryptResultAnalyse(error, result); - auto &reportText = resultAnalyse->getResultReport(); - - auto *tmp2 = new QString(*tmp); - edit->slotFillTextEditWithText(*tmp2); - infoBoard->associateTextEdit(edit->curTextPage()); - - if (resultAnalyse->getStatus() < 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); - else if (resultAnalyse->getStatus() > 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_OK); - else - infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); - - delete resultAnalyse; -} - -void MainWindow::slotSign() { - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - QVector<GpgKey> keys; - - mKeyList->getPrivateCheckedKeys(keys); - - if (keys.isEmpty()) { - QMessageBox::critical(nullptr, tr("No Key Selected"), tr("No Key Selected")); - return; - } - - for (const auto &key : keys) { - if (!GpgME::GpgContext::checkIfKeyCanSign(key)) { - QMessageBox::information(nullptr, - tr("Invalid Operation"), - tr("The selected key contains a key that does not actually have a signature function.<br/>") - + tr("<br/>For example the Following Key: <br/>") + key.uids.first().uid); - return; - } - } - - auto *tmp = new QByteArray(); - - gpgme_sign_result_t result = nullptr; - - auto error = mCtx->sign(keys, edit->curTextPage()->toPlainText().toUtf8(), tmp, false, &result); - infoBoard->associateTextEdit(edit->curTextPage()); - edit->slotFillTextEditWithText(QString::fromUtf8(*tmp)); - - auto resultAnalyse = new SignResultAnalyse(error, result); - - auto &reportText = resultAnalyse->getResultReport(); - if (resultAnalyse->getStatus() < 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); - else if (resultAnalyse->getStatus() > 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_OK); - else - infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); - - delete resultAnalyse; -} - -void MainWindow::slotDecrypt() { - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - auto *decrypted = new QByteArray(); - QByteArray text = edit->curTextPage()->toPlainText().toUtf8(); - GpgME::GpgContext::preventNoDataErr(&text); - - gpgme_decrypt_result_t result = nullptr; - // try decrypt, if fail do nothing, especially don't replace text - auto error = mCtx->decrypt(text, decrypted, &result); - infoBoard->associateTextEdit(edit->curTextPage()); - - if(gpgme_err_code(error) == GPG_ERR_NO_ERROR) - edit->slotFillTextEditWithText(QString::fromUtf8(*decrypted)); - - auto resultAnalyse = new DecryptResultAnalyse(mCtx, error, result); - - auto &reportText = resultAnalyse->getResultReport(); - if (resultAnalyse->getStatus() < 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); - else if (resultAnalyse->getStatus() > 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_OK); - else - infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); - - delete resultAnalyse; -} - -void MainWindow::slotFind() { - if (edit->tabCount() == 0 || edit->curTextPage() == nullptr) { - return; - } - - // At first close verifynotification, if existing - edit->slotCurPage()->closeNoteByClass("findwidget"); - - auto *fw = new FindWidget(this, edit->curTextPage()); - edit->slotCurPage()->showNotificationWidget(fw, "findWidget"); - -} - -void MainWindow::slotVerify() { - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - // If an unknown key is found, enable the importfromkeyserveraction - - QByteArray text = edit->curTextPage()->toPlainText().toUtf8(); - GpgME::GpgContext::preventNoDataErr(&text); - - - gpgme_verify_result_t result; - - auto error = mCtx->verify(&text, nullptr, &result); - - auto resultAnalyse = new VerifyResultAnalyse(mCtx, error, result); - infoBoard->associateTextEdit(edit->curTextPage()); - - auto &reportText = resultAnalyse->getResultReport(); - if (resultAnalyse->getStatus() < 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); - else if (resultAnalyse->getStatus() > 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_OK); - else - infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); - - if (resultAnalyse->getStatus() >= 0) { - infoBoard->resetOptionActionsMenu(); - infoBoard->addOptionalAction("Show Verify Details", [this, error, result]() { - VerifyDetailsDialog(this, mCtx, mKeyList, error, result); - }); - } - - delete resultAnalyse; -} - -/* - * Append the selected (not checked!) Key(s) To Textedit - */ -void MainWindow::slotAppendSelectedKeys() { - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - auto *keyArray = new QByteArray(); - mCtx->exportKeys(mKeyList->getSelected(), keyArray); - edit->curTextPage()->append(*keyArray); -} - -void MainWindow::slotCopyMailAddressToClipboard() { - if (mKeyList->getSelected()->isEmpty()) { - return; - } - auto &key = mCtx->getKeyById(mKeyList->getSelected()->first()); - QClipboard *cb = QApplication::clipboard(); - QString mail = key.email; - cb->setText(mail); -} - -void MainWindow::slotShowKeyDetails() { - if (mKeyList->getSelected()->isEmpty()) { - return; - } - auto &key = mCtx->getKeyById(mKeyList->getSelected()->first()); - if (key.good) { - new KeyDetailsDialog(mCtx, key, this); - } -} - -void MainWindow::refreshKeysFromKeyserver() { - if (mKeyList->getSelected()->isEmpty()) { - return; - } - - auto *dialog = new KeyServerImportDialog(mCtx, mKeyList, true, this); - dialog->show(); - dialog->slotImport(*mKeyList->getSelected()); - -} - -void MainWindow::uploadKeyToServer() { - QVector<GpgKey> keys; - keys.append(mKeyList->getSelectedKey()); - auto *dialog = new KeyUploadDialog(mCtx, keys); -} - -void MainWindow::slotFileEncrypt() { - QStringList *keyList; - keyList = mKeyList->getChecked(); - new FileEncryptionDialog(mCtx, *keyList, FileEncryptionDialog::Encrypt, this); -} - -void MainWindow::slotFileDecrypt() { - QStringList *keyList; - keyList = mKeyList->getChecked(); - new FileEncryptionDialog(mCtx, *keyList, FileEncryptionDialog::Decrypt, this); -} - -void MainWindow::slotFileSign() { - QStringList *keyList; - keyList = mKeyList->getChecked(); - new FileEncryptionDialog(mCtx, *keyList, FileEncryptionDialog::Sign, this); -} - -void MainWindow::slotFileVerify() { - QStringList *keyList; - keyList = mKeyList->getChecked(); - new FileEncryptionDialog(mCtx, *keyList, FileEncryptionDialog::Verify, this); -} - -void MainWindow::slotOpenSettingsDialog() { - - QString preLang = settings.value("int/lang").toString(); - QString preKeydbPath = settings.value("gpgpaths/keydbpath").toString(); - - auto dialog = new SettingsDialog(mCtx, this); - - connect(dialog, &SettingsDialog::finished, this, [&] () -> void { - - qDebug() << "Setting Dialog Finished"; - - // Iconsize - QSize iconSize = settings.value("toolbar/iconsize", QSize(32, 32)).toSize(); - this->setIconSize(iconSize); - importButton->setIconSize(iconSize); - fileEncButton->setIconSize(iconSize); - - // Iconstyle - Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", - Qt::ToolButtonTextUnderIcon).toUInt()); - this->setToolButtonStyle(buttonStyle); - importButton->setToolButtonStyle(buttonStyle); - fileEncButton->setToolButtonStyle(buttonStyle); - - // Mime-settings - if (settings.value("mime/parseMime").toBool()) { - createAttachmentDock(); - } else if (attachmentDockCreated) { - closeAttachmentDock(); - } - - // restart mainwindow if necessary - if (getRestartNeeded()) { - if (edit->maybeSaveAnyTab()) { - saveSettings(); - qApp->exit(RESTART_CODE); - } - } - - // steganography hide/show - if (!settings.value("advanced/steganography").toBool()) { - this->menuBar()->removeAction(steganoMenu->menuAction()); - } else { - this->menuBar()->insertAction(viewMenu->menuAction(), steganoMenu->menuAction()); - } - }); - -} - -void MainWindow::slotCleanDoubleLinebreaks() { - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - QString content = edit->curTextPage()->toPlainText(); - content.replace("\n\n", "\n"); - edit->slotFillTextEditWithText(content); -} - -void MainWindow::slotAddPgpHeader() { - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - QString content = edit->curTextPage()->toPlainText().trimmed(); - - content.prepend("\n\n").prepend(GpgConstants::PGP_CRYPT_BEGIN); - content.append("\n").append(GpgConstants::PGP_CRYPT_END); - - edit->slotFillTextEditWithText(content); -} - -void MainWindow::slotCutPgpHeader() { - - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - QString content = edit->curTextPage()->toPlainText(); - int start = content.indexOf(GpgConstants::PGP_CRYPT_BEGIN); - int end = content.indexOf(GpgConstants::PGP_CRYPT_END); - - if (start < 0 || end < 0) { - return; - } - - // remove head - int headEnd = content.indexOf("\n\n", start) + 2; - content.remove(start, headEnd - start); - - // remove tail - end = content.indexOf(GpgConstants::PGP_CRYPT_END); - content.remove(end, QString(GpgConstants::PGP_CRYPT_END).size()); - - edit->slotFillTextEditWithText(content.trimmed()); -} - -void MainWindow::slotSetRestartNeeded(bool needed) { - this->restartNeeded = needed; -} - -bool MainWindow::getRestartNeeded() const { - return this->restartNeeded; -} - -void MainWindow::slotEncryptSign() { - - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - QVector<GpgKey> keys; - mKeyList->getCheckedKeys(keys); - - if (keys.empty()) { - QMessageBox::critical(nullptr, tr("No Key Selected"), tr("No Key Selected")); - return; - } - - for (const auto &key : keys) { - if (!GpgME::GpgContext::checkIfKeyCanSign(key) || !GpgME::GpgContext::checkIfKeyCanEncr(key)) { - QMessageBox::information(nullptr, - tr("Invalid Operation"), - tr("The selected key cannot be used for signing and encryption at the same time.<br/>") - + tr("<br/>For example the Following Key: <br/>") + key.uids.first().uid); - return; - } - } - - auto *tmp = new QByteArray(); - gpgme_encrypt_result_t encr_result = nullptr; - gpgme_sign_result_t sign_result = nullptr; - - auto error = mCtx->encryptSign(keys, edit->curTextPage()->toPlainText().toUtf8(), tmp, &encr_result, &sign_result); - auto *tmp2 = new QString(*tmp); - edit->slotFillTextEditWithText(*tmp2); - - auto resultAnalyseEncr = new EncryptResultAnalyse(error, encr_result); - auto resultAnalyseSign = new SignResultAnalyse(error, sign_result); - int status = std::min(resultAnalyseEncr->getStatus(), resultAnalyseSign->getStatus()); - auto reportText = resultAnalyseEncr->getResultReport() + resultAnalyseSign->getResultReport(); - - infoBoard->associateTextEdit(edit->curTextPage()); - - if (status < 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); - else if (status > 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_OK); - else - infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); - - delete resultAnalyseEncr; - delete resultAnalyseSign; -} - -void MainWindow::slotDecryptVerify() { - - if (edit->tabCount() == 0 || edit->slotCurPage() == nullptr) { - return; - } - - auto *decrypted = new QByteArray(); - QByteArray text = edit->curTextPage()->toPlainText().toUtf8(); - GpgME::GpgContext::preventNoDataErr(&text); - - gpgme_decrypt_result_t d_result = nullptr; - gpgme_verify_result_t v_result = nullptr; - // try decrypt, if fail do nothing, especially don't replace text - auto error = mCtx->decryptVerify(text, decrypted, &d_result, &v_result); - infoBoard->associateTextEdit(edit->curTextPage()); - - if(gpgme_err_code(error) == GPG_ERR_NO_ERROR) - edit->slotFillTextEditWithText(QString::fromUtf8(*decrypted)); - - auto resultAnalyseDecrypt = new DecryptResultAnalyse(mCtx, error, d_result); - auto resultAnalyseVerify = new VerifyResultAnalyse(mCtx, error, v_result); - - int status = std::min(resultAnalyseDecrypt->getStatus(), resultAnalyseVerify->getStatus()); - auto &reportText = resultAnalyseDecrypt->getResultReport() + resultAnalyseVerify->getResultReport(); - if (status < 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); - else if (status > 0) - infoBoard->slotRefresh(reportText, INFO_ERROR_OK); - else - infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); - - if (resultAnalyseVerify->getStatus() >= 0) { - infoBoard->resetOptionActionsMenu(); - infoBoard->addOptionalAction("Show Verify Details", [this, error, v_result]() { - VerifyDetailsDialog(this, mCtx, mKeyList, error, v_result); - }); - } - delete resultAnalyseDecrypt; - delete resultAnalyseVerify; -} diff --git a/src/gpg/GpgFileOpera.cpp b/src/gpg/GpgFileOpera.cpp new file mode 100644 index 00000000..c3a9b5d0 --- /dev/null +++ b/src/gpg/GpgFileOpera.cpp @@ -0,0 +1,52 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ +#include "gpg/GpgFileOpera.h" + +bool GpgFileOpera::encryptFile(GpgME::GpgContext *ctx, QVector<GpgKey> &keys, const QString &mPath) { + + QFileInfo fileInfo(mPath); + + if(!fileInfo.isFile() || !fileInfo.isReadable()) return false; + + QFile infile; + infile.setFileName(mPath); + if (!infile.open(QIODevice::ReadOnly)) + return false; + + QByteArray inBuffer = infile.readAll(); + auto *outBuffer = new QByteArray(); + infile.close(); + + if (gpg_err_code(ctx->encrypt(keys, inBuffer, outBuffer, nullptr)) != GPG_ERR_NO_ERROR) return false; + + QFile outfile(mPath + ".asc"); + + if (!outfile.open(QFile::WriteOnly)) + return false; + + QDataStream out(&outfile); + out.writeRawData(outBuffer->data(), outBuffer->length()); + outfile.close(); + return true; +} diff --git a/src/main.cpp b/src/main.cpp index db11ee6f..00ab2738 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,7 +43,7 @@ int main(int argc, char *argv[]) { QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf-8")); // css - QFile file(qApp->applicationDirPath() + "/css/default.qss"); + QFile file(RESOURCE_DIR(qApp->applicationDirPath()) + "/css/default.qss"); file.open(QFile::ReadOnly); QString styleSheet = QLatin1String(file.readAll()); qApp->setStyleSheet(styleSheet); @@ -53,11 +53,11 @@ int main(int argc, char *argv[]) { * internationalisation. loop to restart mainwindow * with changed translation when settings change. */ - if(!QDir(appPath + "/conf").exists()) { - QDir().mkdir(appPath + "/conf"); + if(!QDir(RESOURCE_DIR(appPath) + "/conf").exists()) { + QDir().mkdir(RESOURCE_DIR(appPath) + "/conf"); } QSettings::setDefaultFormat(QSettings::IniFormat); - QSettings settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat); + QSettings settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat); QTranslator translator, translator2; int return_from_event_loop_code; @@ -72,12 +72,12 @@ int main(int argc, char *argv[]) { lang = QLocale::system().name(); } qDebug() << "Language set" << lang; - translator.load( appPath + "/ts/" + "gpgfrontend_" + lang); + translator.load(RESOURCE_DIR(appPath) + "/ts/" + "gpgfrontend_" + lang); qDebug() << "Translator" << translator.filePath(); QApplication::installTranslator(&translator); // set qt translations - translator2.load("./ts/qt_" + lang, appPath); + translator2.load(RESOURCE_DIR(appPath) + "/ts/qt_" + lang); qDebug() << "Translator2" << translator2.filePath(); QApplication::installTranslator(&translator2); diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index d92a63ed..68f57b81 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -2,6 +2,7 @@ aux_source_directory(. UI_SOURCE) aux_source_directory(./keypair_details UI_SOURCE) aux_source_directory(./widgets UI_SOURCE) aux_source_directory(./keygen UI_SOURCE) +aux_source_directory(./main_window UI_SOURCE) add_library(gpgfrontend-ui STATIC ${UI_SOURCE}) diff --git a/src/ui/KeyMgmt.cpp b/src/ui/KeyMgmt.cpp index 6f9c64a2..0e2d9c9a 100755 --- a/src/ui/KeyMgmt.cpp +++ b/src/ui/KeyMgmt.cpp @@ -27,7 +27,7 @@ #include <utility> KeyMgmt::KeyMgmt(GpgME::GpgContext *ctx, QWidget *parent ) : - QMainWindow(parent), appPath(qApp->applicationDirPath()), settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) + QMainWindow(parent), appPath(qApp->applicationDirPath()), settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { mCtx = ctx; diff --git a/src/ui/KeyServerImportDialog.cpp b/src/ui/KeyServerImportDialog.cpp index bfa53cce..1999b443 100644 --- a/src/ui/KeyServerImportDialog.cpp +++ b/src/ui/KeyServerImportDialog.cpp @@ -29,7 +29,7 @@ KeyServerImportDialog::KeyServerImportDialog(GpgME::GpgContext *ctx, KeyList *keyList, bool automatic, QWidget *parent) : QDialog(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat), + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat), mCtx(ctx), mKeyList(keyList), mAutomatic(automatic) { if(automatic) { @@ -442,7 +442,7 @@ void KeyServerImportDialog::setLoading(bool status) { KeyServerImportDialog::KeyServerImportDialog(GpgME::GpgContext *ctx, QWidget *parent) : QDialog(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat), + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat), mCtx(ctx), mAutomatic(true) { setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint); diff --git a/src/ui/KeyUploadDialog.cpp b/src/ui/KeyUploadDialog.cpp index a81ed7a4..6ee6aa78 100644 --- a/src/ui/KeyUploadDialog.cpp +++ b/src/ui/KeyUploadDialog.cpp @@ -28,7 +28,7 @@ KeyUploadDialog::KeyUploadDialog(GpgME::GpgContext *ctx, const QVector<GpgKey> &keys, QWidget *parent) : appPath(qApp->applicationDirPath()), -settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat), +settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat), QDialog(parent) { ctx->exportKeys(keys, mKeyData); uploadKeyToServer(mKeyData); diff --git a/src/ui/SettingsDialog.cpp b/src/ui/SettingsDialog.cpp index 2c130497..25413a75 100755 --- a/src/ui/SettingsDialog.cpp +++ b/src/ui/SettingsDialog.cpp @@ -97,7 +97,7 @@ QHash<QString, QString> SettingsDialog::listLanguages() { languages.insert("", tr("System Default")); QString appPath = qApp->applicationDirPath(); - QDir qmDir = QDir(appPath + "/ts/"); + QDir qmDir = QDir(RESOURCE_DIR(appPath) + "/ts/"); QStringList fileNames = qmDir.entryList(QStringList("gpgfrontend_*.qm")); @@ -122,7 +122,7 @@ QHash<QString, QString> SettingsDialog::listLanguages() { GeneralTab::GeneralTab(GpgME::GpgContext *ctx, QWidget *parent) : QWidget(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { mCtx = ctx; /***************************************** @@ -333,7 +333,7 @@ void GeneralTab::slotOwnKeyIdChanged() { MimeTab::MimeTab(QWidget *parent) : QWidget(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { /***************************************** * MIME-Parsing-Box *****************************************/ @@ -404,7 +404,7 @@ void MimeTab::applySettings() { AppearanceTab::AppearanceTab(QWidget *parent) : QWidget(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { /***************************************** * Icon-Size-Box *****************************************/ @@ -539,7 +539,7 @@ void AppearanceTab::applySettings() { KeyserverTab::KeyserverTab(QWidget *parent) : QWidget(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { auto keyServerList = settings.value("keyserver/keyServerList").toStringList(); @@ -611,7 +611,7 @@ void KeyserverTab::applySettings() { AdvancedTab::AdvancedTab(QWidget *parent) : QWidget(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { /***************************************** * Steganography Box *****************************************/ @@ -641,7 +641,7 @@ void AdvancedTab::applySettings() { GpgPathsTab::GpgPathsTab(QWidget *parent) : QWidget(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { setSettings(); /***************************************** diff --git a/src/ui/Wizard.cpp b/src/ui/Wizard.cpp index c685cc92..b3236cfc 100644 --- a/src/ui/Wizard.cpp +++ b/src/ui/Wizard.cpp @@ -30,7 +30,7 @@ Wizard::Wizard(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent) : QWizard(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { mCtx = ctx; mKeyMgmt = keyMgmt; @@ -107,7 +107,7 @@ bool Wizard::importPubAndSecKeysFromDir(const QString &dir, KeyMgmt *keyMgmt) { IntroPage::IntroPage(QWidget *parent) : QWizardPage(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { setTitle(tr("Getting started...")); setSubTitle(tr("... with GPGFrontend")); @@ -202,7 +202,7 @@ void ChoosePage::slotJumpPage(const QString &page) { ImportFromGpg4usbPage::ImportFromGpg4usbPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgmt, QWidget *parent) : QWizardPage(parent), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) { + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { mCtx = ctx; mKeyMgmt = keyMgmt; setTitle(tr("Import from...")); diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp new file mode 100644 index 00000000..dcfac10b --- /dev/null +++ b/src/ui/main_window/MainWindowSlotFunction.cpp @@ -0,0 +1,405 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#include "MainWindow.h" + +void MainWindow::slotEncrypt() { + + if (edit->tabCount() == 0) return; + + if(edit->slotCurPageTextEdit() != nullptr) { + + QVector<GpgKey> keys; + mKeyList->getCheckedKeys(keys); + + if (keys.count() == 0) { + QMessageBox::critical(nullptr, tr("No Key Selected"), tr("No Key Selected")); + return; + } + + for (const auto &key : keys) { + if (!GpgME::GpgContext::checkIfKeyCanEncr(key)) { + QMessageBox::information(nullptr, + tr("Invalid Operation"), + tr("The selected key contains a key that does not actually have a encrypt usage.<br/>") + + tr("<br/>For example the Following Key: <br/>") + key.uids.first().uid); + return; + + } + } + + auto *tmp = new QByteArray(); + + gpgme_encrypt_result_t result = nullptr; + auto error = mCtx->encrypt(keys, edit->curTextPage()->toPlainText().toUtf8(), tmp, &result); + + auto resultAnalyse = new EncryptResultAnalyse(error, result); + auto &reportText = resultAnalyse->getResultReport(); + + auto *tmp2 = new QString(*tmp); + edit->slotFillTextEditWithText(*tmp2); + infoBoard->associateTextEdit(edit->curTextPage()); + + if (resultAnalyse->getStatus() < 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); + else if (resultAnalyse->getStatus() > 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_OK); + else + infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); + + delete resultAnalyse; + } else if(edit->slotCurPageFileTreeView() != nullptr) { + this->slotFileEncrypt(); + } +} + +void MainWindow::slotSign() { + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + QVector<GpgKey> keys; + + mKeyList->getPrivateCheckedKeys(keys); + + if (keys.isEmpty()) { + QMessageBox::critical(nullptr, tr("No Key Selected"), tr("No Key Selected")); + return; + } + + for (const auto &key : keys) { + if (!GpgME::GpgContext::checkIfKeyCanSign(key)) { + QMessageBox::information(nullptr, + tr("Invalid Operation"), + tr("The selected key contains a key that does not actually have a signature usage.<br/>") + + tr("<br/>For example the Following Key: <br/>") + key.uids.first().uid); + return; + } + } + + auto *tmp = new QByteArray(); + + gpgme_sign_result_t result = nullptr; + + auto error = mCtx->sign(keys, edit->curTextPage()->toPlainText().toUtf8(), tmp, false, &result); + infoBoard->associateTextEdit(edit->curTextPage()); + edit->slotFillTextEditWithText(QString::fromUtf8(*tmp)); + + auto resultAnalyse = new SignResultAnalyse(error, result); + + auto &reportText = resultAnalyse->getResultReport(); + if (resultAnalyse->getStatus() < 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); + else if (resultAnalyse->getStatus() > 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_OK); + else + infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); + + delete resultAnalyse; +} + +void MainWindow::slotDecrypt() { + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + auto *decrypted = new QByteArray(); + QByteArray text = edit->curTextPage()->toPlainText().toUtf8(); + GpgME::GpgContext::preventNoDataErr(&text); + + gpgme_decrypt_result_t result = nullptr; + // try decrypt, if fail do nothing, especially don't replace text + auto error = mCtx->decrypt(text, decrypted, &result); + infoBoard->associateTextEdit(edit->curTextPage()); + + if(gpgme_err_code(error) == GPG_ERR_NO_ERROR) + edit->slotFillTextEditWithText(QString::fromUtf8(*decrypted)); + + auto resultAnalyse = new DecryptResultAnalyse(mCtx, error, result); + + auto &reportText = resultAnalyse->getResultReport(); + if (resultAnalyse->getStatus() < 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); + else if (resultAnalyse->getStatus() > 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_OK); + else + infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); + + delete resultAnalyse; +} + +void MainWindow::slotFind() { + if (edit->tabCount() == 0 || edit->curTextPage() == nullptr) { + return; + } + + // At first close verifynotification, if existing + edit->slotCurPageTextEdit()->closeNoteByClass("findwidget"); + + auto *fw = new FindWidget(this, edit->curTextPage()); + edit->slotCurPageTextEdit()->showNotificationWidget(fw, "findWidget"); + +} + +void MainWindow::slotVerify() { + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + // If an unknown key is found, enable the importfromkeyserveraction + + QByteArray text = edit->curTextPage()->toPlainText().toUtf8(); + GpgME::GpgContext::preventNoDataErr(&text); + + + gpgme_verify_result_t result; + + auto error = mCtx->verify(&text, nullptr, &result); + + auto resultAnalyse = new VerifyResultAnalyse(mCtx, error, result); + infoBoard->associateTextEdit(edit->curTextPage()); + + auto &reportText = resultAnalyse->getResultReport(); + if (resultAnalyse->getStatus() < 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); + else if (resultAnalyse->getStatus() > 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_OK); + else + infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); + + if (resultAnalyse->getStatus() >= 0) { + infoBoard->resetOptionActionsMenu(); + infoBoard->addOptionalAction("Show Verify Details", [this, error, result]() { + VerifyDetailsDialog(this, mCtx, mKeyList, error, result); + }); + } + + delete resultAnalyse; +} + +/* + * Append the selected (not checked!) Key(s) To Textedit + */ +void MainWindow::slotAppendSelectedKeys() { + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + auto *keyArray = new QByteArray(); + mCtx->exportKeys(mKeyList->getSelected(), keyArray); + edit->curTextPage()->append(*keyArray); +} + +void MainWindow::slotCopyMailAddressToClipboard() { + if (mKeyList->getSelected()->isEmpty()) { + return; + } + auto &key = mCtx->getKeyById(mKeyList->getSelected()->first()); + QClipboard *cb = QApplication::clipboard(); + QString mail = key.email; + cb->setText(mail); +} + +void MainWindow::slotShowKeyDetails() { + if (mKeyList->getSelected()->isEmpty()) { + return; + } + auto &key = mCtx->getKeyById(mKeyList->getSelected()->first()); + if (key.good) { + new KeyDetailsDialog(mCtx, key, this); + } +} + +void MainWindow::refreshKeysFromKeyserver() { + if (mKeyList->getSelected()->isEmpty()) { + return; + } + + auto *dialog = new KeyServerImportDialog(mCtx, mKeyList, true, this); + dialog->show(); + dialog->slotImport(*mKeyList->getSelected()); + +} + +void MainWindow::uploadKeyToServer() { + QVector<GpgKey> keys; + keys.append(mKeyList->getSelectedKey()); + auto *dialog = new KeyUploadDialog(mCtx, keys); +} + +void MainWindow::slotFileEncrypt() { + + auto fileTreeView = edit->slotCurPageFileTreeView(); + auto path = fileTreeView->getSelected(); + + QFileInfo fileInfo(path); + if(!fileInfo.isFile()) { + QMessageBox::critical(this, tr("Error"), tr("Can only encrypt a file.")); + return; + } + if(!fileInfo.isReadable()) { + QMessageBox::critical(this, tr("Error"), tr("No permission to read this file.")); + return; + } + if(QFile::exists(path + ".asc")) { + auto ret = QMessageBox::warning(this, + tr("Warning"), + tr("The target file already exists, do you need to overwrite it?"), + QMessageBox::Ok | QMessageBox::Cancel); + + if(ret == QMessageBox::Cancel) + return; + } + + QVector<GpgKey> keys; + + mKeyList->getCheckedKeys(keys); + + for (const auto &key : keys) { + if (!GpgME::GpgContext::checkIfKeyCanEncr(key)) { + QMessageBox::information(nullptr, + tr("Invalid Operation"), + tr("The selected key contains a key that does not actually have a encrypt usage.<br/>") + + tr("<br/>For example the Following Key: <br/>") + key.uids.first().uid); + return; + + } + } + + if(!GpgFileOpera::encryptFile(mCtx, keys, path)) { + QMessageBox::critical(this, tr("Error"), tr("An error occurred during operation.")); + } + + fileTreeView->update(); + +} + +void MainWindow::slotFileDecrypt() { + QStringList *keyList; + keyList = mKeyList->getChecked(); + new FileEncryptionDialog(mCtx, *keyList, FileEncryptionDialog::Decrypt, this); +} + +void MainWindow::slotFileSign() { + QStringList *keyList; + keyList = mKeyList->getChecked(); + new FileEncryptionDialog(mCtx, *keyList, FileEncryptionDialog::Sign, this); +} + +void MainWindow::slotFileVerify() { + QStringList *keyList; + keyList = mKeyList->getChecked(); + new FileEncryptionDialog(mCtx, *keyList, FileEncryptionDialog::Verify, this); +} + +void MainWindow::slotEncryptSign() { + + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + QVector<GpgKey> keys; + mKeyList->getCheckedKeys(keys); + + if (keys.empty()) { + QMessageBox::critical(nullptr, tr("No Key Selected"), tr("No Key Selected")); + return; + } + + for (const auto &key : keys) { + if (!GpgME::GpgContext::checkIfKeyCanSign(key) || !GpgME::GpgContext::checkIfKeyCanEncr(key)) { + QMessageBox::information(nullptr, + tr("Invalid Operation"), + tr("The selected key cannot be used for signing and encryption at the same time.<br/>") + + tr("<br/>For example the Following Key: <br/>") + key.uids.first().uid); + return; + } + } + + auto *tmp = new QByteArray(); + gpgme_encrypt_result_t encr_result = nullptr; + gpgme_sign_result_t sign_result = nullptr; + + auto error = mCtx->encryptSign(keys, edit->curTextPage()->toPlainText().toUtf8(), tmp, &encr_result, &sign_result); + auto *tmp2 = new QString(*tmp); + edit->slotFillTextEditWithText(*tmp2); + + auto resultAnalyseEncr = new EncryptResultAnalyse(error, encr_result); + auto resultAnalyseSign = new SignResultAnalyse(error, sign_result); + int status = std::min(resultAnalyseEncr->getStatus(), resultAnalyseSign->getStatus()); + auto reportText = resultAnalyseEncr->getResultReport() + resultAnalyseSign->getResultReport(); + + infoBoard->associateTextEdit(edit->curTextPage()); + + if (status < 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); + else if (status > 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_OK); + else + infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); + + delete resultAnalyseEncr; + delete resultAnalyseSign; +} + +void MainWindow::slotDecryptVerify() { + + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + auto *decrypted = new QByteArray(); + QByteArray text = edit->curTextPage()->toPlainText().toUtf8(); + GpgME::GpgContext::preventNoDataErr(&text); + + gpgme_decrypt_result_t d_result = nullptr; + gpgme_verify_result_t v_result = nullptr; + // try decrypt, if fail do nothing, especially don't replace text + auto error = mCtx->decryptVerify(text, decrypted, &d_result, &v_result); + infoBoard->associateTextEdit(edit->curTextPage()); + + if(gpgme_err_code(error) == GPG_ERR_NO_ERROR) + edit->slotFillTextEditWithText(QString::fromUtf8(*decrypted)); + + auto resultAnalyseDecrypt = new DecryptResultAnalyse(mCtx, error, d_result); + auto resultAnalyseVerify = new VerifyResultAnalyse(mCtx, error, v_result); + + int status = std::min(resultAnalyseDecrypt->getStatus(), resultAnalyseVerify->getStatus()); + auto &reportText = resultAnalyseDecrypt->getResultReport() + resultAnalyseVerify->getResultReport(); + if (status < 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_CRITICAL); + else if (status > 0) + infoBoard->slotRefresh(reportText, INFO_ERROR_OK); + else + infoBoard->slotRefresh(reportText, INFO_ERROR_WARN); + + if (resultAnalyseVerify->getStatus() >= 0) { + infoBoard->resetOptionActionsMenu(); + infoBoard->addOptionalAction("Show Verify Details", [this, error, v_result]() { + VerifyDetailsDialog(this, mCtx, mKeyList, error, v_result); + }); + } + delete resultAnalyseDecrypt; + delete resultAnalyseVerify; +} diff --git a/src/ui/main_window/MainWindowSlotUI.cpp b/src/ui/main_window/MainWindowSlotUI.cpp new file mode 100644 index 00000000..cad8669a --- /dev/null +++ b/src/ui/main_window/MainWindowSlotUI.cpp @@ -0,0 +1,219 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#include "MainWindow.h" + +void MainWindow::slotAbout() { + new AboutDialog(this); +} + +void MainWindow::slotSetStatusBarText(const QString &text) { + statusBar()->showMessage(text, 20000); +} + +void MainWindow::slotStartWizard() { + auto *wizard = new Wizard(mCtx, keyMgmt, this); + wizard->show(); + wizard->setModal(true); +} + + +void MainWindow::slotCheckAttachmentFolder() { + // TODO: always check? + if (!settings.value("mime/parseMime").toBool()) { + return; + } + + QString attachmentDir = qApp->applicationDirPath() + "/attachments/"; + // filenum minus . and .. + uint filenum = QDir(attachmentDir).count() - 2; + if (filenum > 0) { + QString statusText; + if (filenum == 1) { + statusText = tr("There is one unencrypted file in attachment folder"); + } else { + statusText = tr("There are ") + QString::number(filenum) + tr(" unencrypted files in attachment folder"); + } + statusBarIcon->setStatusTip(statusText); + statusBarIcon->show(); + } else { + statusBarIcon->hide(); + } +} + +void MainWindow::slotImportKeyFromEdit() { + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == 0) { + return; + } + + keyMgmt->slotImportKeys(edit->curTextPage()->toPlainText().toUtf8()); +} + +void MainWindow::slotOpenKeyManagement() { + keyMgmt->show(); + keyMgmt->raise(); + keyMgmt->activateWindow(); +} + +void MainWindow::slotOpenFileTab() { + edit->slotNewFileTab(); +} + +void MainWindow::slotDisableTabActions(int number) { + bool disable; + + if (number == -1) + disable = true; + else + disable = false; + + printAct->setDisabled(disable); + saveAct->setDisabled(disable); + saveAsAct->setDisabled(disable); + quoteAct->setDisabled(disable); + cutAct->setDisabled(disable); + copyAct->setDisabled(disable); + pasteAct->setDisabled(disable); + closeTabAct->setDisabled(disable); + selectAllAct->setDisabled(disable); + findAct->setDisabled(disable); + verifyAct->setDisabled(disable); + signAct->setDisabled(disable); + encryptAct->setDisabled(disable); + decryptAct->setDisabled(disable); + + redoAct->setDisabled(disable); + undoAct->setDisabled(disable); + zoomOutAct->setDisabled(disable); + zoomInAct->setDisabled(disable); + cleanDoubleLinebreaksAct->setDisabled(disable); + quoteAct->setDisabled(disable); + appendSelectedKeysAct->setDisabled(disable); + importKeyFromEditAct->setDisabled(disable); + + cutPgpHeaderAct->setDisabled(disable); + addPgpHeaderAct->setDisabled(disable); +} + +void MainWindow::slotOpenSettingsDialog() { + + auto dialog = new SettingsDialog(mCtx, this); + + connect(dialog, &SettingsDialog::finished, this, [&] () -> void { + + qDebug() << "Setting Dialog Finished"; + + // Iconsize + QSize iconSize = settings.value("toolbar/iconsize", QSize(32, 32)).toSize(); + this->setIconSize(iconSize); + importButton->setIconSize(iconSize); + fileEncButton->setIconSize(iconSize); + + // Iconstyle + Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", + Qt::ToolButtonTextUnderIcon).toUInt()); + this->setToolButtonStyle(buttonStyle); + importButton->setToolButtonStyle(buttonStyle); + fileEncButton->setToolButtonStyle(buttonStyle); + + // Mime-settings + if (settings.value("mime/parseMime").toBool()) { + createAttachmentDock(); + } else if (attachmentDockCreated) { + closeAttachmentDock(); + } + + // restart mainwindow if necessary + if (getRestartNeeded()) { + if (edit->maybeSaveAnyTab()) { + saveSettings(); + qApp->exit(RESTART_CODE); + } + } + + // steganography hide/show + if (!settings.value("advanced/steganography").toBool()) { + this->menuBar()->removeAction(steganoMenu->menuAction()); + } else { + this->menuBar()->insertAction(viewMenu->menuAction(), steganoMenu->menuAction()); + } + }); + +} + +void MainWindow::slotCleanDoubleLinebreaks() { + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + QString content = edit->curTextPage()->toPlainText(); + content.replace("\n\n", "\n"); + edit->slotFillTextEditWithText(content); +} + +void MainWindow::slotAddPgpHeader() { + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + QString content = edit->curTextPage()->toPlainText().trimmed(); + + content.prepend("\n\n").prepend(GpgConstants::PGP_CRYPT_BEGIN); + content.append("\n").append(GpgConstants::PGP_CRYPT_END); + + edit->slotFillTextEditWithText(content); +} + +void MainWindow::slotCutPgpHeader() { + + if (edit->tabCount() == 0 || edit->slotCurPageTextEdit() == nullptr) { + return; + } + + QString content = edit->curTextPage()->toPlainText(); + int start = content.indexOf(GpgConstants::PGP_CRYPT_BEGIN); + int end = content.indexOf(GpgConstants::PGP_CRYPT_END); + + if (start < 0 || end < 0) { + return; + } + + // remove head + int headEnd = content.indexOf("\n\n", start) + 2; + content.remove(start, headEnd - start); + + // remove tail + end = content.indexOf(GpgConstants::PGP_CRYPT_END); + content.remove(end, QString(GpgConstants::PGP_CRYPT_END).size()); + + edit->slotFillTextEditWithText(content.trimmed()); +} + +void MainWindow::slotSetRestartNeeded(bool needed) { + this->restartNeeded = needed; +} + +bool MainWindow::getRestartNeeded() const { + return this->restartNeeded; +} diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp new file mode 100644 index 00000000..fba2fe62 --- /dev/null +++ b/src/ui/main_window/MainWindowUI.cpp @@ -0,0 +1,456 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#include "MainWindow.h" + +void MainWindow::createActions() { + /* Main Menu + */ + newTabAct = new QAction(tr("&New"), this); + newTabAct->setIcon(QIcon(":misc_doc.png")); + QList<QKeySequence> newTabActShortcutList; + newTabActShortcutList.append(QKeySequence(Qt::CTRL + Qt::Key_N)); + newTabActShortcutList.append(QKeySequence(Qt::CTRL + Qt::Key_T)); + newTabAct->setShortcuts(newTabActShortcutList); + newTabAct->setToolTip(tr("Open a new file")); + connect(newTabAct, SIGNAL(triggered()), edit, SLOT(slotNewTab())); + + openAct = new QAction(tr("&Open..."), this); + openAct->setIcon(QIcon(":fileopen.png")); + openAct->setShortcut(QKeySequence::Open); + openAct->setToolTip(tr("Open an existing file")); + connect(openAct, SIGNAL(triggered()), edit, SLOT(slotOpen())); + + saveAct = new QAction(tr("&Save"), this); + saveAct->setIcon(QIcon(":filesave.png")); + saveAct->setShortcut(QKeySequence::Save); + saveAct->setToolTip(tr("Save the current File")); + connect(saveAct, SIGNAL(triggered()), edit, SLOT(slotSave())); + + saveAsAct = new QAction(tr("Save &As") + "...", this); + saveAsAct->setIcon(QIcon(":filesaveas.png")); + saveAsAct->setShortcut(QKeySequence::SaveAs); + saveAsAct->setToolTip(tr("Save the current File as...")); + connect(saveAsAct, SIGNAL(triggered()), edit, SLOT(slotSaveAs())); + + printAct = new QAction(tr("&Print"), this); + printAct->setIcon(QIcon(":fileprint.png")); + printAct->setShortcut(QKeySequence::Print); + printAct->setToolTip(tr("Print Document")); + connect(printAct, SIGNAL(triggered()), edit, SLOT(slotPrint())); + + closeTabAct = new QAction(tr("&Close"), this); + closeTabAct->setShortcut(QKeySequence::Close); + closeTabAct->setToolTip(tr("Close file")); + connect(closeTabAct, SIGNAL(triggered()), edit, SLOT(slotCloseTab())); + + quitAct = new QAction(tr("&Quit"), this); + quitAct->setShortcut(QKeySequence::Quit); + quitAct->setIcon(QIcon(":exit.png")); + quitAct->setToolTip(tr("Quit Program")); + connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); + + /* Edit Menu + */ + undoAct = new QAction(tr("&Undo"), this); + undoAct->setShortcut(QKeySequence::Undo); + undoAct->setToolTip(tr("Undo Last Edit Action")); + connect(undoAct, SIGNAL(triggered()), edit, SLOT(slotUndo())); + + redoAct = new QAction(tr("&Redo"), this); + redoAct->setShortcut(QKeySequence::Redo); + redoAct->setToolTip(tr("Redo Last Edit Action")); + connect(redoAct, SIGNAL(triggered()), edit, SLOT(slotRedo())); + + zoomInAct = new QAction(tr("Zoom In"), this); + zoomInAct->setShortcut(QKeySequence::ZoomIn); + connect(zoomInAct, SIGNAL(triggered()), edit, SLOT(slotZoomIn())); + + zoomOutAct = new QAction(tr("Zoom Out"), this); + zoomOutAct->setShortcut(QKeySequence::ZoomOut); + connect(zoomOutAct, SIGNAL(triggered()), edit, SLOT(slotZoomOut())); + + pasteAct = new QAction(tr("&Paste"), this); + pasteAct->setIcon(QIcon(":button_paste.png")); + pasteAct->setShortcut(QKeySequence::Paste); + pasteAct->setToolTip(tr("Paste Text From Clipboard")); + connect(pasteAct, SIGNAL(triggered()), edit, SLOT(slotPaste())); + + cutAct = new QAction(tr("Cu&t"), this); + cutAct->setIcon(QIcon(":button_cut.png")); + cutAct->setShortcut(QKeySequence::Cut); + cutAct->setToolTip(tr("Cut the current selection's contents to the " + "clipboard")); + connect(cutAct, SIGNAL(triggered()), edit, SLOT(slotCut())); + + copyAct = new QAction(tr("&Copy"), this); + copyAct->setIcon(QIcon(":button_copy.png")); + copyAct->setShortcut(QKeySequence::Copy); + copyAct->setToolTip(tr("Copy the current selection's contents to the " + "clipboard")); + connect(copyAct, SIGNAL(triggered()), edit, SLOT(slotCopy())); + + quoteAct = new QAction(tr("&Quote"), this); + quoteAct->setIcon(QIcon(":quote.png")); + quoteAct->setToolTip(tr("Quote whole text")); + connect(quoteAct, SIGNAL(triggered()), edit, SLOT(slotQuote())); + + selectAllAct = new QAction(tr("Select &All"), this); + selectAllAct->setIcon(QIcon(":edit.png")); + selectAllAct->setShortcut(QKeySequence::SelectAll); + selectAllAct->setToolTip(tr("Select the whole text")); + connect(selectAllAct, SIGNAL(triggered()), edit, SLOT(slotSelectAll())); + + findAct = new QAction(tr("&Find"), this); + findAct->setShortcut(QKeySequence::Find); + findAct->setToolTip(tr("Find a word")); + connect(findAct, SIGNAL(triggered()), this, SLOT(slotFind())); + + cleanDoubleLinebreaksAct = new QAction(tr("Remove &spacing"), this); + cleanDoubleLinebreaksAct->setIcon(QIcon(":format-line-spacing-triple.png")); + //cleanDoubleLineBreaksAct->setShortcut(QKeySequence::SelectAll); + cleanDoubleLinebreaksAct->setToolTip(tr("Remove double linebreaks, e.g. in pasted text from webmailer")); + connect(cleanDoubleLinebreaksAct, SIGNAL(triggered()), this, SLOT(slotCleanDoubleLinebreaks())); + + openSettingsAct = new QAction(tr("Se&ttings"), this); + openSettingsAct->setToolTip(tr("Open settings dialog")); + openSettingsAct->setShortcut(QKeySequence::Preferences); + connect(openSettingsAct, SIGNAL(triggered()), this, SLOT(slotOpenSettingsDialog())); + + /* Crypt Menu + */ + encryptAct = new QAction(tr("&Encrypt"), this); + encryptAct->setIcon(QIcon(":encrypted.png")); + encryptAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_E)); + encryptAct->setToolTip(tr("Encrypt Message")); + connect(encryptAct, SIGNAL(triggered()), this, SLOT(slotEncrypt())); + + encryptSignAct = new QAction(tr("&Encrypt &Sign"), this); + encryptSignAct->setIcon(QIcon(":encrypted_signed.png")); + encryptSignAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_E)); + encryptSignAct->setToolTip(tr("Encrypt and Sign Message")); + connect(encryptSignAct, SIGNAL(triggered()), this, SLOT(slotEncryptSign())); + + decryptAct = new QAction(tr("&Decrypt"), this); + decryptAct->setIcon(QIcon(":decrypted.png")); + decryptAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D)); + decryptAct->setToolTip(tr("Decrypt Message")); + connect(decryptAct, SIGNAL(triggered()), this, SLOT(slotDecrypt())); + + decryptVerifyAct = new QAction(tr("&Decrypt &Verify"), this); + decryptVerifyAct->setIcon(QIcon(":decrypted_verified.png")); + decryptVerifyAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D)); + decryptVerifyAct->setToolTip(tr("Decrypt and Verify Message")); + connect(decryptVerifyAct, SIGNAL(triggered()), this, SLOT(slotDecryptVerify())); + + /* + * File encryption submenu + */ + fileEncryptAct = new QAction(tr("&Encrypt File"), this); + fileEncryptAct->setToolTip(tr("Encrypt File")); + connect(fileEncryptAct, SIGNAL(triggered()), this, SLOT(slotFileEncrypt())); + + fileDecryptAct = new QAction(tr("&Decrypt File"), this); + fileDecryptAct->setToolTip(tr("Decrypt File")); + connect(fileDecryptAct, SIGNAL(triggered()), this, SLOT(slotFileDecrypt())); + + fileSignAct = new QAction(tr("&Sign File"), this); + fileSignAct->setToolTip(tr("Sign File")); + connect(fileSignAct, SIGNAL(triggered()), this, SLOT(slotFileSign())); + + fileVerifyAct = new QAction(tr("&Verify File"), this); + fileVerifyAct->setToolTip(tr("Verify File")); + connect(fileVerifyAct, SIGNAL(triggered()), this, SLOT(slotFileVerify())); + + + signAct = new QAction(tr("&Sign"), this); + signAct->setIcon(QIcon(":signature.png")); + signAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_I)); + signAct->setToolTip(tr("Sign Message")); + connect(signAct, SIGNAL(triggered()), this, SLOT(slotSign())); + + verifyAct = new QAction(tr("&Verify"), this); + verifyAct->setIcon(QIcon(":verify.png")); + verifyAct->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_V)); + verifyAct->setToolTip(tr("Verify Message")); + connect(verifyAct, SIGNAL(triggered()), this, SLOT(slotVerify())); + + /* Key Menu + */ + + importKeyFromEditAct = new QAction(tr("&Editor"), this); + importKeyFromEditAct->setIcon(QIcon(":txt.png")); + importKeyFromEditAct->setToolTip(tr("Import New Key From Editor")); + connect(importKeyFromEditAct, SIGNAL(triggered()), this, SLOT(slotImportKeyFromEdit())); + + openKeyManagementAct = new QAction(tr("Manage &keys"), this); + openKeyManagementAct->setIcon(QIcon(":keymgmt.png")); + openKeyManagementAct->setToolTip(tr("Open Keymanagement")); + connect(openKeyManagementAct, SIGNAL(triggered()), this, SLOT(slotOpenKeyManagement())); + + /* About Menu + */ + aboutAct = new QAction(tr("&About"), this); + aboutAct->setIcon(QIcon(":help.png")); + aboutAct->setToolTip(tr("Show the application's About box")); + connect(aboutAct, SIGNAL(triggered()), this, SLOT(slotAbout())); + + startWizardAct = new QAction(tr("Open &Wizard"), this); + startWizardAct->setToolTip(tr("Open the wizard")); + connect(startWizardAct, SIGNAL(triggered()), this, SLOT(slotStartWizard())); + + /* Popup-Menu-Action for KeyList + */ + appendSelectedKeysAct = new QAction(tr("Append Selected Key(s) To Text"), this); + appendSelectedKeysAct->setToolTip(tr("Append The Selected Keys To Text in Editor")); + connect(appendSelectedKeysAct, SIGNAL(triggered()), this, SLOT(slotAppendSelectedKeys())); + + copyMailAddressToClipboardAct = new QAction(tr("Copy EMail-address"), this); + copyMailAddressToClipboardAct->setToolTip(tr("Copy selected EMailaddress to clipboard")); + connect(copyMailAddressToClipboardAct, SIGNAL(triggered()), this, SLOT(slotCopyMailAddressToClipboard())); + + // TODO: find central place for shared actions, to avoid code-duplication with keymgmt.cpp + showKeyDetailsAct = new QAction(tr("Show Key Details"), this); + showKeyDetailsAct->setToolTip(tr("Show Details for this Key")); + connect(showKeyDetailsAct, SIGNAL(triggered()), this, SLOT(slotShowKeyDetails())); + + refreshKeysFromKeyserverAct = new QAction(tr("Refresh Key From Key Server"), this); + refreshKeysFromKeyserverAct->setToolTip(tr("Refresh key from default key server")); + connect(refreshKeysFromKeyserverAct, SIGNAL(triggered()), this, SLOT(refreshKeysFromKeyserver())); + + uploadKeyToServerAct = new QAction(tr("Upload Public Key(s) To Server"), this); + uploadKeyToServerAct->setToolTip(tr("Upload The Selected Public Keys To Server")); + connect(uploadKeyToServerAct, SIGNAL(triggered()), this, SLOT(uploadKeyToServer())); + /* Key-Shortcuts for Tab-Switchung-Action + */ + switchTabUpAct = new QAction(this); + switchTabUpAct->setShortcut(QKeySequence::NextChild); + connect(switchTabUpAct, SIGNAL(triggered()), edit, SLOT(slotSwitchTabUp())); + this->addAction(switchTabUpAct); + + switchTabDownAct = new QAction(this); + switchTabDownAct->setShortcut(QKeySequence::PreviousChild); + connect(switchTabDownAct, SIGNAL(triggered()), edit, SLOT(slotSwitchTabDown())); + this->addAction(switchTabDownAct); + + cutPgpHeaderAct = new QAction(tr("Remove PGP Header"), this); + connect(cutPgpHeaderAct, SIGNAL(triggered()), this, SLOT(slotCutPgpHeader())); + + addPgpHeaderAct = new QAction(tr("Add PGP Header"), this); + connect(addPgpHeaderAct, SIGNAL(triggered()), this, SLOT(slotAddPgpHeader())); +} + +void MainWindow::createMenus() { + fileMenu = menuBar()->addMenu(tr("&File")); + fileMenu->addAction(newTabAct); + fileMenu->addAction(openAct); + fileMenu->addSeparator(); + fileMenu->addAction(saveAct); + fileMenu->addAction(saveAsAct); + fileMenu->addSeparator(); + fileMenu->addAction(printAct); + fileMenu->addSeparator(); + fileMenu->addAction(closeTabAct); + fileMenu->addAction(quitAct); + + editMenu = menuBar()->addMenu(tr("&Edit")); + editMenu->addAction(undoAct); + editMenu->addAction(redoAct); + editMenu->addSeparator(); + editMenu->addAction(zoomInAct); + editMenu->addAction(zoomOutAct); + editMenu->addSeparator(); + editMenu->addAction(copyAct); + editMenu->addAction(cutAct); + editMenu->addAction(pasteAct); + editMenu->addAction(selectAllAct); + editMenu->addAction(findAct); + editMenu->addSeparator(); + editMenu->addAction(quoteAct); + editMenu->addAction(cleanDoubleLinebreaksAct); + editMenu->addSeparator(); + editMenu->addAction(openSettingsAct); + + fileEncMenu = new QMenu(tr("&File...")); + fileEncMenu->addAction(fileEncryptAct); + fileEncMenu->addAction(fileDecryptAct); + fileEncMenu->addAction(fileSignAct); + fileEncMenu->addAction(fileVerifyAct); + + cryptMenu = menuBar()->addMenu(tr("&Crypt")); + cryptMenu->addAction(encryptAct); + cryptMenu->addAction(encryptSignAct); + cryptMenu->addAction(decryptAct); + cryptMenu->addAction(decryptVerifyAct); + cryptMenu->addSeparator(); + cryptMenu->addAction(signAct); + cryptMenu->addAction(verifyAct); + cryptMenu->addSeparator(); + cryptMenu->addMenu(fileEncMenu); + + keyMenu = menuBar()->addMenu(tr("&Keys")); + importKeyMenu = keyMenu->addMenu(tr("&Import Key")); + importKeyMenu->setIcon(QIcon(":key_import.png")); + importKeyMenu->addAction(keyMgmt->importKeyFromFileAct); + importKeyMenu->addAction(importKeyFromEditAct); + importKeyMenu->addAction(keyMgmt->importKeyFromClipboardAct); + importKeyMenu->addAction(keyMgmt->importKeyFromKeyServerAct); + importKeyMenu->addAction(keyMgmt->importKeyFromKeyServerAct); + keyMenu->addAction(openKeyManagementAct); + + steganoMenu = menuBar()->addMenu(tr("&Steganography")); + steganoMenu->addAction(cutPgpHeaderAct); + steganoMenu->addAction(addPgpHeaderAct); + + // Hide menu, when steganography menu is disabled in settings + if (!settings.value("advanced/steganography").toBool()) { + this->menuBar()->removeAction(steganoMenu->menuAction()); + } + + viewMenu = menuBar()->addMenu(tr("&View")); + + helpMenu = menuBar()->addMenu(tr("&Help")); + helpMenu->addAction(startWizardAct); + helpMenu->addSeparator(); + helpMenu->addAction(aboutAct); + +} + +void MainWindow::createToolBars() { + fileToolBar = addToolBar(tr("File")); + fileToolBar->setObjectName("fileToolBar"); + fileToolBar->addAction(newTabAct); + fileToolBar->addAction(openAct); + fileToolBar->addAction(saveAct); + fileToolBar->hide(); + viewMenu->addAction(fileToolBar->toggleViewAction()); + + cryptToolBar = addToolBar(tr("Crypt")); + cryptToolBar->setObjectName("cryptToolBar"); + cryptToolBar->addAction(encryptAct); + cryptToolBar->addAction(encryptSignAct); + cryptToolBar->addAction(decryptAct); + cryptToolBar->addAction(decryptVerifyAct); + cryptToolBar->addAction(signAct); + cryptToolBar->addAction(verifyAct); + viewMenu->addAction(cryptToolBar->toggleViewAction()); + + keyToolBar = addToolBar(tr("Key")); + keyToolBar->setObjectName("keyToolBar"); + keyToolBar->addAction(openKeyManagementAct); + viewMenu->addAction(keyToolBar->toggleViewAction()); + + editToolBar = addToolBar(tr("Edit")); + editToolBar->setObjectName("editToolBar"); + editToolBar->addAction(copyAct); + editToolBar->addAction(pasteAct); + editToolBar->addAction(selectAllAct); + viewMenu->addAction(editToolBar->toggleViewAction()); + + specialEditToolBar = addToolBar(tr("Special Edit")); + specialEditToolBar->setObjectName("specialEditToolBar"); + specialEditToolBar->addAction(quoteAct); + specialEditToolBar->addAction(cleanDoubleLinebreaksAct); + specialEditToolBar->hide(); + viewMenu->addAction(specialEditToolBar->toggleViewAction()); + + // Add dropdown menu for key import to keytoolbar + importButton = new QToolButton(); + importButton->setMenu(importKeyMenu); + importButton->setPopupMode(QToolButton::InstantPopup); + importButton->setIcon(QIcon(":key_import.png")); + importButton->setToolTip(tr("Import key from...")); + importButton->setText(tr("Import key")); + keyToolBar->addWidget(importButton); + + // Add dropdown menu for file encryption/decryption to crypttoolbar + fileEncButton = new QToolButton(); + // fileEncButton->setMenu(fileEncMenu); + connect(fileEncButton, SIGNAL(clicked(bool)), this, SLOT(slotOpenFileTab())); + fileEncButton->setPopupMode(QToolButton::InstantPopup); + fileEncButton->setIcon(QIcon(":fileencryption.png")); + fileEncButton->setToolTip(tr("Opera File")); + fileEncButton->setText(tr("File Crypto")); + cryptToolBar->addWidget(fileEncButton); + +} + +void MainWindow::createStatusBar() { + auto *statusBarBox = new QWidget(); + auto *statusBarBoxLayout = new QHBoxLayout(); + QPixmap *pixmap; + + // icon which should be shown if there are files in attachments-folder + pixmap = new QPixmap(":statusbar_icon.png"); + statusBarIcon = new QLabel(); + statusBar()->addWidget(statusBarIcon); + + statusBarIcon->setPixmap(*pixmap); + statusBar()->insertPermanentWidget(0, statusBarIcon, 0); + statusBarIcon->hide(); + statusBar()->showMessage(tr("Ready"), 2000); + statusBarBox->setLayout(statusBarBoxLayout); +} + +void MainWindow::createDockWindows() { + /* KeyList-Dockwindow + */ + keyListDock = new QDockWidget(tr("Key ToolBox"), this); + keyListDock->setObjectName("EncryptDock"); + keyListDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + keyListDock->setMinimumWidth(460); + addDockWidget(Qt::RightDockWidgetArea, keyListDock); + keyListDock->setWidget(mKeyList); + viewMenu->addAction(keyListDock->toggleViewAction()); + + infoBoardDock = new QDockWidget(tr("Information Board"), this); + infoBoardDock->setObjectName("Information Board"); + infoBoardDock->setAllowedAreas(Qt::BottomDockWidgetArea); + addDockWidget(Qt::BottomDockWidgetArea, infoBoardDock); + infoBoardDock->setWidget(infoBoard); + infoBoardDock->widget()->layout()->setContentsMargins(0, 0, 0, 0); + viewMenu->addAction(infoBoardDock->toggleViewAction()); + + /* Attachments-Dockwindow + */ + if (settings.value("mime/parseMime").toBool()) { + createAttachmentDock(); + } +} + +void MainWindow::createAttachmentDock() { + if (attachmentDockCreated) { + return; + } + mAttachments = new Attachments(); + attachmentDock = new QDockWidget(tr("Attached files:"), this); + attachmentDock->setObjectName("AttachmentDock"); + attachmentDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); + addDockWidget(Qt::LeftDockWidgetArea, attachmentDock); + attachmentDock->setWidget(mAttachments); + // hide till attachment is decrypted + viewMenu->addAction(attachmentDock->toggleViewAction()); + attachmentDock->hide(); + attachmentDockCreated = true; +} diff --git a/src/ui/Attachments.cpp b/src/ui/widgets/Attachments.cpp index 87b42fa5..8f741f66 100644 --- a/src/ui/Attachments.cpp +++ b/src/ui/widgets/Attachments.cpp @@ -37,7 +37,7 @@ */ -#include "ui/Attachments.h" +#include "ui/widgets/Attachments.h" Attachments::Attachments(QWidget *parent) : QWidget(parent) { diff --git a/src/ui/EditorPage.cpp b/src/ui/widgets/EditorPage.cpp index b09b7460..cb4ca5ef 100644 --- a/src/ui/EditorPage.cpp +++ b/src/ui/widgets/EditorPage.cpp @@ -22,7 +22,7 @@ * */ -#include "ui/EditorPage.h" +#include "ui/widgets/EditorPage.h" #include <utility> diff --git a/src/ui/widgets/FilePage.cpp b/src/ui/widgets/FilePage.cpp new file mode 100644 index 00000000..d1e04879 --- /dev/null +++ b/src/ui/widgets/FilePage.cpp @@ -0,0 +1,108 @@ +/** + * This file is part of GPGFrontend. + * + * GPGFrontend is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Foobar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from gpg4usb-team. + * Their source code version also complies with GNU General Public License. + * + * The source code version of this software was modified and released + * by Saturneric<[email protected]> starting on May 12, 2021. + * + */ + +#include "ui/widgets/FilePage.h" + +FilePage::FilePage(QWidget *parent) : QWidget(parent) { + qDebug() << "New File Page"; + + dirModel = new QFileSystemModel(); + dirModel->setRootPath(QDir::currentPath()); + + dirTreeView = new QTreeView(); + dirTreeView->setModel(dirModel); + dirTreeView->setAnimated(true); + dirTreeView->setIndentation(20); + dirTreeView->setRootIndex(dirModel->index(QDir::currentPath())); + + upLevelButton = new QPushButton("UP Level"); + connect(upLevelButton, SIGNAL(clicked(bool)), this, SLOT(slotUpLevel())); + + goPathButton = new QPushButton("Go Path"); + connect(goPathButton, SIGNAL(clicked(bool)), this, SLOT(slotGoPath())); + + pathEdit = new QLineEdit(); + pathEdit->setFixedWidth(520); + pathEdit->setText(dirModel->rootPath()); + + auto *menuLayout = new QHBoxLayout(); + menuLayout->addWidget(upLevelButton); + menuLayout->addWidget(pathEdit); + menuLayout->addWidget(goPathButton); + menuLayout->addStretch(0); + + auto *layout = new QVBoxLayout(); + layout->addLayout(menuLayout); + layout->addWidget(dirTreeView); + + this->setLayout(layout); + + connect(dirTreeView, SIGNAL(clicked(const QModelIndex &)), this, SLOT(fileTreeViewItemClicked(const QModelIndex &))); + connect(dirTreeView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(fileTreeViewItemDoubleClicked(const QModelIndex &))); + +} + +void FilePage::fileTreeViewItemClicked(const QModelIndex &index) { + mPath = dirModel->fileInfo(index).absoluteFilePath(); + qDebug() << "mPath" << mPath; +} + +void FilePage::slotUpLevel() { + QModelIndex currentRoot = dirTreeView->rootIndex(); + mPath = dirModel->fileInfo(currentRoot.parent()).absoluteFilePath(); + auto fileInfo = QFileInfo(mPath); + if(fileInfo.isDir() && fileInfo.isReadable() && fileInfo.isExecutable()) { + dirTreeView->setRootIndex(currentRoot.parent()); + pathEdit->setText(mPath); + } + qDebug() << "Current Root mPath" << mPath; +} + +void FilePage::fileTreeViewItemDoubleClicked(const QModelIndex &index) { + mPath = dirModel->fileInfo(index).absoluteFilePath(); + auto fileInfo = QFileInfo(mPath); + if(fileInfo.isDir() && fileInfo.isReadable() && fileInfo.isExecutable()) { + dirTreeView->setRootIndex(index); + pathEdit->setText(mPath); + } + qDebug() << "Index mPath" << mPath; +} + +QString FilePage::getSelected() const { + QModelIndex index = dirTreeView->currentIndex(); + QVariant data = dirTreeView->model()->data(index); + qDebug() << "Target Path" << mPath; + return data.toString(); +} + +void FilePage::slotGoPath() { + qDebug() << "getSelected" << pathEdit->text(); + auto fileInfo = QFileInfo(pathEdit->text()); + if(fileInfo.isDir() && fileInfo.isReadable() && fileInfo.isExecutable()) { + qDebug() << "Set Path" << fileInfo.filePath(); + dirTreeView->setRootIndex(dirModel->index(fileInfo.filePath())); + } else { + QMessageBox::critical(this, "Error", "The path is unprivileged or unreachable."); + } +} diff --git a/src/ui/HelpPage.cpp b/src/ui/widgets/HelpPage.cpp index f2f0da48..e018da81 100644 --- a/src/ui/HelpPage.cpp +++ b/src/ui/widgets/HelpPage.cpp @@ -22,7 +22,7 @@ * */ -#include "ui/HelpPage.h" +#include "ui/widgets/HelpPage.h" #include <utility> @@ -35,8 +35,6 @@ HelpPage::HelpPage(const QString &path, QWidget *parent) : mainLayout->addWidget(browser); mainLayout->setContentsMargins(0, 0, 0, 0); setLayout(mainLayout); - //setAttribute(Qt::WA_DeleteOnClose); - //browser->setSource(QUrl::fromLocalFile(path)); connect(browser, SIGNAL(anchorClicked(QUrl)), this, SLOT(slotOpenUrl(QUrl))); browser->setOpenLinks(false); diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp index 6982c3a2..581cc91c 100644 --- a/src/ui/widgets/KeyList.cpp +++ b/src/ui/widgets/KeyList.cpp @@ -31,7 +31,7 @@ KeyList::KeyList(GpgME::GpgContext *ctx, KeyListColumn::InfoType infoType, QWidget *parent) : QWidget(parent), mSelectType(selectType), mInfoType(infoType), appPath(qApp->applicationDirPath()), - settings(appPath + "/conf/gpgfrontend.ini", QSettings::IniFormat) + settings(RESOURCE_DIR(appPath) + "/conf/gpgfrontend.ini", QSettings::IniFormat) { mCtx = ctx; diff --git a/src/ui/TextEdit.cpp b/src/ui/widgets/TextEdit.cpp index 5a9206ca..00abe16f 100644 --- a/src/ui/TextEdit.cpp +++ b/src/ui/widgets/TextEdit.cpp @@ -22,7 +22,7 @@ * */ -#include "ui/TextEdit.h" +#include "ui/widgets/TextEdit.h" TextEdit::TextEdit() { countPage = 0; @@ -64,6 +64,14 @@ void TextEdit::slotNewHelpTab(const QString &title, const QString &path) const { } +void TextEdit::slotNewFileTab() const { + + auto *page = new FilePage(); + tabWidget->addTab(page, "File"); + tabWidget->setCurrentIndex(tabWidget->count() - 1); + +} + void TextEdit::slotOpen() { QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open file"), QDir::currentPath()); @@ -100,11 +108,11 @@ void TextEdit::slotOpen() { } void TextEdit::slotSave() { - if (tabWidget->count() == 0 || slotCurPage() == 0) { + if (tabWidget->count() == 0 || slotCurPageTextEdit() == 0) { return; } - QString fileName = slotCurPage()->getFilePath(); + QString fileName = slotCurPageTextEdit()->getFilePath(); if (fileName.isEmpty()) { //QString docname = tabWidget->tabText(tabWidget->currentIndex()); @@ -123,7 +131,7 @@ bool TextEdit::saveFile(const QString &fileName) { QFile file(fileName); if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { - EditorPage *page = slotCurPage(); + EditorPage *page = slotCurPageTextEdit(); QTextStream outputStream(&file); QApplication::setOverrideCursor(Qt::WaitCursor); @@ -150,11 +158,11 @@ bool TextEdit::saveFile(const QString &fileName) { bool TextEdit::slotSaveAs() { - if (tabWidget->count() == 0 || slotCurPage() == 0) { + if (tabWidget->count() == 0 || slotCurPageTextEdit() == 0) { return true; } - EditorPage *page = slotCurPage(); + EditorPage *page = slotCurPageTextEdit(); QString path; if (page->getFilePath() != "") { path = page->getFilePath(); @@ -170,7 +178,7 @@ bool TextEdit::slotSaveAs() { void TextEdit::slotCloseTab() { removeTab(tabWidget->currentIndex()); if (tabWidget->count() != 0) { - slotCurPage()->getTextPage()->setFocus(); + slotCurPageTextEdit()->getTextPage()->setFocus(); } } @@ -210,7 +218,7 @@ void TextEdit::removeTab(int index) { */ bool TextEdit::maybeSaveCurrentTab(bool askToSave) { - EditorPage *page = slotCurPage(); + EditorPage *page = slotCurPageTextEdit(); // if this page is no textedit, there should be nothing to save if (page == nullptr) { return true; @@ -331,11 +339,16 @@ int TextEdit::tabCount() const { return tabWidget->count(); } -EditorPage *TextEdit::slotCurPage() const { +EditorPage *TextEdit::slotCurPageTextEdit() const { auto *curPage = qobject_cast<EditorPage *>(tabWidget->currentWidget()); return curPage; } +FilePage *TextEdit::slotCurPageFileTreeView() const { + auto *curPage = qobject_cast<FilePage *>(tabWidget->currentWidget()); + return curPage; +} + void TextEdit::slotQuote() const { if (tabWidget->count() == 0 || curTextPage() == nullptr) { return; @@ -378,7 +391,7 @@ void TextEdit::loadFile(const QString &fileName) { QApplication::setOverrideCursor(Qt::WaitCursor); curTextPage()->setPlainText(in.readAll()); QApplication::restoreOverrideCursor(); - slotCurPage()->setFilePath(fileName); + slotCurPageTextEdit()->setFilePath(fileName); tabWidget->setTabText(tabWidget->currentIndex(), strippedName(fileName)); file.close(); // statusBar()->showMessage(tr("File loaded"), 2000); |