diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 1ec2ead..3628f7a 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -24,7 +24,7 @@ string(REGEX REPLACE "\n\n([^\n]+)" "

\\1

" GUI_ABOUT_LICENSE ${GUI_ABOUT_L string(REGEX REPLACE "\n" "" GUI_ABOUT_LICENSE ${GUI_ABOUT_LICENSE}) string(REGEX REPLACE "\<(.+)\>" "- \\1" GUI_ABOUT_AUTHOR ${PROJECT_MAINTAINER}) -configure_file(gui_about.h.in "${CMAKE_CURRENT_BINARY_DIR}/gui_about.h" @ONLY ESCAPE_QUOTES) +configure_file(gui_text.h.in "${CMAKE_CURRENT_BINARY_DIR}/gui_text.h" @ONLY ESCAPE_QUOTES) include_directories(${CMAKE_CURRENT_BINARY_DIR}) # -------------------------------- diff --git a/gui/gui_about.h.in b/gui/gui_text.h.in similarity index 57% rename from gui/gui_about.h.in rename to gui/gui_text.h.in index 1f6ab9f..a8a1cff 100644 --- a/gui/gui_about.h.in +++ b/gui/gui_text.h.in @@ -21,12 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_GUI_ABOUT_H -#define EOSIOKEYGEN_GUI_ABOUT_H +#ifndef EOSIOKEYGEN_GUI_TEXT_H +#define EOSIOKEYGEN_GUI_TEXT_H -#define EOSIOKEYGEN_GUI_ABOUT_TITLE "@PROJECT_NAME@ - About" +#include -#define EOSIOKEYGEN_GUI_ABOUT_TEXT \ +#define EOSIOKEYGEN_GUI_TEXT_ABOUT_TITLE "@PROJECT_NAME@ - About" + +#define EOSIOKEYGEN_GUI_TEXT_ABOUT_BODY \ "

@PROJECT_NAME@ - v@PROJECT_VERSION@

" \ "

@PROJECT_DESCRIPTION@

" \ "

@PROJECT_HOMEPAGE_URL@

" \ @@ -34,4 +36,19 @@ "

Author

" \ "

@GUI_ABOUT_AUTHOR@

" -#endif /* EOSIOKEYGEN_CONFIG_ABOUT_H */ +#define EOSIOKEYGEN_GUI_TEXT_DICT_LANG_TOOLTIP \ + "

Highlight words from given language dictionary in the found keys (note that the words " \ + "are not used for search. only for highlight output).

" \ + "

There can be more then one language. In that case contents " \ + "of all languges are merged into one dictionary.

" \ + "

The langauges are stored in files at " CONFIG_SHARE_FULL_PATH "/dict

" + + +#define EOSIOKEYGEN_GUI_TEXT_DICT_FILE_TOOLTIP \ + "

Use words found in file (separated by newline) to highlight " \ + "words in the keys found (note that the words in this " \ + "file are not used for search. only for highlight output).

" \ + "

There can be more then one file. In that case contents " \ + "of all files are merged into one dictionary.

" + +#endif /* EOSIOKEYGEN_GUI_TEXT_H */ diff --git a/gui/src/MainWindow.cpp b/gui/src/MainWindow.cpp index ce2d579..cfed710 100644 --- a/gui/src/MainWindow.cpp +++ b/gui/src/MainWindow.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "gui_about.h" +#include "gui_text.h" #include "GenerateWindow.hpp" #include "SearchWindow.hpp" #include "MainWindow.hpp" @@ -59,5 +59,7 @@ void MainWindow::switchToSearch() void MainWindow::showAbout() { - QMessageBox::about(this, EOSIOKEYGEN_GUI_ABOUT_TITLE, EOSIOKEYGEN_GUI_ABOUT_TEXT); + QMessageBox::about(this, + EOSIOKEYGEN_GUI_TEXT_ABOUT_TITLE, + EOSIOKEYGEN_GUI_TEXT_ABOUT_BODY); } diff --git a/gui/src/SearchWindow.cpp b/gui/src/SearchWindow.cpp index 42b54ff..2128fed 100644 --- a/gui/src/SearchWindow.cpp +++ b/gui/src/SearchWindow.cpp @@ -31,6 +31,7 @@ #include #include #include +#include "gui_text.h" #include "config.hpp" #include "helpers.hpp" #include "SearchWindow.hpp" @@ -61,6 +62,9 @@ m_btn_clear ("Clear") // First row. m_dict_lang.addItems(get_files(CONFIG_DICT_FULL_PATH)); + m_dict_lang.setToolTip(EOSIOKEYGEN_GUI_TEXT_DICT_LANG_TOOLTIP); + m_dict_file.setToolTip(EOSIOKEYGEN_GUI_TEXT_DICT_FILE_TOOLTIP); + m_layout.addWidget(&m_dict_lang, 0, 0); m_layout.addWidget(&m_dict_file, 0, 1);