aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorConfuSomu2024-05-15 19:14:26 -0400
committerConfuSomu2024-05-15 19:14:26 -0400
commita7de3bfca7282dcbb65dc1a23813e23ebeee4d02 (patch)
treed4c03de9f1adde5ba22154f767142356a09a3885 /src
parentcd85a7d47ffe22ec2581adf88f9cb70a5537f5a9 (diff)
downloadActorViewer-a7de3bfca7282dcbb65dc1a23813e23ebeee4d02.tar
ActorViewer-a7de3bfca7282dcbb65dc1a23813e23ebeee4d02.tar.gz
ActorViewer-a7de3bfca7282dcbb65dc1a23813e23ebeee4d02.zip
Hide Open URL… action if built without mastodonpp
This option doesn't work without mastodonpp, so I think that it might be better to hide it.
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp6
-rw-r--r--src/settingsdialog.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 7789cf4..296c961 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -48,7 +48,13 @@ void MainWindow::create_initial_tabs() {
connect(ui->actionRandom_status, &QAction::triggered, activity_list_tab, &TabActivityList::on_buttonRandom_clicked);
connect(ui->actionCopy_status, &QAction::triggered, activity_list_tab, &TabActivityList::on_buttonCopy_clicked);
connect(ui->actionFind, &QAction::triggered, activity_list_tab, &TabActivityList::on_buttonSearch_clicked);
+#ifdef MASTODONPP_BUILD
+ // Only display if mastodonpp build
+ // TODO: This should be more precise if we ever add other Fedi APIs.
connect(ui->actionOpen_URL, &QAction::triggered, activity_list_tab, &TabActivityList::actionOpen_URL_triggered);
+#else
+ ui->actionOpen_URL->deleteLater();
+#endif
connect(ui->menuView, &QMenu::aboutToHide, activity_list_tab, &TabActivityList::menuView_aboutToHide);
connect(this, &MainWindow::new_archive_opened, activity_list_tab, [=](bool is_valid) {
if (is_valid)
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
index 387c1e9..0db1319 100644
--- a/src/settingsdialog.cpp
+++ b/src/settingsdialog.cpp
@@ -22,7 +22,7 @@ SettingsDialog::SettingsDialog(QWidget* parent)
#ifndef MASTODONPP_BUILD
// Disable unusable settings
- // This should be more precise if we ever add other fedi APIs, as it would disable all of them and not only the Mastodon one
+ // TODO: This should be more precise if we ever add other Fedi APIs, as it would disable all of them and not only the Mastodon one.
ui->remoteInstanceGroupBox->setDisabled(true);
ui->remoteInstanceGroupBox->setToolTip(tr("Setting disabled as not built with mastodonpp support"));
#endif