Skip to content

Commit 516437a

Browse files
committed
Qt: remove macOS launch-at-startup option when compiled with > macOS 10.11
1 parent 6314433 commit 516437a

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

doc/release-notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,12 @@ Graphical User Interface (GUI)
262262
balance shown if the wallet was created using the `createwallet` RPC
263263
and the `disable_private_keys` parameter was set to true.
264264

265+
- The launch-on-startup option is no longer available on macOS if
266+
compiled with macosx min version greater than 10.11 (use
267+
CXXFLAGS="-mmacosx-version-min=10.11"
268+
CFLAGS="-mmacosx-version-min=10.11" for setting the deployment
269+
sdk version)
270+
265271
Low-level changes
266272
=================
267273

src/qt/guiutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
683683
}
684684

685685

686-
#elif defined(Q_OS_MAC)
686+
#elif defined(Q_OS_MAC) && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 101100
687687
// based on: https://github.com/Mozketo/LaunchAtLoginController/blob/master/LaunchAtLoginController.m
688688

689689
LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl);

src/qt/optionsdialog.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
7474
#ifdef Q_OS_MAC
7575
/* remove Window tab on Mac */
7676
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
77+
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100
78+
/* hide launch at startup option if compiled against macOS > 10.11 (removed API) */
79+
ui->bitcoinAtStartup->setVisible(false);
80+
ui->verticalLayout_Main->removeWidget(ui->bitcoinAtStartup);
81+
ui->verticalLayout_Main->removeItem(ui->horizontalSpacer_0_Main);
82+
#endif
7783
#endif
7884

7985
/* remove Wallet tab in case of -disablewallet */

0 commit comments

Comments
 (0)