From 78d601706678925a1a43c384f3c0fb78e424b9e7 Mon Sep 17 00:00:00 2001 From: Robert Spiegel <1135218+robert7@users.noreply.github.com> Date: Fri, 17 Aug 2018 16:20:11 +0200 Subject: [PATCH 1/3] Added new menu option Help/Getting started --- docs/CHANGELOG.md | 1 + src/gui/nmainmenubar.cpp | 11 +++++++++++ src/gui/nmainmenubar.h | 1 + 3 files changed, 13 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index dd735958..0f8dd013 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,6 +7,7 @@ * Updated translation files with string from source code * Fixed: deleting tag crashes app * Fixed tray icon behaviour in some special cases (show trayicon now defaults to true) +* Added new menu option Help/Getting started ### v2.1.0-beta-1 diff --git a/src/gui/nmainmenubar.cpp b/src/gui/nmainmenubar.cpp index c87afdd3..ed8ac360 100644 --- a/src/gui/nmainmenubar.cpp +++ b/src/gui/nmainmenubar.cpp @@ -511,6 +511,13 @@ void NMainMenuBar::setupHelpMenu() { connect(openProjectWebPageAction, SIGNAL(triggered()), this, SLOT(onOpenProjectWebPage())); helpMenu->addAction(openProjectWebPageAction); + QAction *openGettingStartedWebPageAction = new QAction(tr("&Getting started"), this); + openGettingStartedWebPageAction->setToolTip(tr("Open Getting started wiki page")); + connect(openGettingStartedWebPageAction, SIGNAL(triggered()), this, SLOT(onOpenGettingStartedWebPage())); + helpMenu->addAction(openGettingStartedWebPageAction); + + helpMenu->addSeparator(); + themeInformationAction = new QAction(tr("Theme &Information"), this); // themeInformationAction->setToolTip(tr("View information about the current theme.")); // connect(themeInformationAction, SIGNAL(triggered()), this, SLOT(openThemeInformation())); @@ -569,6 +576,10 @@ void NMainMenuBar::onOpenProjectWebPage() { QDesktopServices::openUrl(QUrl(NN_GITHUB_WIKI_URL)); } +void NMainMenuBar::onOpenGettingStartedWebPage() { + QDesktopServices::openUrl(QUrl(NN_GITHUB_WIKI_URL "/Getting-started")); +} + void NMainMenuBar::setupThemeMenu() { themeMenu = editMenu->addMenu(tr("Theme")); QStringList list = global.getThemeNames(); diff --git a/src/gui/nmainmenubar.h b/src/gui/nmainmenubar.h index 4e8db364..18e7f4a1 100644 --- a/src/gui/nmainmenubar.h +++ b/src/gui/nmainmenubar.h @@ -130,6 +130,7 @@ class NMainMenuBar : public QMenuBar public slots: void onOpenProjectWebPage(); + void onOpenGettingStartedWebPage(); void openThemeInformation(); }; From b6ecd076120be991f5a9cc4893eba4b692c086af Mon Sep 17 00:00:00 2001 From: Robert Spiegel <1135218+robert7@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:57:31 +0200 Subject: [PATCH 2/3] Adjusted comment in build script --- development/build-with-qmake.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/development/build-with-qmake.sh b/development/build-with-qmake.sh index a6faaf22..806af8be 100755 --- a/development/build-with-qmake.sh +++ b/development/build-with-qmake.sh @@ -69,6 +69,6 @@ fi ${QMAKE_BINARY} CONFIG+=${BUILD_TYPE} PREFIX=appdir/usr || error_exit "qmake" make || error_exit "make" -# this is a bit hack: we rerun qmake, to generated "install" incl. created binary +# this is a bit hack: we rerun qmake, to generate "install" incl. just created created binary ${QMAKE_BINARY} CONFIG+=${BUILD_TYPE} PREFIX=appdir/usr || error_exit "qmake (2nd)" make install || error_exit "make install" From dc930f714e8de53a1e47e370c4883e85a7171eca Mon Sep 17 00:00:00 2001 From: Robert Spiegel <1135218+robert7@users.noreply.github.com> Date: Wed, 22 Aug 2018 19:02:30 +0200 Subject: [PATCH 3/3] Restored possibility to open notes in new tab --- docs/CHANGELOG.md | 1 + src/gui/ntableview.cpp | 14 +++++++++++++- src/gui/ntableview.h | 7 +++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 0f8dd013..7faaba69 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -8,6 +8,7 @@ * Fixed: deleting tag crashes app * Fixed tray icon behaviour in some special cases (show trayicon now defaults to true) * Added new menu option Help/Getting started +* Restored option to open notes in new tab ### v2.1.0-beta-1 diff --git a/src/gui/ntableview.cpp b/src/gui/ntableview.cpp index e3bd9dbd..6a1c7382 100644 --- a/src/gui/ntableview.cpp +++ b/src/gui/ntableview.cpp @@ -204,6 +204,11 @@ NTableView::NTableView(QWidget *parent) : connect(openNoteExternalWindowAction, SIGNAL(triggered()), this, SLOT(openNoteExternalWindowTriggered())); openNoteExternalWindowAction->setFont(global.getGuiFont(font())); + openNoteNewTabAction = new QAction(tr("Open Note In New Tab"), this); + contextMenu->addAction(openNoteNewTabAction); + connect(openNoteNewTabAction, SIGNAL(triggered()), this, SLOT(openNoteNewTabTriggered())); + openNoteNewTabAction->setFont(global.getGuiFont(font())); + contextMenu->addSeparator(); addNoteAction = new QAction(tr("Add Note"), this); @@ -1559,10 +1564,17 @@ void NTableView::mouseMoveEvent(QMouseEvent *event) { void NTableView::openNoteExternalWindowTriggered() { QList lids; getSelectedLids(lids); - for (int i = 0; i < lids.size(); i++) + for (int i = 0; i < lids.size(); i++) { emit(openNoteExternalWindow(lids[i])); + } } + +void NTableView::openNoteNewTabTriggered() { + this->openSelectedLids(true); +} + + void NTableView::createNewNote() { emit(newNote()); } diff --git a/src/gui/ntableview.h b/src/gui/ntableview.h index 20ebef22..0bfd6c66 100644 --- a/src/gui/ntableview.h +++ b/src/gui/ntableview.h @@ -69,6 +69,7 @@ class NTableView : public QTableView QAction *deleteNoteAction; QAction *restoreNoteAction; QAction *openNoteExternalWindowAction; + QAction *openNoteNewTabAction; QAction *copyNoteLinkAction; QAction *copyNoteAction; QAction *pinNoteAction; @@ -115,11 +116,9 @@ public slots: void deleteSelectedNotes(); void restoreSelectedNotes(); - // disabled as for now - //void openNoteContextMenuTriggered(); - //void openNoteNewTabTriggered(); - + void openNoteNewTabTriggered(); void openNoteExternalWindowTriggered(); + void copyNoteLink(); void toggleColumnVisible(int position, bool visible); void copyNote();