From 49bb9395a28052463fdcedeccf53eb9377a8dd4a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 25 Jun 2019 18:55:38 -0400 Subject: [PATCH] Add discord+website help menu items --- src/mainwindow.cpp | 15 ++++++++++++++- src/mainwindow.h | 2 ++ src/mainwindow.ui | 12 ++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 147d9536..c2858821 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -37,9 +37,13 @@ MainWindow::MainWindow(QWidget *parent) : // Set up exit action QObject::connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close); - // Set up donate action + // Set up feedback action QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate); + QObject::connect(ui->actionDiscord, &QAction::triggered, this, &MainWindow::discord); + + QObject::connect(ui->actionWebsite, &QAction::triggered, this, &MainWindow::website); + // Set up check for updates action QObject::connect(ui->actionCheck_for_Updates, &QAction::triggered, [=] () { // Silent is false, so show notification even if no update was found @@ -600,6 +604,15 @@ void MainWindow::addressBook() { AddressBook::open(this); } +void MainWindow::discord() { + QString url = "https://myhush.org/discord/"; + QDesktopServices::openUrl(QUrl(url)); +} + +void MainWindow::website() { + QString url = "https://myhush.org"; + QDesktopServices::openUrl(QUrl(url)); +} void MainWindow::donate() { removeExtraAddresses(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 692e746a..157b8211 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -110,6 +110,8 @@ class MainWindow : public QMainWindow void setMemoEnabled(int number, bool enabled); void donate(); + void website(); + void discord(); void addressBook(); void postToZBoard(); void importPrivKey(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index c230e898..3d049255 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1290,6 +1290,8 @@ &Help + + @@ -1337,6 +1339,16 @@ &Send Duke Feedback + + + &Hush Discord + + + + + &Hush Website + + Check github.com for &updates