diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b19d127d2..a7d4dc7d1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -118,7 +118,6 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui} SET( tomahawkUI ${tomahawkUI} tomahawkwindow.ui - settingsdialog.ui diagnosticsdialog.ui stackedsettingsdialog.ui proxydialog.ui diff --git a/src/libtomahawk/audio/audioengine.cpp b/src/libtomahawk/audio/audioengine.cpp index 5ca56a721..2ae3c1bb9 100644 --- a/src/libtomahawk/audio/audioengine.cpp +++ b/src/libtomahawk/audio/audioengine.cpp @@ -62,6 +62,10 @@ AudioEngine::AudioEngine() connect( m_mediaObject, SIGNAL( stateChanged( Phonon::State, Phonon::State ) ), SLOT( onStateChanged( Phonon::State, Phonon::State ) ) ); connect( m_mediaObject, SIGNAL( tick( qint64 ) ), SLOT( timerTriggered( qint64 ) ) ); connect( m_mediaObject, SIGNAL( aboutToFinish() ), SLOT( onAboutToFinish() ) ); + + connect( m_audioOutput, SIGNAL( volumeChanged( qreal ) ), this, SLOT( onVolumeChanged( qreal ) ) ); + + onVolumeChanged( m_audioOutput->volume() ); } @@ -173,7 +177,6 @@ AudioEngine::setVolume( int percentage ) emit volumeChanged( percentage ); } - void AudioEngine::mute() { diff --git a/src/libtomahawk/audio/audioengine.h b/src/libtomahawk/audio/audioengine.h index 05b3b1bd5..d423c7321 100644 --- a/src/libtomahawk/audio/audioengine.h +++ b/src/libtomahawk/audio/audioengine.h @@ -68,7 +68,7 @@ public slots: void setVolume( int percentage ); void lowerVolume() { setVolume( volume() - AUDIO_VOLUME_STEP ); } void raiseVolume() { setVolume( volume() + AUDIO_VOLUME_STEP ); } - void onVolumeChanged( float volume ) { emit volumeChanged( volume * 100 ); } + void onVolumeChanged( qreal volume ) { emit volumeChanged( volume * 100 ); } void mute(); void playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr& result ); diff --git a/src/libtomahawk/playlist/collectionproxymodel.cpp b/src/libtomahawk/playlist/collectionproxymodel.cpp index 4f602e5db..46972c6c8 100644 --- a/src/libtomahawk/playlist/collectionproxymodel.cpp +++ b/src/libtomahawk/playlist/collectionproxymodel.cpp @@ -55,6 +55,7 @@ CollectionProxyModel::lessThan( const QModelIndex& left, const QModelIndex& righ unsigned int bitrate1 = 0, bitrate2 = 0; unsigned int mtime1 = 0, mtime2 = 0; unsigned int id1 = 0, id2 = 0; + unsigned int size1 = 0, size2 = 0; if ( q1->numResults() ) { @@ -66,6 +67,7 @@ CollectionProxyModel::lessThan( const QModelIndex& left, const QModelIndex& righ bitrate1 = r->bitrate(); mtime1 = r->modificationTime(); id1 = r->dbid(); + size1 = r->size(); } if ( q2->numResults() ) { @@ -77,9 +79,10 @@ CollectionProxyModel::lessThan( const QModelIndex& left, const QModelIndex& righ bitrate2 = r->bitrate(); mtime2 = r->modificationTime(); id2 = r->dbid(); + size2 = r->size(); } - if ( left.column() == 0 ) // sort by artist + if ( left.column() == TrackModel::Artist ) // sort by artist { if ( artist1 == artist2 ) { @@ -96,7 +99,7 @@ CollectionProxyModel::lessThan( const QModelIndex& left, const QModelIndex& righ return QString::localeAwareCompare( artist1, artist2 ) < 0; } - else if ( left.column() == 2 ) // sort by album + else if ( left.column() == TrackModel::Album ) // sort by album { if ( album1 == album2 ) { @@ -108,21 +111,27 @@ CollectionProxyModel::lessThan( const QModelIndex& left, const QModelIndex& righ return QString::localeAwareCompare( album1, album2 ) < 0; } - else if ( left.column() == 4 ) // sort by bitrate + else if ( left.column() == TrackModel::Bitrate ) // sort by bitrate { if ( bitrate1 == bitrate2 ) return id1 < id2; return bitrate1 < bitrate2; } - else if ( left.column() == 5 ) // sort by mtime + else if ( left.column() == TrackModel::Age ) // sort by mtime { if ( mtime1 == mtime2 ) return id1 < id2; return mtime1 < mtime2; } + else if ( left.column() == TrackModel::Filesize ) // sort by file size + { + if ( size1 == size2 ) + return id1 < id2; + return size1 < size2; + } return QString::localeAwareCompare( sourceModel()->data( left ).toString(), sourceModel()->data( right ).toString() ) < 0; } diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui deleted file mode 100644 index 3ccf7d55e..000000000 --- a/src/settingsdialog.ui +++ /dev/null @@ -1,740 +0,0 @@ - - - SettingsDialog - - - - 0 - 0 - 621 - 434 - - - - - 0 - 353 - - - - Music Player Settings - - - - - - 0 - - - - Accounts - - - - - - 0 - - - false - - - false - - - true - - - true - - - false - - - - - - - - Jabber - - - - 16 - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Jabber ID: - - - jabberUsername - - - - - - - - 0 - 0 - - - - e.g. user@example.com - - - - - - - - 0 - 0 - - - - Password: - - - jabberPassword - - - - - - - - 0 - 0 - - - - - - - QLineEdit::Password - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 8 - - - - - - - - true - - - - 0 - 0 - - - - Advanced Jabber Settings - - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - Server: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - jabberServer - - - - - - - - 0 - 0 - - - - - - - - Port: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 90 - 0 - - - - - 90 - 16777215 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - 65535 - - - 5222 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Network - - - - - - - 0 - 0 - - - - Advanced Network Settings - - - - - - - - - - - - 0 - 0 - - - - If you're having difficulty connecting to peers, try setting this to your external IP address/host name and a port number (default 50210). Make sure to forward that port to this machine! - - - true - - - - - - - - - - 0 - 0 - - - - Static Host Name: - - - - - - - - - - - 0 - 0 - - - - Static Port: - - - - - - - 65535 - - - 50210 - - - - - - - - - Qt::RightToLeft - - - Always use static host name/port? (Overrides UPnP discovery/port forwarding) - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Proxy Settings... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::RightToLeft - - - Playdar HTTP API - - - true - - - - - - - Qt::RightToLeft - - - Connect automatically when Tomahawk starts - - - true - - - - - - - Qt::RightToLeft - - - Use UPnP to establish port forward - - - true - - - - - - - - - - - Local Music - - - - 16 - - - - - - - Path to scan for music files: - - - - - - - - - - - - ... - - - - - - - - - - 0 - 0 - - - - Watch for changes - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Last.fm - - - - 16 - - - - - Scrobble tracks to Last.fm - - - - - - - Last.fm Login - - - - - - - - Username: - - - - - - - - - - Password: - - - - - - - QLineEdit::Password - - - - - - - - - Test Login - - - - - - - Qt::Vertical - - - - 20 - 221 - - - - - - - - - - - - Script Resolvers - - - - - - Loaded script resolvers: - - - - - - - - - true - - - QAbstractItemView::SingleSelection - - - false - - - true - - - false - - - true - - - true - - - - - - - - - - - - - :/data/images/list-add.png:/data/images/list-add.png - - - - - - - - - - - :/data/images/list-remove.png:/data/images/list-remove.png - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - buttonBox - accepted() - SettingsDialog - accept() - - - 402 - 348 - - - 157 - 274 - - - - - buttonBox - rejected() - SettingsDialog - reject() - - - 470 - 348 - - - 286 - 274 - - - - - diff --git a/thirdparty/jreen b/thirdparty/jreen index 2957d0ff0..8f995f246 160000 --- a/thirdparty/jreen +++ b/thirdparty/jreen @@ -1 +1 @@ -Subproject commit 2957d0ff03d9561af8afc4bd3a45947392868875 +Subproject commit 8f995f246637f533feb7124744e113034a32b505