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