mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 09:34:53 +02:00
* A few settings / default cleanups.
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
#define VERSION 1
|
||||||
|
|
||||||
TomahawkSettings* TomahawkSettings::s_instance = 0;
|
TomahawkSettings* TomahawkSettings::s_instance = 0;
|
||||||
|
|
||||||
|
|
||||||
@@ -23,21 +25,19 @@ TomahawkSettings::TomahawkSettings( QObject* parent )
|
|||||||
{
|
{
|
||||||
s_instance = this;
|
s_instance = this;
|
||||||
|
|
||||||
#ifndef TOMAHAWK_HEADLESS
|
|
||||||
if( !contains( "configversion") )
|
if( !contains( "configversion") )
|
||||||
{
|
{
|
||||||
setValue( "configversion", SettingsDialog::VERSION );
|
setValue( "configversion", VERSION );
|
||||||
}
|
}
|
||||||
else if( value( "configversion" ).toUInt() != SettingsDialog::VERSION )
|
else if( value( "configversion" ).toUInt() != VERSION )
|
||||||
{
|
{
|
||||||
qDebug() << "Config version outdated, old:" << value( "configversion" ).toUInt()
|
qDebug() << "Config version outdated, old:" << value( "configversion" ).toUInt()
|
||||||
<< "new:" << SettingsDialog::VERSION
|
<< "new:" << VERSION
|
||||||
<< "Doing upgrade, if any...";
|
<< "Doing upgrade, if any...";
|
||||||
|
|
||||||
// insert upgrade code here as required
|
// insert upgrade code here as required
|
||||||
setValue( "configversion", SettingsDialog::VERSION );
|
setValue( "configversion", VERSION );
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -34,8 +34,6 @@ class SettingsDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const unsigned int VERSION = 1; // config version
|
|
||||||
|
|
||||||
explicit SettingsDialog( QWidget *parent = 0 );
|
explicit SettingsDialog( QWidget *parent = 0 );
|
||||||
~SettingsDialog();
|
~SettingsDialog();
|
||||||
|
|
||||||
|
@@ -173,6 +173,8 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Connect up shortcuts
|
// Connect up shortcuts
|
||||||
|
if ( m_shortcutHandler )
|
||||||
|
{
|
||||||
connect( m_shortcutHandler, SIGNAL( playPause() ), m_audioEngine, SLOT( playPause() ) );
|
connect( m_shortcutHandler, SIGNAL( playPause() ), m_audioEngine, SLOT( playPause() ) );
|
||||||
connect( m_shortcutHandler, SIGNAL( pause() ), m_audioEngine, SLOT( pause() ) );
|
connect( m_shortcutHandler, SIGNAL( pause() ), m_audioEngine, SLOT( pause() ) );
|
||||||
connect( m_shortcutHandler, SIGNAL( stop() ), m_audioEngine, SLOT( stop() ) );
|
connect( m_shortcutHandler, SIGNAL( stop() ), m_audioEngine, SLOT( stop() ) );
|
||||||
@@ -181,6 +183,7 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
|||||||
connect( m_shortcutHandler, SIGNAL( volumeUp() ), m_audioEngine, SLOT( raiseVolume() ) );
|
connect( m_shortcutHandler, SIGNAL( volumeUp() ), m_audioEngine, SLOT( raiseVolume() ) );
|
||||||
connect( m_shortcutHandler, SIGNAL( volumeDown() ), m_audioEngine, SLOT( lowerVolume() ) );
|
connect( m_shortcutHandler, SIGNAL( volumeDown() ), m_audioEngine, SLOT( lowerVolume() ) );
|
||||||
connect( m_shortcutHandler, SIGNAL( mute() ), m_audioEngine, SLOT( mute() ) );
|
connect( m_shortcutHandler, SIGNAL( mute() ), m_audioEngine, SLOT( mute() ) );
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NO_LIBLASTFM
|
#ifndef NO_LIBLASTFM
|
||||||
qDebug() << "Init Scrobbler.";
|
qDebug() << "Init Scrobbler.";
|
||||||
|
@@ -252,6 +252,7 @@ TomahawkWindow::rescanCollectionManually()
|
|||||||
ScanManager::instance()->runManualScan( path );
|
ScanManager::instance()->runManualScan( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::addPeerManually()
|
TomahawkWindow::addPeerManually()
|
||||||
{
|
{
|
||||||
@@ -312,6 +313,7 @@ TomahawkWindow::loadSpiff()
|
|||||||
loader->load( url );
|
loader->load( url );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::createAutomaticPlaylist()
|
TomahawkWindow::createAutomaticPlaylist()
|
||||||
{
|
{
|
||||||
@@ -329,6 +331,7 @@ TomahawkWindow::createAutomaticPlaylist()
|
|||||||
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls(), playlist->entries() );
|
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls(), playlist->entries() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TomahawkWindow::createStation()
|
void TomahawkWindow::createStation()
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
@@ -345,6 +348,7 @@ void TomahawkWindow::createStation()
|
|||||||
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls() );
|
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::createPlaylist()
|
TomahawkWindow::createPlaylist()
|
||||||
{
|
{
|
||||||
@@ -367,6 +371,7 @@ TomahawkWindow::createPlaylist()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TomahawkWindow::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
TomahawkWindow::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||||
{
|
{
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>1000</width>
|
||||||
<height>480</height>
|
<height>660</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>1000</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
Reference in New Issue
Block a user