Skip to content

Commit

Permalink
Adding shortcut for knowledge tool Mind menu to be started from anywh…
Browse files Browse the repository at this point in the history
…ere.
  • Loading branch information
dvorka committed Feb 11, 2024
1 parent 89563bc commit e3faa18
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/src/qt/main_menu_presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ MainMenuPresenter::MainMenuPresenter(MainWindowPresenter* mwp)
QObject::connect(
view->actionMindWingman, SIGNAL(triggered()),
mwp, SLOT(handleActionWingman()));
QObject::connect(
view->actionMindTool, SIGNAL(triggered()),
mwp, SLOT(doActionRunToolDialogAnywhere()));
QObject::connect(
view->actionMindThink, SIGNAL(triggered()),
mwp, SLOT(doActionMindToggleThink()));
Expand Down
5 changes: 5 additions & 0 deletions app/src/qt/main_menu_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView)
actionMindWingman->setShortcut(QKeySequence(Qt::CTRL+Qt::Key_Slash));
actionMindWingman->setStatusTip(tr("Open Wingman dialog..."));

actionMindTool = new QAction(QIcon(":/menu-icons/find.svg"), tr("&Find on Web"), mainWindow);
actionMindTool->setShortcut(QKeySequence(Qt::ALT+Qt::Key_1));
actionMindTool->setStatusTip(tr("Find Notebook or Note name; selected text or text under cursor on the web..."));

// scope ... don't show any N/O older than 1Y/3M/...
actionMindScope = new QAction(QIcon(":/menu-icons/filter.svg"), tr("S&cope"), mainWindow);
actionMindScope->setStatusTip(tr("Don't show Notebooks and Notes older than..."));
Expand Down Expand Up @@ -186,6 +190,7 @@ MainMenuView::MainMenuView(MainWindowView& mainWindowView)
menuMind->addAction(actionMindThink);
menuMind->addAction(actionMindAutolink);
menuMind->addAction(actionMindWingman);
menuMind->addAction(actionMindTool);
menuMind->addAction(actionMindScope);
menuMind->addSeparator();
menuMind->addMenu(submenuMindLibrary);
Expand Down
1 change: 1 addition & 0 deletions app/src/qt/main_menu_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class MainMenuView : public QObject
QAction* actionMindThink;
QAction* actionMindAutolink;
QAction* actionMindWingman;
QAction* actionMindTool;
QAction* actionMindScope;
QAction* actionMindForget;
QAction* actionMindSnapshot;
Expand Down
5 changes: 0 additions & 5 deletions app/src/qt/main_window_presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@ MainWindowPresenter::MainWindowPresenter(MainWindowView& view)
orloj->getOutlineHeaderEdit()->getView()->getHeaderEditor(), SIGNAL(signalPasteImageData(QImage)),
this, SLOT(doActionEditPasteImageData(QImage))
);
QObject::connect(
new QShortcut(QKeySequence("Alt+1"), view.getOrloj()), SIGNAL(activated()),
this, SLOT(doActionRunToolDialogAnywhere())
);
// wire TOP toolbar signals
QObject::connect(
view.getToolBar()->actionNewOutlineOrNote, SIGNAL(triggered()),
this, SLOT(doActionOutlineOrNoteNew())
Expand Down

0 comments on commit e3faa18

Please sign in to comment.