1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-15 16:32:12 +02:00

Compare commits

..

14 Commits

Author SHA1 Message Date
Eduardo Freitas de Carvalho
ad59c9acde Update README.md
Finally removing OpenSUSE guide.
2020-09-08 16:35:31 +02:00
Eduardo Freitas de Carvalho
2d7b7e4514 Update Build Instructions
The project web-site is down, to make the acess to build instructions easier (or, in that case, possible). I chaged the links from the topic "Detailed Build Intructions" to GitHub Wiki. OpenSUSE build instructions still unavaliable (unnactivate this link, if possible)
2020-09-07 16:08:07 +02:00
Andreas Sturmlechner
c1d9d431fd Add ZLIB linking workaround for broken Taglib pkgconfig versions (#678)
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2020-07-23 13:44:21 +02:00
Andreas Sturmlechner
90ec6f0dc7 Drop unused CheckTagLibFileName.cmake and COMPLEX_TAGLIB_FILENAME
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2020-07-23 02:00:27 +02:00
Andreas Sturmlechner
115b3f7521 Import FindTaglib.cmake from ECM 5.72.0 and mark Taglib as REQUIRED
This version of ECM gained a module that is overriding Tomahawk's own, but
variables are incompatible. Use the updated ECM module until we can depend
on the necessary ECM version itself.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2020-07-23 02:00:27 +02:00
Andreas Sturmlechner
bcd92ed508 Use local cmake modules first
Local cmake modules should not be overriden by system versions.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2020-07-22 20:20:30 +02:00
Andreas Sturmlechner
6c01a6a997 Remove explicit use of ECM_KDE_MODULE_DIR, is part of ECM_MODULE_PATH
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2020-07-22 20:20:30 +02:00
Gil Domingues
5b6aecd8d0 added exit on close option (#362)
* added exit on close option

* Fixed the functionality, changed code style

* Remove trailing white space
2020-07-03 13:29:03 +02:00
Hugo Lindström
77acc1cd66 Merge pull request #674 from tomahawk-player/fix-snorenotify
Snorenotify api update
2020-06-21 18:29:13 +02:00
Hugo Lindström
4d3ee34903 Snorenotify api update 2020-06-12 12:46:41 +02:00
Hugo Lindström
4ee462db4c Merge pull request #640 from Vogtinator/master
Fix "control reaches end of non-void function" in DelegateConfigWrapper
2020-06-05 21:26:11 +02:00
Fabian Vogt
57c387bba5 Fix "control reaches end of non-void function" in DelegateConfigWrapper 2020-06-05 21:20:12 +02:00
Hugo Lindström
d693bbf33f Merge pull request #670 from a17r/qt-5.15
Fix build with Qt 5.15 (missing QPainterPath)
2020-05-14 09:53:08 +02:00
Andreas Sturmlechner
4fb44c931b Fix build with Qt 5.15 (missing QPainterPath) 2020-05-09 00:27:18 +02:00
25 changed files with 148 additions and 254 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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)

View File

@@ -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"
)

View File

@@ -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

View File

@@ -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" "$@"

View File

@@ -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

View File

@@ -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 );

View File

@@ -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

View File

@@ -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
{

View File

@@ -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 );

View File

@@ -247,6 +247,7 @@ DelegateConfigWrapper::getTestConfigMessage( int code )
case Tomahawk::Accounts::ConfigTestResultAccountExpired:
return tr( "Your account has expired." );
}
return QString();
}

View File

@@ -28,6 +28,7 @@
#include <QApplication>
#include <QHideEvent>
#include <QPainter>
#include <QPainterPath>
#include <QPaintEvent>
#include <QShowEvent>

View File

@@ -32,6 +32,7 @@
#include <QLayout>
#include <QPainter>
#include <QPainterPath>
#include <QPixmap>
#include <QBitmap>
#include <QPalette>

View File

@@ -19,6 +19,8 @@
#include "DropDownButton.h"
#include <QMouseEvent>
#include <QPaintEvent>
#include <QPainterPath>
#include "Artist.h"
#include "Album.h"

View File

@@ -27,6 +27,7 @@
#include <QPixmap>
#include <QPaintEvent>
#include <QPainter>
#include <QPainterPath>
using namespace Tomahawk;

View File

@@ -22,6 +22,7 @@
#include <QApplication>
#include <QPaintEvent>
#include <QPainter>
#include <QPainterPath>
#include <QDialogButtonBox>
#include <QVBoxLayout>
#include <QHBoxLayout>

View File

@@ -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)

View File

@@ -23,7 +23,6 @@
#cmakedefine QTSPARKLE_FOUND
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
#cmakedefine COMPLEX_TAGLIB_FILENAME
#cmakedefine HAVE_VLC_ALBUMARTIST
#cmakedefine HAVE_X11

View File

@@ -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 );

View File

@@ -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 );

View File

@@ -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">

View File

@@ -24,6 +24,7 @@
#include <QDebug>
#include <QPainter>
#include <QPainterPath>
#include <QPaintEvent>
#include <QVBoxLayout>

View File

@@ -24,6 +24,7 @@
#include <QMouseEvent>
#include <QPainter>
#include <QPainterPath>
#include <QPropertyAnimation>
#include <QStyleOptionButton>
#include <QPixmap>

View File

@@ -29,8 +29,9 @@
#include "Source.h"
#include "Track.h"
#include <QPainter>
#include <QDialog>
#include <QPainter>
#include <QPainterPath>
#include <QPropertyAnimation>
#define ARROW_HEIGHT 6