From a7de3bfca7282dcbb65dc1a23813e23ebeee4d02 Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Wed, 15 May 2024 19:14:26 -0400 Subject: 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. --- src/mainwindow.cpp | 6 ++++++ src/settingsdialog.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3-54-g00ecf