mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
more style fixes
This commit is contained in:
@@ -297,6 +297,11 @@ if( WIN32 )
|
|||||||
macro_log_feature(QTSPARKLE_FOUND "qtsparkle" "Library for creating auto updaters written in Qt" "https://github.com/davidsansome/qtsparkle" FALSE "" "")
|
macro_log_feature(QTSPARKLE_FOUND "qtsparkle" "Library for creating auto updaters written in Qt" "https://github.com/davidsansome/qtsparkle" FALSE "" "")
|
||||||
endif( WIN32 )
|
endif( WIN32 )
|
||||||
|
|
||||||
|
if( WIN32 OR APPLE )
|
||||||
|
macro_optional_find_package(Libsnore)
|
||||||
|
macro_log_feature(LIBSNORE_FOUND "SnoreNotify" "Library for notifications" "https://github.com/TheOneRing/Snorenotify" FALSE "" "")
|
||||||
|
endif()
|
||||||
|
|
||||||
#TODO: support external qxt
|
#TODO: support external qxt
|
||||||
set(QXTWEB_FOUND TRUE)
|
set(QXTWEB_FOUND TRUE)
|
||||||
set(QXTWEB_LIBRARIES qxtweb-standalone)
|
set(QXTWEB_LIBRARIES qxtweb-standalone)
|
||||||
|
48
CMakeModules/FindLibsnore.cmake
Normal file
48
CMakeModules/FindLibsnore.cmake
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
########################################################################################
|
||||||
|
# Copyright (c) 2010 Patrick von Reth <patrick.vonreth@gmail.com> #
|
||||||
|
# #
|
||||||
|
# This program is free software; you can redistribute it and/or modify it under #
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software #
|
||||||
|
# Foundation; either version 2 of the License, or (at your option) any later #
|
||||||
|
# version. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, but WITHOUT ANY #
|
||||||
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A #
|
||||||
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License along with #
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||||
|
########################################################################################
|
||||||
|
|
||||||
|
# - Try to find the libsnore library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBSNORE_FOUND - system has the LIBSNORE library
|
||||||
|
# LIBSNORE_LIBRARIES - The libraries needed to use LIBSNORE
|
||||||
|
# LIBSNORE_PLUGIN_PATH - Path of the plugins
|
||||||
|
|
||||||
|
find_path(LIBSNORE_INCLUDE_DIR
|
||||||
|
NAMES snore/core/snore.h
|
||||||
|
PATHS ${KDE4_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(LIBSNORE_LIBRARY
|
||||||
|
NAMES
|
||||||
|
libsnore
|
||||||
|
snore
|
||||||
|
PATHS ${KDE4_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_path(LIBSNORE_PLUGIN_PATH snoreplugins)
|
||||||
|
|
||||||
|
if(LIBSNORE_LIBRARY AND LIBSNORE_PLUGIN_PATH)
|
||||||
|
set(LIBSNORE_PLUGIN_PATH ${LIBSNORE_PLUGIN_PATH}/snoreplugins)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(LIBSNORE_LIBRARIES ${LIBSNORE_LIBRARY})
|
||||||
|
set(LIBSNORE_INCLUDE_DIRS ${LIBSNORE_INCLUDE_DIR})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LIBSNORE DEFAULT_MSG LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)
|
@@ -3,7 +3,6 @@ include_directories(
|
|||||||
${Boost_INCLUDE_DIR}
|
${Boost_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR APPLE)
|
||||||
find_package(Libsnore)
|
|
||||||
if(BUILD_GUI AND LIBSNORE_FOUND)
|
if(BUILD_GUI AND LIBSNORE_FOUND)
|
||||||
SET(snore_srcs
|
SET(snore_srcs
|
||||||
snorenotify/SnoreNotifyPlugin.cpp
|
snorenotify/SnoreNotifyPlugin.cpp
|
||||||
|
@@ -72,10 +72,19 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
|||||||
m_snore = new Snore::SnoreCore();
|
m_snore = new Snore::SnoreCore();
|
||||||
m_snore->loadPlugins( Snore::PluginContainer::BACKEND );
|
m_snore->loadPlugins( Snore::PluginContainer::BACKEND );
|
||||||
QString backend = qgetenv( "SNORE_BACKEND" ).constData();
|
QString backend = qgetenv( "SNORE_BACKEND" ).constData();
|
||||||
backend.isEmpty()?m_snore->setPrimaryNotificationBackend():m_snore->setPrimaryNotificationBackend( backend );
|
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << m_snore->primaryNotificationBackend();
|
|
||||||
m_application = new Snore::Application( qApp->applicationName(), m_defaultIcon );
|
|
||||||
|
|
||||||
|
if( backend.isEmpty() )
|
||||||
|
{
|
||||||
|
m_snore->setPrimaryNotificationBackend();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_snore->setPrimaryNotificationBackend( backend );
|
||||||
|
}
|
||||||
|
|
||||||
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << m_snore->primaryNotificationBackend();
|
||||||
|
|
||||||
|
m_application = new Snore::Application( qApp->applicationName(), m_defaultIcon );
|
||||||
m_snore->addApplication( m_application );
|
m_snore->addApplication( m_application );
|
||||||
m_snore->applicationIsInitialized( m_application );
|
m_snore->applicationIsInitialized( m_application );
|
||||||
|
|
||||||
@@ -86,8 +95,6 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
|||||||
addAlert( InfoInboxReceived, tr( "You recived a Song recomondation" ) );
|
addAlert( InfoInboxReceived, tr( "You recived a Song recomondation" ) );
|
||||||
|
|
||||||
connect( m_snore, SIGNAL( actionInvoked( Snore::Notification ) ), this, SLOT( slotActionInvoked( Snore::Notification ) ) );
|
connect( m_snore, SIGNAL( actionInvoked( Snore::Notification ) ), this, SLOT( slotActionInvoked( Snore::Notification ) ) );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user