Skip to content

Commit

Permalink
Add discord+website help menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Jun 25, 2019
1 parent e5066a0 commit 49bb939
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
12 changes: 12 additions & 0 deletions src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,8 @@
<string>&amp;Help</string>
</property>
<addaction name="actionDonate"/>
<addaction name="actionDiscord"/>
<addaction name="actionWebsite"/>
<addaction name="actionCheck_for_Updates"/>
<addaction name="actionAbout"/>
</widget>
Expand Down Expand Up @@ -1337,6 +1339,16 @@
<string>&amp;Send Duke Feedback</string>
</property>
</action>
<action name="actionDiscord">
<property name="text">
<string>&amp;Hush Discord</string>
</property>
</action>
<action name="actionWebsite">
<property name="text">
<string>&amp;Hush Website</string>
</property>
</action>
<action name="actionCheck_for_Updates">
<property name="text">
<string>Check github.com for &amp;updates</string>
Expand Down

0 comments on commit 49bb939

Please sign in to comment.