Refactor CMake files
This commit is contained in:
1276
src/CMakeLists.txt
1276
src/CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -5,35 +5,34 @@
|
||||
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
||||
#define CMAKE_EXECUTABLE_SUFFIX "${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
|
||||
#cmakedefine USE_INSTALL_PREFIX
|
||||
|
||||
#cmakedefine HAVE_BACKTRACE
|
||||
#cmakedefine HAVE_ALSA
|
||||
#cmakedefine HAVE_PULSE
|
||||
#cmakedefine HAVE_GIO
|
||||
#cmakedefine HAVE_GIO_UNIX
|
||||
#cmakedefine HAVE_DBUS
|
||||
#cmakedefine HAVE_X11
|
||||
#cmakedefine HAVE_MPRIS2
|
||||
#cmakedefine HAVE_UDISKS2
|
||||
#cmakedefine HAVE_ALSA
|
||||
#cmakedefine HAVE_AUDIOCD
|
||||
#cmakedefine HAVE_LIBGPOD
|
||||
#cmakedefine HAVE_LIBMTP
|
||||
#cmakedefine HAVE_LIBPULSE
|
||||
#cmakedefine HAVE_MTP
|
||||
#cmakedefine HAVE_GPOD
|
||||
#cmakedefine HAVE_QTSPARKLE
|
||||
#cmakedefine HAVE_SONGFINGERPRINTING
|
||||
#cmakedefine HAVE_MUSICBRAINZ
|
||||
#cmakedefine HAVE_MOODBAR
|
||||
#cmakedefine HAVE_EBUR128
|
||||
#cmakedefine HAVE_GLOBALSHORTCUTS
|
||||
#cmakedefine HAVE_X11_GLOBALSHORTCUTS
|
||||
|
||||
#cmakedefine USE_INSTALL_PREFIX
|
||||
|
||||
#cmakedefine HAVE_KDE_GLOBALSHORTCUTS
|
||||
#cmakedefine HAVE_GNOME_GLOBALSHORTCUTS
|
||||
#cmakedefine HAVE_MATE_GLOBALSHORTCUTS
|
||||
#cmakedefine HAVE_SUBSONIC
|
||||
#cmakedefine HAVE_TIDAL
|
||||
#cmakedefine HAVE_SPOTIFY
|
||||
#cmakedefine HAVE_QOBUZ
|
||||
|
||||
#cmakedefine HAVE_MOODBAR
|
||||
|
||||
#cmakedefine HAVE_KEYSYMDEF_H
|
||||
#cmakedefine HAVE_XF86KEYSYM_H
|
||||
|
||||
#cmakedefine HAVE_TAGLIB_DSFFILE
|
||||
#cmakedefine HAVE_TAGLIB_DSDIFFFILE
|
||||
|
||||
@@ -48,6 +47,4 @@
|
||||
|
||||
#cmakedefine ENABLE_WIN32_CONSOLE
|
||||
|
||||
#cmakedefine HAVE_EBUR128
|
||||
|
||||
#endif // CONFIG_H_IN
|
||||
|
||||
@@ -16,4 +16,4 @@ using ManagedObjectList = QMap<QDBusObjectPath, InterfacesAndProperties>;
|
||||
Q_DECLARE_METATYPE(InterfacesAndProperties)
|
||||
Q_DECLARE_METATYPE(ManagedObjectList)
|
||||
|
||||
#endif // DBUS_METATYPES_H_
|
||||
#endif // DBUS_METATYPES_H
|
||||
@@ -33,9 +33,11 @@
|
||||
#include <QMap>
|
||||
#include <QByteArray>
|
||||
#include <QUrl>
|
||||
#include <QDataStream>
|
||||
#include <QImage>
|
||||
#include <QNetworkReply>
|
||||
#include <QItemSelection>
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include <QDBusMetaType>
|
||||
# include <QDBusArgument>
|
||||
@@ -55,9 +57,11 @@
|
||||
#include "equalizer/equalizer.h"
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include "mpris2.h"
|
||||
# include "osd/osddbus.h"
|
||||
# include "dbus/metatypes.h"
|
||||
# include "dbus_metatypes.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MPRIS2
|
||||
# include "mpris2/mpris2.h"
|
||||
#endif
|
||||
|
||||
#include "streaming/streamingsearchview.h"
|
||||
@@ -66,7 +70,7 @@
|
||||
|
||||
#include "radios/radiochannel.h"
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
# include "device/mtpconnection.h"
|
||||
#endif
|
||||
|
||||
@@ -77,6 +81,11 @@
|
||||
|
||||
#include "lyrics/lyricssearchresult.h"
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
QDBusArgument &operator<<(QDBusArgument &arg, const QImage &image);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &arg, QImage &image);
|
||||
#endif
|
||||
|
||||
void RegisterMetaTypes() {
|
||||
|
||||
qRegisterMetaType<const char*>("const char*");
|
||||
@@ -123,13 +132,15 @@ void RegisterMetaTypes() {
|
||||
#ifdef HAVE_DBUS
|
||||
qDBusRegisterMetaType<QByteArrayList>();
|
||||
qDBusRegisterMetaType<QImage>();
|
||||
qDBusRegisterMetaType<InterfacesAndProperties>();
|
||||
qDBusRegisterMetaType<ManagedObjectList>();
|
||||
# ifdef HAVE_MPRIS2
|
||||
qDBusRegisterMetaType<TrackMetadata>();
|
||||
qDBusRegisterMetaType<Track_Ids>();
|
||||
qDBusRegisterMetaType<MprisPlaylist>();
|
||||
qDBusRegisterMetaType<MprisPlaylistList>();
|
||||
qDBusRegisterMetaType<MaybePlaylist>();
|
||||
qDBusRegisterMetaType<InterfacesAndProperties>();
|
||||
qDBusRegisterMetaType<ManagedObjectList>();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
qRegisterMetaType<StreamingSearchView::Result>("StreamingSearchView::Result");
|
||||
@@ -138,7 +149,7 @@ void RegisterMetaTypes() {
|
||||
qRegisterMetaType<RadioChannel>("RadioChannel");
|
||||
qRegisterMetaType<RadioChannelList>("RadioChannelList");
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
qRegisterMetaType<MtpConnection*>("MtpConnection*");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
# include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
# include <gpod/itdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
# include <libmtp.h>
|
||||
#endif
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
#include "song.h"
|
||||
#include "sqlquery.h"
|
||||
#include "sqlrow.h"
|
||||
#ifdef HAVE_DBUS
|
||||
# include "mpris_common.h"
|
||||
#ifdef HAVE_MPRIS2
|
||||
# include "mpris2/mpris_common.h"
|
||||
#endif
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
@@ -1525,7 +1525,7 @@ void Song::InitArtAutomatic() {
|
||||
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
void Song::InitFromItdb(Itdb_Track *track, const QString &prefix) {
|
||||
|
||||
d->valid_ = true;
|
||||
@@ -1620,7 +1620,7 @@ void Song::ToItdb(Itdb_Track *track) const {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
void Song::InitFromMTP(const LIBMTP_track_t *track, const QString &host) {
|
||||
|
||||
d->valid_ = true;
|
||||
@@ -1795,7 +1795,7 @@ void Song::BindToQuery(SqlQuery *query) const {
|
||||
|
||||
}
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
#ifdef HAVE_MPRIS2
|
||||
void Song::ToXesam(QVariantMap *map) const {
|
||||
|
||||
using mpris::AddMetadata;
|
||||
|
||||
@@ -50,11 +50,11 @@ class QSqlRecord;
|
||||
|
||||
class EngineMetadata;
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
struct _Itdb_Track;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
struct LIBMTP_track_struct;
|
||||
#endif
|
||||
|
||||
@@ -475,19 +475,19 @@ class Song {
|
||||
void InitArtManual();
|
||||
void InitArtAutomatic();
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
void InitFromItdb(_Itdb_Track *track, const QString &prefix);
|
||||
void ToItdb(_Itdb_Track *track) const;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
void InitFromMTP(const LIBMTP_track_struct *track, const QString &host);
|
||||
void ToMTP(LIBMTP_track_struct *track) const;
|
||||
#endif
|
||||
|
||||
// Save
|
||||
void BindToQuery(SqlQuery *query) const;
|
||||
#ifdef HAVE_DBUS
|
||||
#ifdef HAVE_MPRIS2
|
||||
void ToXesam(QVariantMap *map) const;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
# include <gpod/itdb.h>
|
||||
#endif
|
||||
|
||||
@@ -107,7 +107,7 @@ void DeviceLister::Exit() {
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
|
||||
QString GetIpodColour(Itdb_IpodModel model) {
|
||||
|
||||
@@ -237,7 +237,7 @@ QVariantList DeviceLister::GuessIconForPath(const QString &path) {
|
||||
|
||||
QVariantList ret;
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
if (IsIpod(path)) {
|
||||
Itdb_Device *device = itdb_device_new();
|
||||
itdb_device_set_mountpoint(device, path.toLocal8Bit().constData());
|
||||
|
||||
@@ -69,18 +69,16 @@
|
||||
# include "cddalister.h"
|
||||
# include "cddadevice.h"
|
||||
#endif
|
||||
#ifdef HAVE_DBUS
|
||||
# ifdef HAVE_UDISKS2
|
||||
# include "udisks2lister.h"
|
||||
# endif
|
||||
#ifdef HAVE_UDISKS2
|
||||
# include "udisks2lister.h"
|
||||
#endif
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
# include "mtpdevice.h"
|
||||
#endif
|
||||
#if defined(Q_OS_MACOS) and defined(HAVE_LIBMTP)
|
||||
#ifdef Q_OS_MACOS
|
||||
# include "macosdevicelister.h"
|
||||
#endif
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
# include "gpoddevice.h"
|
||||
#endif
|
||||
|
||||
@@ -118,13 +116,13 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
|
||||
#if defined(HAVE_AUDIOCD) && !defined(Q_OS_MACOS)
|
||||
AddLister(new CddaLister);
|
||||
#endif
|
||||
#if defined(HAVE_DBUS) && defined(HAVE_UDISKS2)
|
||||
#ifdef HAVE_UDISKS2
|
||||
AddLister(new Udisks2Lister);
|
||||
#endif
|
||||
#ifdef HAVE_GIO
|
||||
AddLister(new GioLister);
|
||||
#endif
|
||||
#if defined(Q_OS_MACOS) and defined(HAVE_LIBMTP)
|
||||
#ifdef Q_OS_MACOS
|
||||
AddLister(new MacOsDeviceLister);
|
||||
#endif
|
||||
|
||||
@@ -134,11 +132,11 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
|
||||
|
||||
AddDeviceClass<FilesystemDevice>();
|
||||
|
||||
#ifdef HAVE_LIBGPOD
|
||||
#ifdef HAVE_GPOD
|
||||
AddDeviceClass<GPodDevice>();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
#ifdef HAVE_MTP
|
||||
AddDeviceClass<MtpDevice>();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
#include "core/scoped_ptr.h"
|
||||
#include "core/shared_ptr.h"
|
||||
#include "core/dbus_metatypes.h"
|
||||
|
||||
#include "dbus/metatypes.h"
|
||||
#include "devicelister.h"
|
||||
|
||||
class OrgFreedesktopDBusObjectManagerInterface;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
# include "alsapcmdevicefinder.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBPULSE
|
||||
#ifdef HAVE_PULSE
|
||||
# include "pulsedevicefinder.h"
|
||||
#endif
|
||||
|
||||
@@ -69,7 +69,7 @@ void DeviceFinders::Init() {
|
||||
device_finders.append(new AlsaDeviceFinder);
|
||||
device_finders.append(new AlsaPCMDeviceFinder);
|
||||
#endif
|
||||
#ifdef HAVE_LIBPULSE
|
||||
#ifdef HAVE_PULSE
|
||||
device_finders.append(new PulseDeviceFinder);
|
||||
#endif
|
||||
#ifdef Q_OS_MACOS
|
||||
|
||||
@@ -34,10 +34,16 @@
|
||||
#include "globalshortcutsmanager.h"
|
||||
#include "globalshortcutsbackend.h"
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
# include "globalshortcutsbackend-kde.h"
|
||||
# include "globalshortcutsbackend-gnome.h"
|
||||
# include "globalshortcutsbackend-mate.h"
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
#include "globalshortcutsbackend-kde.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME_GLOBALSHORTCUTS
|
||||
#include "globalshortcutsbackend-gnome.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATE_GLOBALSHORTCUTS
|
||||
#include "globalshortcutsbackend-mate.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||
@@ -82,9 +88,15 @@ GlobalShortcutsManager::GlobalShortcutsManager(QWidget *parent) : QWidget(parent
|
||||
|
||||
// Create backends - these do the actual shortcut registration
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
backends_ << new GlobalShortcutsBackendKDE(this, this);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME_GLOBALSHORTCUTS
|
||||
backends_ << new GlobalShortcutsBackendGnome(this, this);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATE_GLOBALSHORTCUTS
|
||||
backends_ << new GlobalShortcutsBackendMate(this, this);
|
||||
#endif
|
||||
|
||||
@@ -116,13 +128,19 @@ void GlobalShortcutsManager::ReloadSettings() {
|
||||
backends_enabled_ << GlobalShortcutsBackend::Type::Win;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
if (settings_.value("use_kde", true).toBool()) {
|
||||
backends_enabled_ << GlobalShortcutsBackend::Type::KDE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME_GLOBALSHORTCUTS
|
||||
if (settings_.value("use_gnome", true).toBool()) {
|
||||
backends_enabled_ << GlobalShortcutsBackend::Type::Gnome;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATE_GLOBALSHORTCUTS
|
||||
if (settings_.value("use_mate", true).toBool()) {
|
||||
backends_enabled_ << GlobalShortcutsBackend::Type::Mate;
|
||||
}
|
||||
@@ -165,7 +183,7 @@ GlobalShortcutsManager::Shortcut GlobalShortcutsManager::AddShortcut(const QStri
|
||||
|
||||
}
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
|
||||
bool GlobalShortcutsManager::IsKdeAvailable() {
|
||||
|
||||
@@ -173,19 +191,27 @@ bool GlobalShortcutsManager::IsKdeAvailable() {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
|
||||
bool GlobalShortcutsManager::IsGnomeAvailable() {
|
||||
|
||||
return GlobalShortcutsBackendGnome::IsGnomeAvailable();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
|
||||
bool GlobalShortcutsManager::IsMateAvailable() {
|
||||
|
||||
return GlobalShortcutsBackendMate::IsMateAvailable();
|
||||
|
||||
}
|
||||
|
||||
#endif // defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||
|
||||
|
||||
@@ -29,20 +29,12 @@
|
||||
#define XK_XKB_KEYS
|
||||
#define XK_LATIN1
|
||||
|
||||
#ifdef HAVE_KEYSYMDEF_H
|
||||
# include <X11/keysymdef.h>
|
||||
#else
|
||||
# warning "Missing X11/keysymdef.h"
|
||||
#endif
|
||||
#ifdef HAVE_XF86KEYSYM_H
|
||||
# include <X11/XF86keysym.h>
|
||||
#endif
|
||||
#include <X11/keysymdef.h>
|
||||
#include <X11/XF86keysym.h>
|
||||
|
||||
namespace KeyMapperX11 {
|
||||
static const QMap<Qt::Key, quint32> keymapper_x11_ = { // clazy:exclude=non-pod-global-static
|
||||
|
||||
#ifdef HAVE_KEYSYMDEF_H
|
||||
|
||||
{ Qt::Key_0, XK_0 },
|
||||
{ Qt::Key_1, XK_1 },
|
||||
{ Qt::Key_2, XK_2 },
|
||||
@@ -208,9 +200,7 @@ static const QMap<Qt::Key, quint32> keymapper_x11_ = { // clazy:exclude=non-pod
|
||||
{ Qt::Key_MultipleCandidate, XK_MultipleCandidate },
|
||||
{ Qt::Key_PreviousCandidate, XK_PreviousCandidate },
|
||||
{ Qt::Key_Mode_switch, XK_Mode_switch },
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XF86KEYSYM_H
|
||||
{ Qt::Key_Back, XF86XK_Back },
|
||||
{ Qt::Key_Forward, XF86XK_Forward },
|
||||
{ Qt::Key_Stop, XF86XK_Stop },
|
||||
@@ -249,7 +239,6 @@ static const QMap<Qt::Key, quint32> keymapper_x11_ = { // clazy:exclude=non-pod
|
||||
{ Qt::Key_LaunchF, XF86XK_LaunchD },
|
||||
{ Qt::Key_LaunchG, XF86XK_LaunchE },
|
||||
{ Qt::Key_LaunchH, XF86XK_LaunchF },
|
||||
#endif
|
||||
|
||||
{Qt::Key(0), 0}
|
||||
|
||||
|
||||
10
src/main.cpp
10
src/main.cpp
@@ -84,8 +84,8 @@
|
||||
# include "core/mac_startup.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include "core/mpris2.h"
|
||||
#ifdef HAVE_MPRIS2
|
||||
# include "mpris2/mpris2.h"
|
||||
#endif
|
||||
#include "core/metatypes.h"
|
||||
#include "core/iconloader.h"
|
||||
@@ -266,7 +266,7 @@ int main(int argc, char *argv[]) {
|
||||
ScopedPtr<Translations> translations(new Translations);
|
||||
|
||||
translations->LoadTranslation(QStringLiteral("qt"), QLibraryInfo::path(QLibraryInfo::TranslationsPath), language);
|
||||
translations->LoadTranslation(QStringLiteral("strawberry"), QStringLiteral(":/translations"), language);
|
||||
translations->LoadTranslation(QStringLiteral("strawberry"), QStringLiteral(":/src/translations"), language);
|
||||
translations->LoadTranslation(QStringLiteral("strawberry"), QStringLiteral(TRANSLATIONS_DIR), language);
|
||||
translations->LoadTranslation(QStringLiteral("strawberry"), QCoreApplication::applicationDirPath(), language);
|
||||
translations->LoadTranslation(QStringLiteral("strawberry"), QDir::currentPath(), language);
|
||||
@@ -293,7 +293,7 @@ int main(int argc, char *argv[]) {
|
||||
OSDBase osd(tray_icon, &app);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
#ifdef HAVE_MPRIS2
|
||||
mpris::Mpris2 mpris2(&app);
|
||||
#endif
|
||||
|
||||
@@ -304,7 +304,7 @@ int main(int argc, char *argv[]) {
|
||||
mac::EnableFullScreen(w);
|
||||
#endif // Q_OS_MACOS
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
#ifdef HAVE_MPRIS2
|
||||
QObject::connect(&mpris2, &mpris::Mpris2::RaiseMainWindow, &w, &MainWindow::Raise);
|
||||
#endif
|
||||
QObject::connect(&single_app, &KDSingleApplication::messageReceived, &w, QOverload<const QByteArray&>::of(&MainWindow::CommandlineOptionsReceived));
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
#include "mpris_common.h"
|
||||
#include "mpris2.h"
|
||||
|
||||
#include "song.h"
|
||||
#include "application.h"
|
||||
#include "player.h"
|
||||
#include "core/song.h"
|
||||
#include "core/application.h"
|
||||
#include "core/player.h"
|
||||
#include "utilities/timeconstants.h"
|
||||
#include "engine/enginebase.h"
|
||||
#include "playlist/playlist.h"
|
||||
@@ -81,7 +81,7 @@ BehaviourSettingsPage::BehaviourSettingsPage(SettingsDialog *dialog, QWidget *pa
|
||||
|
||||
#ifdef HAVE_TRANSLATIONS
|
||||
// Populate the language combo box. We do this by looking at all the compiled in translations.
|
||||
QDir dir1(QStringLiteral(":/translations/"));
|
||||
QDir dir1(QStringLiteral(":/src/translations/"));
|
||||
QDir dir2(QStringLiteral(TRANSLATIONS_DIR));
|
||||
QStringList codes = dir1.entryList(QStringList() << QStringLiteral("*.qm"));
|
||||
if (dir2.exists()) {
|
||||
|
||||
@@ -70,27 +70,33 @@ GlobalShortcutsSettingsPage::GlobalShortcutsSettingsPage(SettingsDialog *dialog,
|
||||
QObject::connect(ui_->radio_custom, &QRadioButton::clicked, this, &GlobalShortcutsSettingsPage::ChangeClicked);
|
||||
QObject::connect(ui_->button_change, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::ChangeClicked);
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
QObject::connect(ui_->checkbox_kde, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
||||
QObject::connect(ui_->checkbox_gnome, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
||||
QObject::connect(ui_->checkbox_mate, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
||||
QObject::connect(ui_->button_gnome_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenGnomeKeybindingProperties);
|
||||
QObject::connect(ui_->button_mate_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenMateKeybindingProperties);
|
||||
#else
|
||||
ui_->widget_kde->hide();
|
||||
#endif
|
||||
#ifdef HAVE_GNOME_GLOBALSHORTCUTS
|
||||
QObject::connect(ui_->checkbox_gnome, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
||||
QObject::connect(ui_->button_gnome_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenGnomeKeybindingProperties);
|
||||
#else
|
||||
ui_->widget_gnome->hide();
|
||||
#endif
|
||||
#ifdef HAVE_MATE_GLOBALSHORTCUTS
|
||||
QObject::connect(ui_->checkbox_mate, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
||||
QObject::connect(ui_->button_mate_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenMateKeybindingProperties);
|
||||
#else
|
||||
ui_->widget_mate->hide();
|
||||
#endif // defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||
QObject::connect(ui_->checkbox_x11, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
||||
#else
|
||||
ui_->widget_x11->hide();
|
||||
#endif // HAVE_X11_GLOBALSHORTCUTS
|
||||
#endif
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
ui_->widget_macos_access->hide();
|
||||
#endif // Q_OS_MACOS
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -113,8 +119,7 @@ void GlobalShortcutsSettingsPage::Load() {
|
||||
QObject::connect(ui_->button_macos_preferences, &QPushButton::clicked, manager, &GlobalShortcutsManager::ShowMacAccessibilityDialog);
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
if (GlobalShortcutsManager::IsKdeAvailable()) {
|
||||
qLog(Debug) << "KDE (KGlobalAccel) backend is available.";
|
||||
ui_->widget_kde->show();
|
||||
@@ -123,7 +128,9 @@ void GlobalShortcutsSettingsPage::Load() {
|
||||
qLog(Debug) << "KDE (KGlobalAccel) backend is unavailable.";
|
||||
ui_->widget_kde->hide();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME_GLOBALSHORTCUTS
|
||||
if (GlobalShortcutsManager::IsGnomeAvailable()) {
|
||||
qLog(Debug) << "Gnome (GSD) backend is available.";
|
||||
ui_->widget_gnome->show();
|
||||
@@ -132,7 +139,9 @@ void GlobalShortcutsSettingsPage::Load() {
|
||||
qLog(Debug) << "Gnome (GSD) backend is unavailable.";
|
||||
ui_->widget_gnome->hide();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATE_GLOBALSHORTCUTS
|
||||
if (GlobalShortcutsManager::IsMateAvailable()) {
|
||||
qLog(Debug) << "MATE backend is available.";
|
||||
ui_->widget_mate->show();
|
||||
@@ -141,8 +150,7 @@ void GlobalShortcutsSettingsPage::Load() {
|
||||
qLog(Debug) << "MATE backend is unavailable.";
|
||||
ui_->widget_mate->hide();
|
||||
}
|
||||
|
||||
#endif // defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||
if (GlobalShortcutsManager::IsX11Available()) {
|
||||
@@ -153,7 +161,7 @@ void GlobalShortcutsSettingsPage::Load() {
|
||||
qLog(Debug) << "X11 backend is unavailable.";
|
||||
ui_->widget_x11->hide();
|
||||
}
|
||||
#endif // HAVE_X11_GLOBALSHORTCUTS
|
||||
#endif
|
||||
|
||||
const QList<GlobalShortcutsManager::Shortcut> shortcuts = manager->shortcuts().values();
|
||||
for (const GlobalShortcutsManager::Shortcut &i : shortcuts) {
|
||||
@@ -174,29 +182,31 @@ void GlobalShortcutsSettingsPage::Load() {
|
||||
SetShortcut(shortcut.s.id, shortcut.s.action->shortcut());
|
||||
}
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
if (ui_->widget_kde->isVisibleTo(this)) {
|
||||
ui_->checkbox_kde->setChecked(s.value("use_kde", true).toBool());
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME_GLOBALSHORTCUTS
|
||||
if (ui_->widget_gnome->isVisibleTo(this)) {
|
||||
ui_->checkbox_gnome->setChecked(s.value("use_gnome", true).toBool());
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATE_GLOBALSHORTCUTS
|
||||
if (ui_->widget_mate->isVisibleTo(this)) {
|
||||
ui_->checkbox_mate->setChecked(s.value("use_mate", true).toBool());
|
||||
}
|
||||
|
||||
#endif // defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||
if (ui_->widget_x11->isVisibleTo(this)) {
|
||||
ui_->checkbox_x11->setChecked(s.value("use_x11", false).toBool());
|
||||
}
|
||||
#endif // HAVE_X11_GLOBALSHORTCUTS
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && (defined(HAVE_DBUS) || defined(HAVE_X11_GLOBALSHORTCUTS))
|
||||
#if defined(HAVE_KDE_GLOBALSHORTCUTS) || defined(HAVE_GNOME_GLOBALSHORTCUTS) || defined(HAVE_MATE_GLOBALSHORTCUTS) || defined(HAVE_X11_GLOBALSHORTCUTS)
|
||||
ShortcutOptionsChanged();
|
||||
#endif
|
||||
|
||||
@@ -224,15 +234,21 @@ void GlobalShortcutsSettingsPage::Save() {
|
||||
s.setValue(shortcut.s.id, shortcut.key.toString());
|
||||
}
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#ifdef HAVE_KDE_GLOBALSHORTCUTS
|
||||
s.setValue("use_kde", ui_->checkbox_kde->isChecked());
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME_GLOBALSHORTCUTS
|
||||
s.setValue("use_gnome", ui_->checkbox_gnome->isChecked());
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATE_GLOBALSHORTCUTS
|
||||
s.setValue("use_mate", ui_->checkbox_mate->isChecked());
|
||||
#endif // defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && defined(HAVE_DBUS)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||
s.setValue("use_x11", ui_->checkbox_x11->isChecked());
|
||||
#endif // HAVE_X11_GLOBALSHORTCUTS
|
||||
#endif
|
||||
|
||||
s.endGroup();
|
||||
|
||||
|
||||
@@ -2165,19 +2165,34 @@ msgid ""
|
||||
"configured there instead."
|
||||
msgstr ""
|
||||
|
||||
msgid "D-Bus path"
|
||||
msgid "Identifying song"
|
||||
msgstr ""
|
||||
|
||||
msgid "Serial number"
|
||||
msgid "Fingerprinting song"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mount points"
|
||||
msgid "Downloading metadata"
|
||||
msgstr ""
|
||||
|
||||
msgid "Partition label"
|
||||
msgid "Show moodbar"
|
||||
msgstr ""
|
||||
|
||||
msgid "UUID"
|
||||
msgid "Moodbar style"
|
||||
msgstr ""
|
||||
|
||||
msgid "Normal"
|
||||
msgstr ""
|
||||
|
||||
msgid "Angry"
|
||||
msgstr ""
|
||||
|
||||
msgid "Frozen"
|
||||
msgstr ""
|
||||
|
||||
msgid "Happy"
|
||||
msgstr ""
|
||||
|
||||
msgid "System colors"
|
||||
msgstr ""
|
||||
|
||||
msgid "Connect device"
|
||||
@@ -2252,23 +2267,6 @@ msgstr ""
|
||||
msgid "Manufacturer"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Could not copy %1 to %2: %3"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Writing database failed: %1"
|
||||
msgstr ""
|
||||
|
||||
msgid "Writing database failed."
|
||||
msgstr ""
|
||||
|
||||
msgid "Loading iPod database"
|
||||
msgstr ""
|
||||
|
||||
msgid "An error occurred loading the iTunes database"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mount point"
|
||||
msgstr ""
|
||||
|
||||
@@ -2278,6 +2276,21 @@ msgstr ""
|
||||
msgid "URI"
|
||||
msgstr ""
|
||||
|
||||
msgid "D-Bus path"
|
||||
msgstr ""
|
||||
|
||||
msgid "Serial number"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mount points"
|
||||
msgstr ""
|
||||
|
||||
msgid "Partition label"
|
||||
msgstr ""
|
||||
|
||||
msgid "UUID"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Invalid MTP device: %1"
|
||||
msgstr ""
|
||||
@@ -2303,15 +2316,6 @@ msgstr ""
|
||||
msgid "Error connecting MTP device %1: %2"
|
||||
msgstr ""
|
||||
|
||||
msgid "Identifying song"
|
||||
msgstr ""
|
||||
|
||||
msgid "Fingerprinting song"
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloading metadata"
|
||||
msgstr ""
|
||||
|
||||
msgid "Error while setting CDDA device to ready state."
|
||||
msgstr ""
|
||||
|
||||
@@ -2321,6 +2325,23 @@ msgstr ""
|
||||
msgid "Error while querying CDDA tracks."
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Could not copy %1 to %2: %3"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "Writing database failed: %1"
|
||||
msgstr ""
|
||||
|
||||
msgid "Writing database failed."
|
||||
msgstr ""
|
||||
|
||||
msgid "Loading iPod database"
|
||||
msgstr ""
|
||||
|
||||
msgid "An error occurred loading the iTunes database"
|
||||
msgstr ""
|
||||
|
||||
msgid "Server URL is invalid."
|
||||
msgstr ""
|
||||
|
||||
@@ -2490,27 +2511,6 @@ msgstr ""
|
||||
msgid "Missing app id."
|
||||
msgstr ""
|
||||
|
||||
msgid "Show moodbar"
|
||||
msgstr ""
|
||||
|
||||
msgid "Moodbar style"
|
||||
msgstr ""
|
||||
|
||||
msgid "Normal"
|
||||
msgstr ""
|
||||
|
||||
msgid "Angry"
|
||||
msgstr ""
|
||||
|
||||
msgid "Frozen"
|
||||
msgstr ""
|
||||
|
||||
msgid "Happy"
|
||||
msgstr ""
|
||||
|
||||
msgid "System colors"
|
||||
msgstr ""
|
||||
|
||||
msgid "Strawberry Music Player"
|
||||
msgstr ""
|
||||
|
||||
@@ -4296,6 +4296,18 @@ msgstr ""
|
||||
msgid "Change shortcut..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Moodbar"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show a moodbar in the track progress bar"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save the .mood files directly in the songs folders"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "Device Properties"
|
||||
msgstr ""
|
||||
|
||||
@@ -4454,18 +4466,6 @@ msgstr ""
|
||||
msgid "Base64 encoded secret"
|
||||
msgstr ""
|
||||
|
||||
msgid "Moodbar"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show a moodbar in the track progress bar"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save the .mood files directly in the songs folders"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "Return to Strawberry"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user