From 1ce385b363c11cda3612ca4fe7655be90be2971f Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Mon, 5 Feb 2024 11:06:12 +1300 Subject: [PATCH] Desktop: Add Button and Link to 'Contribute' Page. Add a button that opens the 'Contribute' page to the 'About' dialogue, to encourage more users to start to contribute. Requires https://github.com/subsurface/new-website/pull/36 to be deployed to have a valid link target. Signed-off-by: Michael Keller --- CHANGELOG.md | 1 + desktop-widgets/about.cpp | 9 +++++++-- desktop-widgets/about.h | 1 + desktop-widgets/about.ui | 8 ++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 407d557ac..1f5d6e9ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +desktop: add a button linking to the 'Contribute' page desktop: fix gas switches in UDDF exports core: allow of up to 6 O2 sensors (and corresponding voting logic) desktop: add divemode as a possible dive list column diff --git a/desktop-widgets/about.cpp b/desktop-widgets/about.cpp index 5582648e3..1d16f8357 100644 --- a/desktop-widgets/about.cpp +++ b/desktop-widgets/about.cpp @@ -30,12 +30,17 @@ void SubsurfaceAbout::on_licenseButton_clicked() QDesktopServices::openUrl(QUrl("http://www.gnu.org/licenses/gpl-2.0.txt")); } +void SubsurfaceAbout::on_contributeButton_clicked() +{ + QDesktopServices::openUrl(QUrl("http://subsurface-divelog.org/contribute/")); +} + void SubsurfaceAbout::on_websiteButton_clicked() { - QDesktopServices::openUrl(QUrl("http://subsurface-divelog.org")); + QDesktopServices::openUrl(QUrl("http://subsurface-divelog.org/")); } void SubsurfaceAbout::on_creditButton_clicked() { - QDesktopServices::openUrl(QUrl("http://subsurface-divelog.org/misc/credits")); + QDesktopServices::openUrl(QUrl("http://subsurface-divelog.org/credits/")); } diff --git a/desktop-widgets/about.h b/desktop-widgets/about.h index 45f04637e..81feb2474 100644 --- a/desktop-widgets/about.h +++ b/desktop-widgets/about.h @@ -13,6 +13,7 @@ public: private slots: void on_licenseButton_clicked(); + void on_contributeButton_clicked(); void on_websiteButton_clicked(); void on_creditButton_clicked(); diff --git a/desktop-widgets/about.ui b/desktop-widgets/about.ui index 3062f5f62..2bda45407 100644 --- a/desktop-widgets/about.ui +++ b/desktop-widgets/about.ui @@ -91,6 +91,13 @@ + + + + C&ontribute + + + @@ -125,6 +132,7 @@ licenseButton creditButton + contributeButton websiteButton closeButton