mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-31 17:42:13 +02:00
Add QtSparkle support to the windows build, for updating goodness
This commit is contained in:
@@ -154,7 +154,7 @@ IF( APPLE )
|
||||
SET( tomahawkSources ${tomahawkSources} mac/tomahawkapp_mac.mm mac/macshortcuthandler.cpp )
|
||||
|
||||
IF(HAVE_SPARKLE)
|
||||
SET( tomahawkHeaders ${tomahawkHeaders} ${SPARKLE}/Headers )
|
||||
SET( tomahawkHeaders ${tomahawkHeaders} ${SPARKLE}/Headers )
|
||||
ENDIF(HAVE_SPARKLE)
|
||||
|
||||
ENDIF( APPLE )
|
||||
@@ -206,9 +206,9 @@ ENDIF(GLOOX_FOUND)
|
||||
TARGET_LINK_LIBRARIES( tomahawk
|
||||
${LINK_LIBRARIES}
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${MAC_EXTRA_LIBS}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
${LIBECHONEST_LIBRARY}
|
||||
${QXTWEB_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
|
@@ -12,6 +12,8 @@ SET( QXTWEB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qxt/qxtweb-standalone/libq
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
|
||||
${QTSPARKLE_LIBRARIES}
|
||||
|
||||
# third party shipped with tomahawk
|
||||
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
|
||||
|
||||
|
@@ -70,8 +70,6 @@ DynamicModel::startOnDemand()
|
||||
|
||||
m_onDemandRunning = true;
|
||||
m_startOnResolved = false; // not anymore---user clicks a track to start it
|
||||
m_currentAttempts = 0;
|
||||
m_lastResolvedRow = rowCount( QModelIndex() );
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -348,7 +348,7 @@ DynamicWidget::controlChanged( const Tomahawk::dyncontrol_ptr& control )
|
||||
void
|
||||
DynamicWidget::showPreview()
|
||||
{
|
||||
if( m_playlist->mode() == OnDemand && !m_runningOnDemand ) { // if this is a not running station, preview matching tracks
|
||||
if( m_playlist->mode() == OnDemand && !m_runningOnDemand && m_model->rowCount( QModelIndex() ) == 0 ) { // if this is a not running station, preview matching tracks
|
||||
generate( 40 ); // ask for more, we'll filter how many we actually want
|
||||
}
|
||||
}
|
||||
|
@@ -39,6 +39,10 @@
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "scanmanager.h"
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#include <qtsparkle/Updater>
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
@@ -128,6 +132,14 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check for updates...") );
|
||||
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
connect(checkForUpdates, SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) );
|
||||
#elif defined( WIN32 )
|
||||
qtsparkle::Updater* updater = new qtsparkle::Updater( QUrl( "http://download.tomahawk-player.org/sparklewin" ), this );
|
||||
updater->SetNetworkAccessManager( TomahawkUtils::nam() );
|
||||
updater->SetVersion( VERSION );
|
||||
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check for updates...") );
|
||||
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
connect( checkForUpdates, SIGNAL( triggered() ), updater, SLOT( CheckNow() ) );
|
||||
#endif
|
||||
|
||||
m_backAvailable = toolbar->addAction( QIcon( RESPATH "images/back.png" ), tr( "Back" ), PlaylistManager::instance(), SLOT( historyBack() ) );
|
||||
|
Reference in New Issue
Block a user