Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/beta-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
robert7 committed Aug 22, 2018
2 parents 6c2c5b9 + dc930f7 commit 033aab1
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion development/build-with-qmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* 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
* Restored option to open notes in new tab


### v2.1.0-beta-1
Expand Down
11 changes: 11 additions & 0 deletions src/gui/nmainmenubar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/gui/nmainmenubar.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class NMainMenuBar : public QMenuBar

public slots:
void onOpenProjectWebPage();
void onOpenGettingStartedWebPage();
void openThemeInformation();
};

Expand Down
14 changes: 13 additions & 1 deletion src/gui/ntableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -1559,10 +1564,17 @@ void NTableView::mouseMoveEvent(QMouseEvent *event) {
void NTableView::openNoteExternalWindowTriggered() {
QList<qint32> 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());
}
Expand Down
7 changes: 3 additions & 4 deletions src/gui/ntableview.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class NTableView : public QTableView
QAction *deleteNoteAction;
QAction *restoreNoteAction;
QAction *openNoteExternalWindowAction;
QAction *openNoteNewTabAction;
QAction *copyNoteLinkAction;
QAction *copyNoteAction;
QAction *pinNoteAction;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 033aab1

Please sign in to comment.