Refactor sponsorship-related code and update .gitignore for macOS build
Some checks failed
Build / Build openSUSE (leap:15.6) (push) Has been cancelled
Build / Build openSUSE (leap:16.0) (push) Has been cancelled
Build / Build openSUSE (tumbleweed) (push) Has been cancelled
Build / Build Fedora (42) (push) Has been cancelled
Build / Build Fedora (43) (push) Has been cancelled
Build / Build Fedora (44) (push) Has been cancelled
Build / Build OpenMandriva (cooker) (push) Has been cancelled
Build / Build Mageia (9) (push) Has been cancelled
Build / Build Debian (bookworm) (push) Has been cancelled
Build / Build Debian (forky) (push) Has been cancelled
Build / Build Debian (trixie) (push) Has been cancelled
Build / Build Ubuntu (noble) (push) Has been cancelled
Build / Build Ubuntu (questing) (push) Has been cancelled
Build / Build Ubuntu (resolute) (push) Has been cancelled
Build / Upload Ubuntu PPA (noble) (push) Has been cancelled
Build / Upload Ubuntu PPA (questing) (push) Has been cancelled
Build / Upload Ubuntu PPA (resolute) (push) Has been cancelled
Build / Build FreeBSD (push) Has been cancelled
Build / Build OpenBSD (push) Has been cancelled
Build / Build macOS Public (release, macos-15) (push) Has been cancelled
Build / Build macOS Public (release, macos-15-intel) (push) Has been cancelled
Build / Build macOS Private (release, macos-arm64) (push) Has been cancelled
Build / Build Windows MinGW (i686, debug) (push) Has been cancelled
Build / Build Windows MinGW (i686, release) (push) Has been cancelled
Build / Build Windows MinGW (x86_64, debug) (push) Has been cancelled
Build / Build Windows MinGW (x86_64, release) (push) Has been cancelled
Build / Build Windows MSVC (arm64, debug, arm64 debug, windows-11-arm) (push) Has been cancelled
Build / Build Windows MSVC (arm64, release, arm64 release, windows-11-arm) (push) Has been cancelled
Build / Build Windows MSVC (x86, debug, x86 debug, windows-2022) (push) Has been cancelled
Build / Build Windows MSVC (x86, release, x86 release, windows-2022) (push) Has been cancelled
Build / Build Windows MSVC (x86_64, debug, x86_64 debug, windows-2022) (push) Has been cancelled
Build / Build Windows MSVC (x86_64, release, x86_64 release, windows-2022) (push) Has been cancelled
Build / Upload (push) Has been cancelled
Build / Attach to release (push) Has been cancelled
Some checks failed
Build / Build openSUSE (leap:15.6) (push) Has been cancelled
Build / Build openSUSE (leap:16.0) (push) Has been cancelled
Build / Build openSUSE (tumbleweed) (push) Has been cancelled
Build / Build Fedora (42) (push) Has been cancelled
Build / Build Fedora (43) (push) Has been cancelled
Build / Build Fedora (44) (push) Has been cancelled
Build / Build OpenMandriva (cooker) (push) Has been cancelled
Build / Build Mageia (9) (push) Has been cancelled
Build / Build Debian (bookworm) (push) Has been cancelled
Build / Build Debian (forky) (push) Has been cancelled
Build / Build Debian (trixie) (push) Has been cancelled
Build / Build Ubuntu (noble) (push) Has been cancelled
Build / Build Ubuntu (questing) (push) Has been cancelled
Build / Build Ubuntu (resolute) (push) Has been cancelled
Build / Upload Ubuntu PPA (noble) (push) Has been cancelled
Build / Upload Ubuntu PPA (questing) (push) Has been cancelled
Build / Upload Ubuntu PPA (resolute) (push) Has been cancelled
Build / Build FreeBSD (push) Has been cancelled
Build / Build OpenBSD (push) Has been cancelled
Build / Build macOS Public (release, macos-15) (push) Has been cancelled
Build / Build macOS Public (release, macos-15-intel) (push) Has been cancelled
Build / Build macOS Private (release, macos-arm64) (push) Has been cancelled
Build / Build Windows MinGW (i686, debug) (push) Has been cancelled
Build / Build Windows MinGW (i686, release) (push) Has been cancelled
Build / Build Windows MinGW (x86_64, debug) (push) Has been cancelled
Build / Build Windows MinGW (x86_64, release) (push) Has been cancelled
Build / Build Windows MSVC (arm64, debug, arm64 debug, windows-11-arm) (push) Has been cancelled
Build / Build Windows MSVC (arm64, release, arm64 release, windows-11-arm) (push) Has been cancelled
Build / Build Windows MSVC (x86, debug, x86 debug, windows-2022) (push) Has been cancelled
Build / Build Windows MSVC (x86, release, x86 release, windows-2022) (push) Has been cancelled
Build / Build Windows MSVC (x86_64, debug, x86_64 debug, windows-2022) (push) Has been cancelled
Build / Build Windows MSVC (x86_64, release, x86_64 release, windows-2022) (push) Has been cancelled
Build / Upload (push) Has been cancelled
Build / Attach to release (push) Has been cancelled
This commit removes sponsorship-related UI elements and functionality from the application, including the donation links and associated logic in the main window and radio services. Additionally, the .gitignore file is updated to exclude various macOS-specific files and directories, ensuring a cleaner build environment while retaining necessary build tooling scripts.
This commit is contained in:
@@ -1142,18 +1142,7 @@ MainWindow::MainWindow(Application *app,
|
||||
asked_permission = s.value("asked_permission", false).toBool();
|
||||
s.endGroup();
|
||||
#endif
|
||||
if (asked_permission) {
|
||||
s.beginGroup(MainWindowSettings::kSettingsGroup);
|
||||
const bool do_not_show_sponsor_message = s.value(MainWindowSettings::kDoNotShowSponsorMessage, false).toBool();
|
||||
s.endGroup();
|
||||
if (!do_not_show_sponsor_message) {
|
||||
MessageDialog *sponsor_message = new MessageDialog(this);
|
||||
sponsor_message->set_settings_group(QLatin1String(MainWindowSettings::kSettingsGroup));
|
||||
sponsor_message->set_do_not_show_message_again(QLatin1String(MainWindowSettings::kDoNotShowSponsorMessage));
|
||||
sponsor_message->setAttribute(Qt::WA_DeleteOnClose);
|
||||
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(u"<a href= \"https://www.strawberrymusicplayer.org/\">www.strawberrymusicplayer.org</a>"_s), IconLoader::Load(u"dialog-information"_s));
|
||||
}
|
||||
}
|
||||
Q_UNUSED(asked_permission)
|
||||
}
|
||||
|
||||
qLog(Debug) << "Started" << QThread::currentThread();
|
||||
|
||||
@@ -124,17 +124,6 @@ QString About::MainHtml() const {
|
||||
ret += tr("You should have received a copy of the GNU General Public License along with this program. If not, see %1").arg(QStringLiteral("<a style=\"color:%1;\" href=\"http://www.gnu.org/licenses/\">http://www.gnu.org/licenses/</a>").arg(palette().text().color().name()));
|
||||
ret += "</p>"_L1;
|
||||
|
||||
ret += "<p>"_L1;
|
||||
ret += tr("If you like Strawberry and can make use of it, consider sponsoring or donating.");
|
||||
ret += "<br />"_L1;
|
||||
ret += tr("You can sponsor the author on %1 or %2. You can also make a one-time payment through %3.").arg(
|
||||
QStringLiteral("<a style=\"color:%1;\" href=\"https://www.patreon.com/jonaskvinge\">Patreon</a>").arg(palette().text().color().name()),
|
||||
QStringLiteral("<a style=\"color:%1;\" href=\"https://github.com/sponsors/jonaski\">GitHub</a>").arg(palette().text().color().name()),
|
||||
QStringLiteral("<a style=\"color:%1;\" href=\"https://paypal.me/jonaskvinge\">paypal.me/jonaskvinge</a>").arg(palette().text().color().name())
|
||||
);
|
||||
|
||||
ret += "</p>"_L1;
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -113,11 +113,6 @@ QVariant RadioModel::data(const RadioItem *item, int role) const {
|
||||
if (service) return service->Homepage();
|
||||
break;
|
||||
}
|
||||
case Role_Donate:{
|
||||
RadioService *service = radio_services_->ServiceBySource(item->source);
|
||||
if (service) return service->Donate();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ class RadioModel : public SimpleTreeModel<RadioItem> {
|
||||
Role_Source,
|
||||
Role_Url,
|
||||
Role_Homepage,
|
||||
Role_Donate,
|
||||
RoleCount
|
||||
};
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ RadioParadiseService::RadioParadiseService(const SharedPtr<TaskManager> task_man
|
||||
: RadioService(Song::Source::RadioParadise, u"Radio Paradise"_s, IconLoader::Load(u"radioparadise"_s), task_manager, network, parent) {}
|
||||
|
||||
QUrl RadioParadiseService::Homepage() { return QUrl(u"https://radioparadise.com/"_s); }
|
||||
QUrl RadioParadiseService::Donate() { return QUrl(u"https://payments.radioparadise.com/rp2s-content.php?name=Support&file=support"_s); }
|
||||
|
||||
void RadioParadiseService::Abort() {
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ class RadioParadiseService : public RadioService {
|
||||
explicit RadioParadiseService(const SharedPtr<TaskManager> task_manager, const SharedPtr<NetworkAccessManager> network, QObject *parent = nullptr);
|
||||
|
||||
QUrl Homepage() override;
|
||||
QUrl Donate() override;
|
||||
|
||||
void Abort();
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ class RadioService : public QObject {
|
||||
virtual void ReloadSettings() {}
|
||||
|
||||
virtual QUrl Homepage() = 0;
|
||||
virtual QUrl Donate() = 0;
|
||||
|
||||
Q_SIGNALS:
|
||||
void NewChannels(const RadioChannelList &channels = RadioChannelList());
|
||||
|
||||
@@ -44,7 +44,6 @@ RadioView::RadioView(QWidget *parent)
|
||||
action_playlist_replace_(nullptr),
|
||||
action_playlist_new_(nullptr),
|
||||
action_homepage_(nullptr),
|
||||
action_donate_(nullptr),
|
||||
initialized_(false) {
|
||||
|
||||
setItemDelegate(new CollectionItemDelegate(this));
|
||||
@@ -88,10 +87,6 @@ void RadioView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
QObject::connect(action_homepage_, &QAction::triggered, this, &RadioView::Homepage);
|
||||
menu_->addAction(action_homepage_);
|
||||
|
||||
action_donate_ = new QAction(IconLoader::Load(u"download"_s), tr("Donate"), this);
|
||||
QObject::connect(action_donate_, &QAction::triggered, this, &RadioView::Donate);
|
||||
menu_->addAction(action_donate_);
|
||||
|
||||
menu_->addAction(IconLoader::Load(u"view-refresh"_s), tr("Refresh channels"), this, &RadioView::GetChannels);
|
||||
}
|
||||
|
||||
@@ -101,7 +96,6 @@ void RadioView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
action_playlist_replace_->setVisible(channels_selected);
|
||||
action_playlist_new_->setVisible(channels_selected);
|
||||
action_homepage_->setVisible(channels_selected);
|
||||
action_donate_->setVisible(channels_selected);
|
||||
|
||||
menu_->popup(e->globalPos());
|
||||
|
||||
@@ -165,22 +159,3 @@ void RadioView::Homepage() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RadioView::Donate() {
|
||||
|
||||
const QModelIndexList selected_indexes = selectedIndexes();
|
||||
if (selected_indexes.isEmpty()) return;
|
||||
|
||||
QList<QUrl> urls;
|
||||
for (const QModelIndex &idx : selected_indexes) {
|
||||
QUrl url = idx.data(RadioModel::Role_Donate).toUrl();
|
||||
if (!urls.contains(url)) {
|
||||
urls << url; // clazy:exclude=reserve-candidates
|
||||
}
|
||||
}
|
||||
|
||||
for (const QUrl &url : std::as_const(urls)) {
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ class RadioView : public AutoExpandingTreeView {
|
||||
void ReplacePlaylist();
|
||||
void OpenInNewPlaylist();
|
||||
void Homepage();
|
||||
void Donate();
|
||||
|
||||
private:
|
||||
QMenu *menu_;
|
||||
@@ -58,7 +57,6 @@ class RadioView : public AutoExpandingTreeView {
|
||||
QAction *action_playlist_replace_;
|
||||
QAction *action_playlist_new_;
|
||||
QAction *action_homepage_;
|
||||
QAction *action_donate_;
|
||||
bool initialized_;
|
||||
};
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ SomaFMService::~SomaFMService() {
|
||||
}
|
||||
|
||||
QUrl SomaFMService::Homepage() { return QUrl(u"https://somafm.com/"_s); }
|
||||
QUrl SomaFMService::Donate() { return QUrl(u"https://somafm.com/support/"_s); }
|
||||
|
||||
void SomaFMService::Abort() {
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ class SomaFMService : public RadioService {
|
||||
~SomaFMService();
|
||||
|
||||
QUrl Homepage() override;
|
||||
QUrl Donate() override;
|
||||
|
||||
void Abort();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user