diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 9dfc1d6..b884f12 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -172,5 +172,6 @@ "portable-disabled-tooltip": "Function disabled in portable mode", "scroll-next-tab": "Scroll to next tab", "scroll-previous-tab": "Scroll to previous tab", - "kiwix-search": "Kiwix search" + "kiwix-search": "Kiwix search", + "search-options": "Search Options" } diff --git a/resources/i18n/qqq.json b/resources/i18n/qqq.json index 55846a1..2fdc8c7 100644 --- a/resources/i18n/qqq.json +++ b/resources/i18n/qqq.json @@ -180,5 +180,6 @@ "portable-disabled-tooltip": "Tooltip used to explain disabled components in the portable version.", "scroll-next-tab": "Represents the action of scrolling to the next tab of the current tab which toward the end of the tab bar.", "scroll-previous-tab": "Represents the action of scrolling to the previous tab of the current tab which toward the start of the tab bar.", - "kiwix-search": "Title text for a list of search results, which notes to the user those are from Kiwix's Search Engine" + "kiwix-search": "Title text for a list of search results, which notes to the user those are from Kiwix's Search Engine", + "search-options": "The term for a collection of additional search filtering options to help users narrow down search results." } diff --git a/src/kiwixapp.cpp b/src/kiwixapp.cpp index f9be1da..c1b8689 100644 --- a/src/kiwixapp.cpp +++ b/src/kiwixapp.cpp @@ -438,6 +438,8 @@ void KiwixApp::createActions() CREATE_ACTION_SHORTCUT(ToggleTOCAction, gt("table-of-content"), QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_1)); HIDE_ACTION(ToggleTOCAction); + CREATE_ACTION_ICON_SHORTCUT(OpenMultiZimAction, "filter", gt("search-options"), QKeySequence(Qt::CTRL | Qt::Key_M)); + CREATE_ACTION_ONOFF_ICON_SHORTCUT(ToggleReadingListAction, "reading-list-active", "reading-list", gt("reading-list"), QKeySequence(Qt::CTRL | Qt::Key_B)); CREATE_ACTION(ExportReadingListAction, gt("export-reading-list")); diff --git a/src/kiwixapp.h b/src/kiwixapp.h index fa422fc..d8524c0 100644 --- a/src/kiwixapp.h +++ b/src/kiwixapp.h @@ -39,6 +39,7 @@ public: BrowseLibraryAction, OpenFileAction, OpenRecentAction, + OpenMultiZimAction, SavePageAsAction, SearchArticleAction, SearchLibraryAction, diff --git a/src/mainmenu.cpp b/src/mainmenu.cpp index 0766671..1d55091 100644 --- a/src/mainmenu.cpp +++ b/src/mainmenu.cpp @@ -35,6 +35,7 @@ MainMenu::MainMenu(QWidget *parent) : m_editMenu.ADD_ACTION(SearchLibraryAction); m_editMenu.ADD_ACTION(FindInPageAction); m_editMenu.ADD_ACTION(ToggleAddBookmarkAction); + m_editMenu.ADD_ACTION(OpenMultiZimAction); addMenu(&m_editMenu); m_viewMenu.setTitle(gt("view")); diff --git a/src/multizimbutton.cpp b/src/multizimbutton.cpp index 10850e5..7341670 100644 --- a/src/multizimbutton.cpp +++ b/src/multizimbutton.cpp @@ -13,6 +13,8 @@ MultiZimButton::MultiZimButton(QWidget *parent) : { setMenu(new QMenu(this)); setPopupMode(QToolButton::InstantPopup); + setDefaultAction(KiwixApp::instance()->getAction(KiwixApp::OpenMultiZimAction)); + connect(this, &QToolButton::triggered, this, &MultiZimButton::showMenu); const auto popupAction = new QWidgetAction(menu()); popupAction->setDefaultWidget(mp_buttonList);