Skip to content

Commit

Permalink
add online help
Browse files Browse the repository at this point in the history
  • Loading branch information
mammix2 committed Apr 19, 2017
1 parent 1c3ca0f commit 50445a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/qt/bitcoingui.cpp
Expand Up @@ -321,6 +321,8 @@ void BitcoinGUI::createActions()
#endif
aboutQtAction->setToolTip(tr("Show information about Qt"));
aboutQtAction->setMenuRole(QAction::AboutQtRole);
aboutOnlineHelp->setToolTip(tr("Find help online"));
aboutOnlineHelp = new QAction(QIcon(":/icons/bitcoin"), tr("&Online help"), this);
optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
optionsAction->setToolTip(tr("Modify configuration options for BoostCoin"));
optionsAction->setMenuRole(QAction::PreferencesRole);
Expand All @@ -347,6 +349,7 @@ void BitcoinGUI::createActions()
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
connect(SplitStakeAction, SIGNAL(triggered()), this, SLOT(charityClicked()));
connect(aboutOnlineHelp, SIGNAL(triggered()), this, SLOT(aboutOnlineHelpClicked()));
connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
Expand Down Expand Up @@ -406,6 +409,7 @@ void BitcoinGUI::createMenuBar()
help->addSeparator();
help->addAction(aboutAction);
help->addAction(aboutQtAction);
help->addAction(aboutOnlineHelp);
}

void BitcoinGUI::createToolBars(QToolBar* toolbar)
Expand Down Expand Up @@ -559,6 +563,11 @@ void BitcoinGUI::aboutClicked()
dlg.exec();
}

void BitcoinGUI::aboutOnlineHelpClicked()
{
QDesktopServices::openUrl(QUrl("https://bost.link/Help/index.html", QUrl::TolerantMode));
}

void BitcoinGUI::charityClicked()
{
charityDialog dlg;
Expand Down
3 changes: 3 additions & 0 deletions src/qt/bitcoingui.h
Expand Up @@ -47,6 +47,7 @@ class BitcoinGUI : public QMainWindow
functionality.
*/
void setWalletModel(WalletModel *walletModel);
QAction *aboutOnlineHelp;

protected:
void changeEvent(QEvent *e);
Expand Down Expand Up @@ -139,6 +140,8 @@ public slots:
*/
void askFee(qint64 nFeeRequired, bool *payFee);
void handleURI(QString strURI);
/** Show Online help pages*/
void aboutOnlineHelpClicked();

private slots:
/** Switch to overview (home) page */
Expand Down

0 comments on commit 50445a6

Please sign in to comment.