aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2019-01-18 21:47:01 -1000
committerJonas Schnelli <dev@jonasschnelli.ch>2019-01-21 22:42:51 -1000
commit516437a1b70b6df87faadfd38c3d84e6dfb5eae8 (patch)
treeef919b8b9bdd1115046e2dfd0c10a0abb91302cc /src
parent63144335becb705a233b32fb8d63f37b7d62071a (diff)
Qt: remove macOS launch-at-startup option when compiled with > macOS 10.11
Diffstat (limited to 'src')
-rw-r--r--src/qt/guiutil.cpp2
-rw-r--r--src/qt/optionsdialog.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index b84c07d51a..b61fc25dc7 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -683,7 +683,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
}
-#elif defined(Q_OS_MAC)
+#elif defined(Q_OS_MAC) && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 101100
// based on: https://github.com/Mozketo/LaunchAtLoginController/blob/master/LaunchAtLoginController.m
LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl);
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 27cec06d4b..849bc2e477 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -74,6 +74,12 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
#ifdef Q_OS_MAC
/* remove Window tab on Mac */
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
+#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100
+ /* hide launch at startup option if compiled against macOS > 10.11 (removed API) */
+ ui->bitcoinAtStartup->setVisible(false);
+ ui->verticalLayout_Main->removeWidget(ui->bitcoinAtStartup);
+ ui->verticalLayout_Main->removeItem(ui->horizontalSpacer_0_Main);
+#endif
#endif
/* remove Wallet tab in case of -disablewallet */