MainWindow: Only show sponsor dialog if update dialog is answered
This commit is contained in:
@@ -1071,7 +1071,14 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
|
bool asked_permission = true;
|
||||||
Settings s;
|
Settings s;
|
||||||
|
#ifdef HAVE_QTSPARKLE
|
||||||
|
s.beginGroup("QtSparkle");
|
||||||
|
asked_permission = s.value("asked_permission", false).toBool();
|
||||||
|
s.endGroup();
|
||||||
|
#endif
|
||||||
|
if (asked_permission) {
|
||||||
s.beginGroup(kSettingsGroup);
|
s.beginGroup(kSettingsGroup);
|
||||||
constexpr char do_not_show_sponsor_message_key[] = "do_not_show_sponsor_message";
|
constexpr char do_not_show_sponsor_message_key[] = "do_not_show_sponsor_message";
|
||||||
const bool do_not_show_sponsor_message = s.value(do_not_show_sponsor_message_key, false).toBool();
|
const bool do_not_show_sponsor_message = s.value(do_not_show_sponsor_message_key, false).toBool();
|
||||||
@@ -1084,6 +1091,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
|||||||
sponsor_message->ShowMessage(tr("Sponsoring Strawberry"), tr("Strawberry is free and open source software. If you like Strawberry, please consider sponsoring the project. For more information about sponsorship see our website %1").arg(QStringLiteral("<a href= \"https://www.strawberrymusicplayer.org/\">www.strawberrymusicplayer.org</a>")), IconLoader::Load(QStringLiteral("dialog-information")));
|
sponsor_message->ShowMessage(tr("Sponsoring Strawberry"), tr("Strawberry is free and open source software. If you like Strawberry, please consider sponsoring the project. For more information about sponsorship see our website %1").arg(QStringLiteral("<a href= \"https://www.strawberrymusicplayer.org/\">www.strawberrymusicplayer.org</a>")), IconLoader::Load(QStringLiteral("dialog-information")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
qLog(Debug) << "Started" << QThread::currentThread();
|
qLog(Debug) << "Started" << QThread::currentThread();
|
||||||
initialized_ = true;
|
initialized_ = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user