mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-06 20:33:30 +01:00
Refactor CMake files
This commit is contained in:
parent
525ebbb9b7
commit
0768298b95
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@ -49,7 +49,6 @@ jobs:
|
||||
boost-devel
|
||||
glib2-devel
|
||||
glib2-tools
|
||||
dbus-1-devel
|
||||
alsa-devel
|
||||
libnotify-devel
|
||||
sqlite3-devel
|
||||
@ -167,7 +166,6 @@ jobs:
|
||||
openssh
|
||||
rsync
|
||||
boost-devel
|
||||
dbus-devel
|
||||
sqlite-devel
|
||||
alsa-lib-devel
|
||||
pulseaudio-libs-devel
|
||||
@ -253,7 +251,6 @@ jobs:
|
||||
rpm-build
|
||||
glibc-devel
|
||||
boost-devel
|
||||
dbus-devel
|
||||
sqlite-devel
|
||||
libasound-devel
|
||||
pulseaudio-devel
|
||||
@ -448,7 +445,6 @@ jobs:
|
||||
lsb-release
|
||||
dpkg-dev
|
||||
libglib2.0-dev
|
||||
libdbus-1-dev
|
||||
libboost-dev
|
||||
libsqlite3-dev
|
||||
libasound2-dev
|
||||
@ -528,7 +524,6 @@ jobs:
|
||||
dpkg-dev
|
||||
libglib2.0-dev
|
||||
libboost-dev
|
||||
libdbus-1-dev
|
||||
libsqlite3-dev
|
||||
libasound2-dev
|
||||
libpulse-dev
|
||||
@ -610,7 +605,6 @@ jobs:
|
||||
dpkg-dev
|
||||
libglib2.0-dev
|
||||
libboost-dev
|
||||
libdbus-1-dev
|
||||
libsqlite3-dev
|
||||
libasound2-dev
|
||||
libpulse-dev
|
||||
@ -752,7 +746,6 @@ jobs:
|
||||
-DUSE_BUNDLE=ON
|
||||
-DENABLE_DBUS=OFF
|
||||
-DICU_ROOT="${{env.prefix_path}}"
|
||||
-DFFTW3_DIR="${{env.prefix_path}}"
|
||||
-DAPPLE_DEVELOPER_ID=$(test '${{github.repository}}' = 'strawberrymusicplayer/strawberry' && test '${{github.event.pull_request.base.repo.full_name}}' = '${{github.event.pull_request.head.repo.full_name}}' && echo "383J84DVB6" || echo "")
|
||||
-DENABLE_SPOTIFY=$(test -f "${{env.prefix_path}}/lib/gstreamer-1.0/libgstspotify.dylib" && echo "ON" || echo "OFF")
|
||||
|
||||
@ -892,7 +885,6 @@ jobs:
|
||||
-DUSE_BUNDLE=ON
|
||||
-DENABLE_DBUS=OFF
|
||||
-DICU_ROOT="${{env.prefix_path}}"
|
||||
-DFFTW3_DIR="${{env.prefix_path}}"
|
||||
-DAPPLE_DEVELOPER_ID="383J84DVB6"
|
||||
-DENABLE_SPOTIFY=$(test -f "${{env.prefix_path}}/lib/gstreamer-1.0/libgstspotify.dylib" && echo "ON" || echo "OFF")
|
||||
|
||||
@ -990,9 +982,9 @@ jobs:
|
||||
-DARCH="${{matrix.arch}}"
|
||||
-DENABLE_WIN32_CONSOLE=$(test "${{matrix.buildtype}}" = "debug" && echo "ON" || echo "OFF")
|
||||
-DENABLE_DBUS=OFF
|
||||
-DENABLE_LIBGPOD=OFF
|
||||
-DENABLE_LIBMTP=OFF
|
||||
-DENABLE_AUDIOCD=OFF
|
||||
-DENABLE_MTP=OFF
|
||||
-DENABLE_GPOD=OFF
|
||||
-DENABLE_SPOTIFY=OFF
|
||||
|
||||
- name: Run Make
|
||||
@ -1277,7 +1269,6 @@ jobs:
|
||||
-DENABLE_WIN32_CONSOLE=${{env.win32_console}}
|
||||
-DPKG_CONFIG_EXECUTABLE="${{env.prefix_path_forwardslash}}/bin/pkg-config.exe"
|
||||
-DICU_ROOT="${{env.prefix_path_forwardslash}}"
|
||||
-DFFTW3_DIR="${{env.prefix_path_forwardslash}}"
|
||||
-DBoost_INCLUDE_DIR="${{env.prefix_path_forwardslash}}/include"
|
||||
|
||||
- name: Run Make
|
||||
|
1380
CMakeLists.txt
1380
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@ -78,7 +78,6 @@ To build Strawberry from source you need the following installed on your system
|
||||
* [Qt 6.4.0 or higher with components Core, Concurrent, Gui, Widgets, Network, Sql and D-Bus](https://www.qt.io/)
|
||||
* [SQLite 3.9 or newer](https://www.sqlite.org)
|
||||
* [ALSA (Required on Linux)](https://www.alsa-project.org/)
|
||||
* [D-Bus (Required on Linux)](https://www.freedesktop.org/wiki/Software/dbus/)
|
||||
* [GStreamer](https://gstreamer.freedesktop.org/)
|
||||
* [TagLib 1.12 or higher](https://www.taglib.org/)
|
||||
* [ICU](https://unicode-org.github.io/icu/)
|
||||
|
@ -1,69 +0,0 @@
|
||||
# - Try to find the libcppunit libraries
|
||||
# Once done this will define
|
||||
#
|
||||
# CppUnit_FOUND - system has libcppunit
|
||||
# CPPUNIT_INCLUDE_DIR - the libcppunit include directory
|
||||
# CPPUNIT_LIBRARIES - libcppunit library
|
||||
|
||||
#include (MacroEnsureVersion)
|
||||
|
||||
if(NOT CPPUNIT_MIN_VERSION)
|
||||
SET(CPPUNIT_MIN_VERSION 1.12.0)
|
||||
endif(NOT CPPUNIT_MIN_VERSION)
|
||||
|
||||
FIND_PROGRAM(CPPUNIT_CONFIG_EXECUTABLE cppunit-config )
|
||||
|
||||
IF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
|
||||
|
||||
# in cache already
|
||||
SET(CppUnit_FOUND TRUE)
|
||||
|
||||
ELSE(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
|
||||
|
||||
SET(CPPUNIT_INCLUDE_DIR)
|
||||
SET(CPPUNIT_LIBRARIES)
|
||||
|
||||
IF(CPPUNIT_CONFIG_EXECUTABLE)
|
||||
EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_CFLAGS)
|
||||
EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_LIBRARIES)
|
||||
EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
|
||||
STRING(REGEX REPLACE "-I(.+)" "\\1" CPPUNIT_CFLAGS "${CPPUNIT_CFLAGS}")
|
||||
ELSE(CPPUNIT_CONFIG_EXECUTABLE)
|
||||
# in case win32 needs to find it the old way?
|
||||
FIND_PATH(CPPUNIT_CFLAGS cppunit/TestRunner.h PATHS /usr/include /usr/local/include )
|
||||
FIND_LIBRARY(CPPUNIT_LIBRARIES NAMES cppunit PATHS /usr/lib /usr/local/lib )
|
||||
# how can we find cppunit version?
|
||||
MESSAGE (STATUS "Ensure you cppunit installed version is at least ${CPPUNIT_MIN_VERSION}")
|
||||
SET (CPPUNIT_INSTALLED_VERSION ${CPPUNIT_MIN_VERSION})
|
||||
ENDIF(CPPUNIT_CONFIG_EXECUTABLE)
|
||||
|
||||
SET(CPPUNIT_INCLUDE_DIR ${CPPUNIT_CFLAGS} "${CPPUNIT_CFLAGS}/cppunit")
|
||||
|
||||
ENDIF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
|
||||
|
||||
IF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
|
||||
|
||||
SET(CppUnit_FOUND TRUE)
|
||||
|
||||
if(NOT CppUnit_FIND_QUIETLY)
|
||||
MESSAGE (STATUS "Found cppunit: ${CPPUNIT_LIBRARIES}")
|
||||
endif(NOT CppUnit_FIND_QUIETLY)
|
||||
|
||||
IF(CPPUNIT_CONFIG_EXECUTABLE)
|
||||
EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
|
||||
ENDIF(CPPUNIT_CONFIG_EXECUTABLE)
|
||||
|
||||
#macro_ensure_version( ${CPPUNIT_MIN_VERSION} ${CPPUNIT_INSTALLED_VERSION} CPPUNIT_INSTALLED_VERSION_OK )
|
||||
|
||||
#IF(NOT CPPUNIT_INSTALLED_VERSION_OK)
|
||||
# MESSAGE ("** CppUnit version is too old: found ${CPPUNIT_INSTALLED_VERSION} installed, ${CPPUNIT_MIN_VERSION} or major is required")
|
||||
# SET(CppUnit_FOUND FALSE)
|
||||
#ENDIF(NOT CPPUNIT_INSTALLED_VERSION_OK)
|
||||
|
||||
ELSE(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
|
||||
|
||||
SET(CppUnit_FOUND FALSE CACHE BOOL "Not found cppunit library")
|
||||
|
||||
ENDIF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
|
||||
|
||||
MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARIES)
|
@ -1,132 +0,0 @@
|
||||
#
|
||||
# Try to find FFTW3 library
|
||||
# (see www.fftw.org)
|
||||
# Once run this will define:
|
||||
#
|
||||
# FFTW3_FOUND
|
||||
# FFTW3_INCLUDE_DIR
|
||||
# FFTW3_LIBRARIES
|
||||
# FFTW3_LINK_DIRECTORIES
|
||||
#
|
||||
# You may set one of these options before including this file:
|
||||
# FFTW3_USE_SSE2
|
||||
#
|
||||
# TODO: _F_ versions.
|
||||
#
|
||||
# Jan Woetzel 05/2004
|
||||
# www.mip.informatik.uni-kiel.de
|
||||
# --------------------------------
|
||||
|
||||
FIND_PATH(FFTW3_INCLUDE_DIR fftw3.h
|
||||
${FFTW3_DIR}/include
|
||||
${FFTW3_HOME}/include
|
||||
${FFTW3_DIR}
|
||||
${FFTW3_HOME}
|
||||
$ENV{FFTW3_DIR}/include
|
||||
$ENV{FFTW3_HOME}/include
|
||||
$ENV{FFTW3_DIR}
|
||||
$ENV{FFTW3_HOME}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
$ENV{SOURCE_DIR}/fftw3
|
||||
$ENV{SOURCE_DIR}/fftw3/include
|
||||
$ENV{SOURCE_DIR}/fftw
|
||||
$ENV{SOURCE_DIR}/fftw/include
|
||||
)
|
||||
#MESSAGE("DBG FFTW3_INCLUDE_DIR=${FFTW3_INCLUDE_DIR}")
|
||||
|
||||
|
||||
SET(FFTW3_POSSIBLE_LIBRARY_PATH
|
||||
${FFTW3_DIR}/lib
|
||||
${FFTW3_HOME}/lib
|
||||
${FFTW3_DIR}
|
||||
${FFTW3_HOME}
|
||||
$ENV{FFTW3_DIR}/lib
|
||||
$ENV{FFTW3_HOME}/lib
|
||||
$ENV{FFTW3_DIR}
|
||||
$ENV{FFTW3_HOME}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
$ENV{SOURCE_DIR}/fftw3
|
||||
$ENV{SOURCE_DIR}/fftw3/lib
|
||||
$ENV{SOURCE_DIR}/fftw
|
||||
$ENV{SOURCE_DIR}/fftw/lib
|
||||
)
|
||||
|
||||
|
||||
# The lib prefix is contained in filename of W32, unfortunately. In the "general" lib:
|
||||
FIND_LIBRARY(FFTW3_FFTW_LIBRARY
|
||||
NAMES fftw3 libfftw libfftw3 libfftw3-3
|
||||
PATHS
|
||||
${FFTW3_POSSIBLE_LIBRARY_PATH}
|
||||
)
|
||||
#MESSAGE("DBG FFTW3_FFTW_LIBRARY=${FFTW3_FFTW_LIBRARY}")
|
||||
|
||||
FIND_LIBRARY(FFTW3_FFTWF_LIBRARY
|
||||
NAMES fftwf3 fftw3f fftwf libfftwf libfftwf3 libfftw3f-3
|
||||
PATHS
|
||||
${FFTW3_POSSIBLE_LIBRARY_PATH}
|
||||
)
|
||||
#MESSAGE("DBG FFTW3_FFTWF_LIBRARY=${FFTW3_FFTWF_LIBRARY}")
|
||||
|
||||
FIND_LIBRARY(FFTW3_FFTWL_LIBRARY
|
||||
NAMES fftwl3 fftw3l fftwl libfftwl libfftwl3 libfftw3l-3
|
||||
PATHS
|
||||
${FFTW3_POSSIBLE_LIBRARY_PATH}
|
||||
)
|
||||
#MESSAGE("DBG FFTW3_FFTWF_LIBRARY=${FFTW3_FFTWL_LIBRARY}")
|
||||
|
||||
|
||||
FIND_LIBRARY(FFTW3_FFTW_SSE2_LIBRARY
|
||||
NAMES fftw_sse2 fftw3_sse2 libfftw_sse2 libfftw3_sse2
|
||||
PATHS
|
||||
${FFTW3_POSSIBLE_LIBRARY_PATH}
|
||||
)
|
||||
#MESSAGE("DBG FFTW3_FFTW_SSE2_LIBRARY=${FFTW3_FFTW_SSE2_LIBRARY}")
|
||||
|
||||
FIND_LIBRARY(FFTW3_FFTWF_SSE_LIBRARY
|
||||
NAMES fftwf_sse fftwf3_sse libfftwf_sse libfftwf3_sse
|
||||
PATHS
|
||||
${FFTW3_POSSIBLE_LIBRARY_PATH}
|
||||
)
|
||||
#MESSAGE("DBG FFTW3_FFTWF_SSE_LIBRARY=${FFTW3_FFTWF_SSE_LIBRARY}")
|
||||
|
||||
|
||||
# --------------------------------
|
||||
# select one of the above
|
||||
# default:
|
||||
IF (FFTW3_FFTW_LIBRARY)
|
||||
SET(FFTW3_LIBRARIES ${FFTW3_FFTW_LIBRARY})
|
||||
ENDIF (FFTW3_FFTW_LIBRARY)
|
||||
# specialized:
|
||||
IF (FFTW3_USE_SSE2 AND FFTW3_FFTW_SSE2_LIBRARY)
|
||||
SET(FFTW3_LIBRARIES ${FFTW3_FFTW_SSE2_LIBRARY})
|
||||
ENDIF (FFTW3_USE_SSE2 AND FFTW3_FFTW_SSE2_LIBRARY)
|
||||
|
||||
# --------------------------------
|
||||
|
||||
IF(FFTW3_LIBRARIES)
|
||||
IF (FFTW3_INCLUDE_DIR)
|
||||
|
||||
# OK, found all we need
|
||||
SET(FFTW3_FOUND TRUE)
|
||||
GET_FILENAME_COMPONENT(FFTW3_LINK_DIRECTORIES ${FFTW3_LIBRARIES} PATH)
|
||||
|
||||
ELSE (FFTW3_INCLUDE_DIR)
|
||||
MESSAGE("FFTW3 include dir not found. Set FFTW3_DIR to find it.")
|
||||
ENDIF(FFTW3_INCLUDE_DIR)
|
||||
ELSE(FFTW3_LIBRARIES)
|
||||
MESSAGE("FFTW3 lib not found. Set FFTW3_DIR to find it.")
|
||||
ENDIF(FFTW3_LIBRARIES)
|
||||
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
FFTW3_INCLUDE_DIR
|
||||
FFTW3_LIBRARIES
|
||||
FFTW3_FFTW_LIBRARY
|
||||
FFTW3_FFTW_SSE2_LIBRARY
|
||||
FFTW3_FFTWF_LIBRARY
|
||||
FFTW3_FFTWF_SSE_LIBRARY
|
||||
FFTW3_FFTWL_LIBRARY
|
||||
FFTW3_LINK_DIRECTORIES
|
||||
)
|
@ -1,5 +1,8 @@
|
||||
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext REQUIRED)
|
||||
find_program(CAT_EXECUTABLE cat REQUIRED)
|
||||
|
||||
if(NOT MSVC)
|
||||
find_program(CAT_EXECUTABLE cat REQUIRED)
|
||||
endif()
|
||||
|
||||
list(APPEND XGETTEXT_OPTIONS
|
||||
--qt
|
||||
@ -82,11 +85,13 @@ macro(add_po outfiles po_prefix)
|
||||
# Generate a qrc file for the translations
|
||||
if(NOT INSTALL_TRANSLATIONS)
|
||||
set(_qrc ${CMAKE_CURRENT_BINARY_DIR}/${ADD_PO_DIRECTORY}/translations.qrc)
|
||||
file(WRITE ${_qrc} "<RCC><qresource prefix=\"/${ADD_PO_DIRECTORY}\">")
|
||||
file(WRITE ${_qrc} "<RCC>\n")
|
||||
file(APPEND ${_qrc} "<qresource prefix=\"/${ADD_PO_DIRECTORY}\">\n")
|
||||
foreach(_lang ${ADD_PO_LANGUAGES})
|
||||
file(APPEND ${_qrc} "<file>${po_prefix}${_lang}.qm</file>")
|
||||
file(APPEND ${_qrc} "<file>${po_prefix}${_lang}.qm</file>\n")
|
||||
endforeach(_lang)
|
||||
file(APPEND ${_qrc} "</qresource></RCC>")
|
||||
file(APPEND ${_qrc} "</qresource>\n")
|
||||
file(APPEND ${_qrc} "</RCC>\n")
|
||||
qt_add_resources(${outfiles} ${_qrc})
|
||||
endif()
|
||||
endmacro(add_po)
|
||||
|
1
debian/control
vendored
1
debian/control
vendored
@ -9,7 +9,6 @@ Build-Depends: debhelper (>= 11),
|
||||
gcc,
|
||||
g++,
|
||||
libglib2.0-dev,
|
||||
libdbus-1-dev,
|
||||
libboost-dev,
|
||||
libsqlite3-dev,
|
||||
libasound2-dev,
|
||||
|
1
dist/CMakeLists.txt
vendored
1
dist/CMakeLists.txt
vendored
@ -13,6 +13,7 @@ if(APPLE)
|
||||
endif(APPLE)
|
||||
|
||||
if(WIN32)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/windres.rc.in ${CMAKE_BINARY_DIR}/windres.rc)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry.nsi.in ${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry.nsi @ONLY)
|
||||
endif(WIN32)
|
||||
|
||||
|
1
dist/unix/strawberry.spec.in
vendored
1
dist/unix/strawberry.spec.in
vendored
@ -38,7 +38,6 @@ BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(gio-2.0)
|
||||
BuildRequires: pkgconfig(gio-unix-2.0)
|
||||
BuildRequires: pkgconfig(gthread-2.0)
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(sqlite3) >= 3.9
|
||||
BuildRequires: pkgconfig(taglib)
|
||||
|
2
dist/windows/windres.rc.in
vendored
2
dist/windows/windres.rc.in
vendored
@ -1,4 +1,4 @@
|
||||
strawberry ICON "${CMAKE_CURRENT_SOURCE_DIR}/../dist/windows/strawberry.ico"
|
||||
strawberry ICON "${CMAKE_SOURCE_DIR}/dist/windows/strawberry.ico"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION ${STRAWBERRY_VERSION_MAJOR},${STRAWBERRY_VERSION_MINOR},${STRAWBERRY_VERSION_PATCH}
|
||||
PRODUCTVERSION ${STRAWBERRY_VERSION_MAJOR},${STRAWBERRY_VERSION_MINOR},${STRAWBERRY_VERSION_PATCH}
|
||||
|
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 ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user