mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-15 16:32:12 +02:00
Compare commits
14 Commits
docker-act
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
ad59c9acde | ||
|
2d7b7e4514 | ||
|
c1d9d431fd | ||
|
90ec6f0dc7 | ||
|
115b3f7521 | ||
|
bcd92ed508 | ||
|
6c01a6a997 | ||
|
5b6aecd8d0 | ||
|
77acc1cd66 | ||
|
4d3ee34903 | ||
|
4ee462db4c | ||
|
57c387bba5 | ||
|
d693bbf33f | ||
|
4fb44c931b |
18
.github/workflows/docker.yml
vendored
18
.github/workflows/docker.yml
vendored
@@ -1,18 +0,0 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Login to DockerHub Registry
|
||||
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||
- name: Build the Docker image
|
||||
run: cd Docker && docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/ubuntu:latest
|
||||
- name: Push the latest Docker image
|
||||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/ubuntu:latest
|
@@ -20,7 +20,7 @@ ENDIF()
|
||||
CMAKE_POLICY(SET CMP0020 OLD)
|
||||
|
||||
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" ${ECM_MODULE_PATH})
|
||||
|
||||
|
||||
|
||||
@@ -212,10 +212,7 @@ macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++
|
||||
macro_optional_find_package(Lucene++ 3.0.0)
|
||||
macro_log_feature(LUCENEPP_FOUND "Lucene++" "The open-source, C++ search engine" "https://github.com/luceneplusplus/LucenePlusPlus/" TRUE "" "Lucene++ is used for indexing the collection")
|
||||
|
||||
macro_optional_find_package(Taglib 1.8.0)
|
||||
macro_log_feature(TAGLIB_FOUND "TagLib" "Audio Meta-Data Library" "http://developer.kde.org/~wheeler/taglib.html" TRUE "" "taglib is needed for reading meta data from audio files")
|
||||
include( CheckTagLibFileName )
|
||||
check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
|
||||
find_package(Taglib 1.8.0 REQUIRED)
|
||||
|
||||
macro_optional_find_package(Sparsehash)
|
||||
macro_log_feature(SPARSEHASH_FOUND "Sparsehash"
|
||||
|
@@ -1,15 +0,0 @@
|
||||
# taglib changed filenames to be a char/wchar struct on some platforms, need to check for it
|
||||
macro (CHECK_TAGLIB_FILENAME TAGLIB_FILENAME_COMPLEX)
|
||||
include (CheckCXXSourceCompiles)
|
||||
set (CMAKE_REQUIRED_FLAGS ${TAGLIB_CFLAGS})
|
||||
set (CMAKE_REQUIRED_INCLUDES ${TAGLIB_INCLUDES})
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${TAGLIB_LIBRARIES})
|
||||
check_cxx_source_compiles(
|
||||
"#include <tfile.h>
|
||||
int main()
|
||||
{
|
||||
TagLib::FileName fileName1(\"char\");
|
||||
TagLib::FileName fileName2(L\"wchar\");
|
||||
return 0;
|
||||
}" ${TAGLIB_FILENAME_COMPLEX})
|
||||
endmacro (CHECK_TAGLIB_FILENAME)
|
@@ -1,87 +1,90 @@
|
||||
# - Try to find the Taglib library
|
||||
# Once done this will define
|
||||
#.rst:
|
||||
# FindTaglib
|
||||
# ----------
|
||||
#
|
||||
# TAGLIB_FOUND - system has the taglib library
|
||||
# TAGLIB_CFLAGS - the taglib cflags
|
||||
# TAGLIB_LIBRARIES - The libraries needed to use taglib
|
||||
|
||||
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
|
||||
# Try to find the Taglib library.
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
# This will define the following variables:
|
||||
#
|
||||
# ``Taglib_FOUND``
|
||||
# True if the system has the taglib library of at least the minimum
|
||||
# version specified by the version parameter to find_package()
|
||||
# ``Taglib_INCLUDE_DIRS``
|
||||
# The taglib include dirs for use with target_include_directories
|
||||
# ``Taglib_LIBRARIES``
|
||||
# The taglib libraries for use with target_link_libraries()
|
||||
# ``Taglib_VERSION``
|
||||
# The version of taglib that was found
|
||||
#
|
||||
# If ``Taglib_FOUND`` is TRUE, it will also define the following imported
|
||||
# target:
|
||||
#
|
||||
# ``Taglib::Taglib``
|
||||
# The Taglib library
|
||||
#
|
||||
# Since 5.72.0
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2006 Laurent Montel <montel@kde.org>
|
||||
# SPDX-FileCopyrightText: 2019 Heiko Becker <heirecka@exherbo.org>
|
||||
# SPDX-FileCopyrightText: 2020 Elvis Angelaccio <elvis.angelaccio@kde.org>
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
IF(TAGLIB_FOUND)
|
||||
MESSAGE(STATUS "Using manually specified taglib locations")
|
||||
ELSE()
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
if(NOT TAGLIB_MIN_VERSION)
|
||||
set(TAGLIB_MIN_VERSION "1.6")
|
||||
endif(NOT TAGLIB_MIN_VERSION)
|
||||
pkg_search_module(PC_TAGLIB QUIET taglib)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS
|
||||
${BIN_INSTALL_DIR}
|
||||
)
|
||||
endif(NOT WIN32)
|
||||
find_path(Taglib_INCLUDE_DIRS
|
||||
NAMES tag.h
|
||||
PATH_SUFFIXES taglib
|
||||
HINTS ${PC_TAGLIB_INCLUDEDIR}
|
||||
)
|
||||
|
||||
#reset vars
|
||||
set(TAGLIB_LIBRARIES)
|
||||
set(TAGLIB_CFLAGS)
|
||||
find_library(Taglib_LIBRARIES
|
||||
NAMES tag
|
||||
HINTS ${PC_TAGLIB_LIBDIR}
|
||||
)
|
||||
|
||||
# MESSAGE( STATUS "PATHS: ${PATHS}")
|
||||
# if taglib-config has been found
|
||||
if(TAGLIBCONFIG_EXECUTABLE)
|
||||
set(Taglib_VERSION ${PC_TAGLIB_VERSION})
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION)
|
||||
if (Taglib_INCLUDE_DIRS AND NOT Taglib_VERSION)
|
||||
if(EXISTS "${Taglib_INCLUDE_DIRS}/taglib.h")
|
||||
file(READ "${Taglib_INCLUDE_DIRS}/taglib.h" TAGLIB_H)
|
||||
|
||||
if(TAGLIB_VERSION VERSION_LESS "${TAGLIB_MIN_VERSION}")
|
||||
message(STATUS "TagLib version not found: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}")
|
||||
set(TAGLIB_FOUND FALSE)
|
||||
else(TAGLIB_VERSION VERSION_LESS "${TAGLIB_MIN_VERSION}")
|
||||
string(REGEX MATCH "#define TAGLIB_MAJOR_VERSION[ ]+[0-9]+" TAGLIB_MAJOR_VERSION_MATCH ${TAGLIB_H})
|
||||
string(REGEX MATCH "#define TAGLIB_MINOR_VERSION[ ]+[0-9]+" TAGLIB_MINOR_VERSION_MATCH ${TAGLIB_H})
|
||||
string(REGEX MATCH "#define TAGLIB_PATCH_VERSION[ ]+[0-9]+" TAGLIB_PATCH_VERSION_MATCH ${TAGLIB_H})
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES)
|
||||
string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+(.*)" "\\1" TAGLIB_MAJOR_VERSION "${TAGLIB_MAJOR_VERSION_MATCH}")
|
||||
string(REGEX REPLACE ".*_MINOR_VERSION[ ]+(.*)" "\\1" TAGLIB_MINOR_VERSION "${TAGLIB_MINOR_VERSION_MATCH}")
|
||||
string(REGEX REPLACE ".*_PATCH_VERSION[ ]+(.*)" "\\1" TAGLIB_PATCH_VERSION "${TAGLIB_PATCH_VERSION_MATCH}")
|
||||
|
||||
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS)
|
||||
set(Taglib_VERSION "${TAGLIB_MAJOR_VERSION}.${TAGLIB_MINOR_VERSION}.${TAGLIB_PATCH_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
|
||||
set(TAGLIB_FOUND TRUE)
|
||||
# message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}")
|
||||
endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
|
||||
string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}")
|
||||
endif(TAGLIB_VERSION VERSION_LESS "${TAGLIB_MIN_VERSION}")
|
||||
mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Taglib
|
||||
FOUND_VAR
|
||||
Taglib_FOUND
|
||||
REQUIRED_VARS
|
||||
Taglib_LIBRARIES
|
||||
Taglib_INCLUDE_DIRS
|
||||
VERSION_VAR
|
||||
Taglib_VERSION
|
||||
)
|
||||
|
||||
else(TAGLIBCONFIG_EXECUTABLE)
|
||||
if (Taglib_FOUND AND NOT TARGET Taglib::Taglib)
|
||||
add_library(Taglib::Taglib UNKNOWN IMPORTED)
|
||||
set_target_properties(Taglib::Taglib PROPERTIES
|
||||
IMPORTED_LOCATION "${Taglib_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Taglib_INCLUDE_DIRS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
include(FindLibraryWithDebug)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
mark_as_advanced(Taglib_LIBRARIES Taglib_INCLUDE_DIRS)
|
||||
|
||||
find_path(TAGLIB_INCLUDES
|
||||
NAMES
|
||||
tag.h
|
||||
PATH_SUFFIXES taglib
|
||||
PATHS
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_library_with_debug(TAGLIB_LIBRARIES
|
||||
WIN32_DEBUG_POSTFIX d
|
||||
NAMES tag
|
||||
PATHS
|
||||
${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(Taglib DEFAULT_MSG
|
||||
TAGLIB_INCLUDES TAGLIB_LIBRARIES)
|
||||
endif(TAGLIBCONFIG_EXECUTABLE)
|
||||
ENDIF()
|
||||
|
||||
if(TAGLIB_FOUND)
|
||||
if(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE)
|
||||
message(STATUS "Found TagLib: ${TAGLIB_LIBRARIES}")
|
||||
endif(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE)
|
||||
else(TAGLIB_FOUND)
|
||||
if(Taglib_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Taglib")
|
||||
endif(Taglib_FIND_REQUIRED)
|
||||
endif(TAGLIB_FOUND)
|
||||
include(FeatureSummary)
|
||||
set_package_properties(Taglib PROPERTIES
|
||||
URL "https://taglib.org/"
|
||||
DESCRIPTION "A library for reading and editing the meta-data of audio formats"
|
||||
)
|
||||
|
@@ -136,131 +136,6 @@ RUN git clone --depth 1 https://github.com/euroelessar/jreen.git --branch master
|
||||
&& cd ../.. \
|
||||
&& rm -r jreen
|
||||
|
||||
# MXE deps
|
||||
RUN sudo apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
autoconf \
|
||||
automake \
|
||||
autopoint \
|
||||
bash \
|
||||
bison \
|
||||
bzip2 \
|
||||
flex \
|
||||
g++ \
|
||||
g++-multilib \
|
||||
gettext \
|
||||
git \
|
||||
gperf \
|
||||
intltool \
|
||||
libc6-dev-i386 \
|
||||
libgdk-pixbuf2.0-dev \
|
||||
libltdl-dev \
|
||||
libssl-dev \
|
||||
libtool-bin \
|
||||
libxml-parser-perl \
|
||||
lzip \
|
||||
make \
|
||||
openssl \
|
||||
p7zip-full \
|
||||
patch \
|
||||
perl \
|
||||
pkg-config \
|
||||
python \
|
||||
ruby \
|
||||
sed \
|
||||
unzip \
|
||||
wget \
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone --depth 1 https://github.com/mxe/mxe.git --branch master --single-branch mxe \
|
||||
&& sudo mv mxe /opt/mxe
|
||||
|
||||
ENV MXE_PATH=/opt/mxe
|
||||
ENV MXE_TOOLCHAIN="i686-w64-mingw32.shared"
|
||||
ENV MXE_CMAKE=i686-w64-mingw32.shared-cmake
|
||||
ENV MXE_PLUGINS=/opt/mxe/plugins/gcc9
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
qt5
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
qttools
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
boost
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
cc \
|
||||
qca \
|
||||
qtsparkle \
|
||||
nsis \
|
||||
liblastfm \
|
||||
libgsasl
|
||||
|
||||
RUN cd $MXE_PATH \
|
||||
&& sudo make MXE_TARGETS=$MXE_TOOLCHAIN MXE_PLUGIN_DIRS=$MXE_PLUGINS \
|
||||
qtwebkit \
|
||||
sparsehash
|
||||
|
||||
ENV PATH=/opt/mxe/usr/bin:$PATH
|
||||
RUN sudo chmod -R 777 /opt/mxe/.ccache
|
||||
|
||||
RUN git clone --depth 1 https://anongit.kde.org/extra-cmake-modules.git --branch master --single-branch ecm \
|
||||
&& mkdir ecm/build && cd ecm/build \
|
||||
&& $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r ecm
|
||||
|
||||
RUN git clone --depth 1 https://github.com/zaphoyd/websocketpp.git --branch master --single-branch websocketpp \
|
||||
&& mkdir websocketpp/build && cd websocketpp/build \
|
||||
&& $MXE_CMAKE .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r websocketpp
|
||||
|
||||
RUN git clone --depth 1 https://github.com/frankosterfeld/qtkeychain.git --branch master --single-branch qtkeychain \
|
||||
&& mkdir qtkeychain/build && cd qtkeychain/build \
|
||||
&& $MXE_CMAKE .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r qtkeychain
|
||||
|
||||
RUN git clone --depth 1 https://github.com/taglib/taglib.git --branch master --single-branch taglib \
|
||||
&& mkdir taglib/build && cd taglib/build \
|
||||
&& $MXE_CMAKE -DCMAKE_INSTALL_PREFIX=/opt/mxe/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=ON .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r taglib
|
||||
|
||||
RUN git clone --depth 1 https://github.com/KDE/attica.git --branch master --single-branch attica \
|
||||
&& mkdir attica/build && cd attica/build \
|
||||
&& $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r attica
|
||||
|
||||
RUN git clone --depth 1 https://github.com/stachenov/quazip.git --branch master --single-branch quazip \
|
||||
&& mkdir quazip/build && cd quazip/build \
|
||||
&& $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
&& $MXE_CMAKE --build . -j 16 --target install \
|
||||
&& cd ../.. \
|
||||
&& rm -r quazip
|
||||
|
||||
#RUN git clone --depth 1 https://github.com/euroelessar/jreen.git --branch master --single-branch jreen \
|
||||
# && mkdir jreen/build && cd jreen/build \
|
||||
# && $MXE_CMAKE -DCMAKE_BUILD_TYPE=Release .. \
|
||||
# && $MXE_CMAKE -build . -j 16 --target install \
|
||||
# && cd ../.. \
|
||||
# && rm -r jreen
|
||||
|
||||
# Language
|
||||
ENV LANG=en_US.UTF-8
|
||||
RUN echo "$LANG UTF-8" > /etc/locale.gen && locale-gen $LANG && update-locale LANG=$LANG
|
||||
|
@@ -26,7 +26,5 @@ else
|
||||
echo "alias clang-format=clang-format-$CLANG_VERSION" >> $HOME/.bashrc
|
||||
fi
|
||||
|
||||
export PATH=/opt/mxe/usr/bin:$PATH
|
||||
|
||||
# Startup user
|
||||
exec gosu "$USER" "$@"
|
||||
|
@@ -67,10 +67,10 @@ You can download one of our nightly or stable builds:
|
||||
|
||||
### Detailed Build Instructions
|
||||
|
||||
| Linux: | [Arch](http://wiki.tomahawk-player.org/index.php/Building_ArchLinux_package) **-** [Debian](http://wiki.tomahawk-player.org/index.php/Building_on_Debian) **-** [Fedora](http://wiki.tomahawk-player.org/index.php/Building_on_Fedora) **-** [openSUSE](http://wiki.tomahawk-player.org/index.php/Building_on_openSUSE) **-** [Ubuntu](http://wiki.tomahawk-player.org/index.php/Building_on_Ubuntu) |
|
||||
| Linux: | [Arch](https://github.com/tomahawk-player/tomahawk/wiki/ArchLinux---Build-Instructions) **-** [Debian](https://github.com/tomahawk-player/tomahawk/wiki/Debian-Build-Instructions) **-** [Fedora](https://github.com/tomahawk-player/tomahawk/wiki/Fedora-Build-Instructions) **-** [Ubuntu](https://github.com/tomahawk-player/tomahawk/wiki/Ubuntu---Build-Instructions) |
|
||||
|------:|:------|
|
||||
| **Windows**: | [**Windows**](http://wiki.tomahawk-player.org/index.php/Building_Windows_Binary) |
|
||||
| **Mac**: | [**OS X**](http://wiki.tomahawk-player.org/index.php/Building_OS_X_Application_Bundle) |
|
||||
| **Windows**: | [**Windows**](https://github.com/tomahawk-player/tomahawk/wiki/Windows-Build-Instructions) |
|
||||
| **Mac**: | [**OS X**](https://github.com/tomahawk-player/tomahawk/wiki/OS-X---Build-Instructions) |
|
||||
|
||||
### Dependencies
|
||||
|
||||
|
@@ -51,7 +51,7 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
||||
|
||||
Snore::SnoreCore &snore = Snore::SnoreCore::instance();
|
||||
snore.loadPlugins( Snore::SnorePlugin::Backend | Snore::SnorePlugin::SecondaryBackend );
|
||||
snore.setDefaultSettingsValue("Silent", true, Snore::LocalSetting );
|
||||
snore.setDefaultSettingsValue( {QStringLiteral("Silent"), Snore::LocalSetting}, true );
|
||||
|
||||
m_application = Snore::Application( qApp->applicationName(), m_defaultIcon );
|
||||
m_application.hints().setValue( "use-markup", true );
|
||||
|
@@ -533,8 +533,13 @@ TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} PRIVATE
|
||||
)
|
||||
|
||||
# TagLib
|
||||
TARGET_LINK_LIBRARIES(${TOMAHAWK_LIBRARY} LINK_PUBLIC ${TAGLIB_LIBRARIES})
|
||||
TARGET_INCLUDE_DIRECTORIES(${TOMAHAWK_LIBRARY} PUBLIC ${TAGLIB_INCLUDES})
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} LINK_PUBLIC Taglib::Taglib)
|
||||
# Necessary workaround until we can depend on >1.11.1
|
||||
if (NOT Taglib_VERSION VERSION_GREATER 1.11.1)
|
||||
if(ZLIB_FOUND)
|
||||
target_link_libraries(${TOMAHAWK_LIBRARY} PUBLIC -lz)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
INSTALL( TARGETS ${TOMAHAWK_LIBRARY}
|
||||
EXPORT TomahawkLibraryDepends
|
||||
|
@@ -873,6 +873,20 @@ TomahawkSettings::setCrashReporterEnabled( bool enable )
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
TomahawkSettings::exitOnClose() const
|
||||
{
|
||||
return value( "ui/exitOnClose", false ).toBool();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkSettings::setExitOnClose( bool enable )
|
||||
{
|
||||
setValue( "ui/exitOnClose", enable );
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
TomahawkSettings::songChangeNotificationEnabled() const
|
||||
{
|
||||
|
@@ -163,6 +163,9 @@ public:
|
||||
bool crashReporterEnabled() const; /// true by default
|
||||
void setCrashReporterEnabled( bool enable );
|
||||
|
||||
bool exitOnClose() const; /// false by default
|
||||
void setExitOnClose( bool enable );
|
||||
|
||||
bool songChangeNotificationEnabled() const; /// true by default
|
||||
void setSongChangeNotificationEnabled( bool enable );
|
||||
|
||||
|
@@ -247,6 +247,7 @@ DelegateConfigWrapper::getTestConfigMessage( int code )
|
||||
case Tomahawk::Accounts::ConfigTestResultAccountExpired:
|
||||
return tr( "Your account has expired." );
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include <QApplication>
|
||||
#include <QHideEvent>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPaintEvent>
|
||||
#include <QShowEvent>
|
||||
|
||||
|
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <QLayout>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPixmap>
|
||||
#include <QBitmap>
|
||||
#include <QPalette>
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#include "DropDownButton.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainterPath>
|
||||
|
||||
#include "Artist.h"
|
||||
#include "Album.h"
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <QPixmap>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <QApplication>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
@@ -19,10 +19,11 @@
|
||||
|
||||
#include "SearchButton.h"
|
||||
|
||||
#include <qcompleter.h>
|
||||
#include <qevent.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qpainter.h>
|
||||
#include <QCompleter>
|
||||
#include <QEvent>
|
||||
#include <QLineEdit>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
|
||||
SearchButton::SearchButton(QWidget *parent)
|
||||
: QAbstractButton(parent)
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#cmakedefine QTSPARKLE_FOUND
|
||||
|
||||
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
|
||||
#cmakedefine COMPLEX_TAGLIB_FILENAME
|
||||
#cmakedefine HAVE_VLC_ALBUMARTIST
|
||||
#cmakedefine HAVE_X11
|
||||
|
||||
|
@@ -756,13 +756,21 @@ TomahawkWindow::changeEvent( QEvent* e )
|
||||
void
|
||||
TomahawkWindow::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
#ifndef Q_OS_MAC
|
||||
if ( e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable() )
|
||||
{
|
||||
hide();
|
||||
e->ignore();
|
||||
|
||||
TomahawkSettings* s = TomahawkSettings::instance();
|
||||
|
||||
if( s->exitOnClose() ){
|
||||
qApp->quit();
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
else if ( e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable() )
|
||||
{
|
||||
hide();
|
||||
e->ignore();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
QMainWindow::closeEvent( e );
|
||||
|
@@ -313,6 +313,7 @@ SettingsDialog::saveSettings()
|
||||
TomahawkSettings* s = TomahawkSettings::instance();
|
||||
|
||||
s->setCrashReporterEnabled( m_advancedWidgetUi->checkBoxReporter->checkState() == Qt::Checked );
|
||||
s->setExitOnClose( m_advancedWidgetUi->checkBoxExitOnClose->checkState() == Qt::Checked );
|
||||
s->setHttpEnabled( m_advancedWidgetUi->checkBoxHttp->checkState() == Qt::Checked );
|
||||
s->setHttpBindAll( m_advancedWidgetUi->checkBoxListenApi->checkState() == Qt::Checked );
|
||||
s->setSongChangeNotificationEnabled( m_advancedWidgetUi->checkBoxSongChangeNotifications->checkState() == Qt::Checked );
|
||||
|
@@ -171,6 +171,19 @@
|
||||
<string>Other Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxExitOnClose">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Exit on close</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxHttp">
|
||||
<property name="layoutDirection">
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPaintEvent>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QStyleOptionButton>
|
||||
#include <QPixmap>
|
||||
|
@@ -29,8 +29,9 @@
|
||||
#include "Source.h"
|
||||
#include "Track.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QDialog>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
#include <QPropertyAnimation>
|
||||
|
||||
#define ARROW_HEIGHT 6
|
||||
|
Reference in New Issue
Block a user