diff --git a/CMakeLists.txt b/CMakeLists.txt
index d219e04f2..f6859f824 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,12 @@ SET( TOMAHAWK_VERSION_PATCH 0 )
# SET( TOMAHAWK_VERSION_RC 0 )
+
+# build options
+option(BUILD_GUI "Build Tomahawk with GUI" ON)
+
+
+# generate version string
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
# Use the date as the tweak level.
INCLUDE( ${CMAKE_MODULE_PATH}/CMakeDateStamp.cmake )
@@ -50,31 +56,27 @@ SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
# installer creation
INCLUDE( CPack.cmake )
-# Check if we need qtgui:
-IF( "${gui}" STREQUAL "no" )
- ADD_DEFINITIONS( -DENABLE_HEADLESS )
- MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} in HEADLESS mode ***" )
- FIND_PACKAGE( Qt4 4.7.0 COMPONENTS QtCore QtXml QtNetwork REQUIRED )
-ELSE()
- MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} full GUI version ***" )
- FIND_PACKAGE( Qt4 4.7.0 COMPONENTS QtGui QtCore QtXml QtNetwork REQUIRED )
-ENDIF()
-
#deps
INCLUDE( MacroOptionalFindPackage )
INCLUDE( MacroLogFeature )
-# required
-#While we distribute our own liblastfm2, don't need to look for it
-#macro_optional_find_package(LibLastFm 0.3.3)
-#macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
-set(LIBLASTFM_FOUND true)
+# Check if we need qtgui:
+SET(NEEDED_QT4_COMPONENTS QtCore QtXml QtNetwork )
+IF( NOT BUILD_GUI )
+ ADD_DEFINITIONS( -DENABLE_HEADLESS )
+ MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} in HEADLESS mode ***" )
+ELSE()
+ MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} full GUI version ***" )
+ LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui")
+ENDIF()
-find_package(Phonon REQUIRED)
-if(PHONON_VERSION STRLESS "4.5.0")
- message(FATAL_ERROR "Phonon version 4.5.0 or higher is required, you have version ${PHONON_VERSION}")
-else()
- message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
+macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
+macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "")
+
+macro_optional_find_package(Phonon 4.5.0)
+macro_log_feature(PHONON_FOUND "Phonon" "The Phonon multimedia library" "http://phonon.kde.org" TRUE "" "")
+if(PHONON_FOUND)
+ message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
endif()
macro_optional_find_package(LibEchonest 1.1.7)
@@ -88,6 +90,15 @@ macro_log_feature(QJSON_FOUND "QJson" "Qt library that maps JSON data to QVarian
macro_optional_find_package(Taglib 1.6.0)
macro_log_feature(TAGLIB_FOUND "TagLib" "Audio Meta-Data Library" "http://developer.kde.org/~wheeler/taglib.html" TRUE "" "taglib is needed for reading meta data from audio files")
+include( CheckTagLibFileName )
+check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
+
+# required
+#While we distribute our own liblastfm2, don't need to look for it
+#macro_optional_find_package(LibLastFm 0.3.3)
+#macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
+set(LIBLASTFM_FOUND true)
+
# this installs headers and such and should really be handled in a separate package by packagers
IF( INTERNAL_JREEN )
@@ -124,20 +135,22 @@ SET( LIBPORTFWD_LIBRARIES ${LIBPORTFWD_LIBRARY} )
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/libportfwd )
# we need pthreads too
-find_package(Threads)
+macro_optional_find_package(Threads)
+macro_log_feature(THREADS_FOUND "Threads" "Threading Library" "" TRUE "" "Platform specific library for threading")
-find_package(KDE4Installed)
-find_package(KDE4)
-IF(KDE4_FOUND)
- #KDE4 adds and removes some compiler flags that we don't like
- STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
- SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
-ELSE()
- SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
-ENDIF()
+macro_optional_find_package(KDE4Installed)
-include( CheckTagLibFileName )
-check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
+# this was used before we had FindKDE4Installed, just leaving it here to keep the flags
+# for future kde integration
+
+# macro_optional_find_package(KDE4)
+# IF(KDE4_FOUND)
+# #KDE4 adds and removes some compiler flags that we don't like
+# STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
+# SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
+# ELSE()
+# SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
+# ENDIF()
IF( WIN32 )
find_library(QTSPARKLE_LIBRARIES qtsparkle)
diff --git a/CMakeModules/FindCLucene.cmake b/CMakeModules/FindCLucene.cmake
index 52116d01f..eb0eafc3e 100644
--- a/CMakeModules/FindCLucene.cmake
+++ b/CMakeModules/FindCLucene.cmake
@@ -12,9 +12,12 @@
INCLUDE(CheckSymbolExists)
INCLUDE(FindLibraryWithDebug)
-if(NOT CLUCENE_MIN_VERSION)
- set(CLUCENE_MIN_VERSION "0.9.23")
-endif(NOT CLUCENE_MIN_VERSION)
+
+IF(CLucene_FIND_VERSION)
+ SET(CLUCENE_MIN_VERSION ${CLucene_FIND_VERSION})
+ELSEIF()
+ SET(CLUCENE_MIN_VERSION "0.9.23")
+ENDIF(CLucene_FIND_VERSION)
IF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)
INCLUDE(${PROJECT_CMAKE}/CLuceneConfig.cmake)
diff --git a/CMakeModules/FindPhonon.cmake b/CMakeModules/FindPhonon.cmake
index 77dda657b..466fc3c62 100644
--- a/CMakeModules/FindPhonon.cmake
+++ b/CMakeModules/FindPhonon.cmake
@@ -38,14 +38,14 @@ else(PHONON_FOUND)
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h)
- if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
+ _phonon_find_version()
+ if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY AND NOT PHONON_VERSION VERSION_LESS ${Phonon_FIND_VERSION})
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
set(PHONON_FOUND TRUE)
- _phonon_find_version()
- else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
+ else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY AND NOT PHONON_VERSION VERSION_LESS ${Phonon_FIND_VERSION})
set(PHONON_FOUND FALSE)
- endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
+ endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY AND NOT PHONON_VERSION VERSION_LESS ${Phonon_FIND_VERSION})
if(PHONON_FOUND)
if(NOT PHONON_FIND_QUIETLY)
diff --git a/data/icons/audio-x-generic-16x16.png b/data/icons/audio-x-generic-16x16.png
index 017b00da9..b5715ad58 100644
Binary files a/data/icons/audio-x-generic-16x16.png and b/data/icons/audio-x-generic-16x16.png differ
diff --git a/data/icons/audio-x-generic-22x22.png b/data/icons/audio-x-generic-22x22.png
index e2c40f1da..84d6becf6 100644
Binary files a/data/icons/audio-x-generic-22x22.png and b/data/icons/audio-x-generic-22x22.png differ
diff --git a/data/icons/audio-x-generic-32x32.png b/data/icons/audio-x-generic-32x32.png
index 8a30401bf..5a2c069d3 100644
Binary files a/data/icons/audio-x-generic-32x32.png and b/data/icons/audio-x-generic-32x32.png differ
diff --git a/resources.qrc b/resources.qrc
index 0b79cbc41..9b18f86cc 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -5,6 +5,7 @@
./data/images/back-pressed.png
./data/images/back-rest.png
./data/images/cover-shadow.png
+ ./data/images/filter.png
./data/images/loved.png
./data/images/not-loved.png
./data/images/no-album-art-placeholder.png
diff --git a/src/PipelineStatusView.cpp b/src/PipelineStatusView.cpp
index c9efda9a6..c6206a076 100644
--- a/src/PipelineStatusView.cpp
+++ b/src/PipelineStatusView.cpp
@@ -66,7 +66,7 @@ PipelineStatusView::PipelineStatusView( AnimatedSplitter* parent )
void
PipelineStatusView::onPipelineUpdate( const query_ptr& query )
{
- qDebug() << Q_FUNC_INFO;
+ tDebug() << Q_FUNC_INFO << query.isNull();
QTreeWidgetItem* ti = m_tree->invisibleRootItem()->child( 0 );
diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp
index 0d46ced6f..565032f8c 100644
--- a/src/diagnosticsdialog.cpp
+++ b/src/diagnosticsdialog.cpp
@@ -19,6 +19,8 @@
#include "diagnosticsdialog.h"
#include "ui_diagnosticsdialog.h"
+#include "config.h"
+
#include
#include
#include
@@ -54,6 +56,11 @@ void DiagnosticsDialog::updateLogView()
.arg( QDateTime::currentDateTime().toString() )
);
+ // network
+ log.append(
+ "TOMAHAWK-VERSION: " TOMAHAWK_VERSION "\n\n\n"
+ );
+
// network
log.append(
"NETWORK:\n"
diff --git a/src/libtomahawk/globalactionmanager.cpp b/src/libtomahawk/globalactionmanager.cpp
index 3b7477168..a60a01918 100644
--- a/src/libtomahawk/globalactionmanager.cpp
+++ b/src/libtomahawk/globalactionmanager.cpp
@@ -346,6 +346,10 @@ bool
GlobalActionManager::doQueueAdd( const QStringList& parts, const QList< QPair< QString, QString > >& queryItems )
{
if( parts.size() && parts[ 0 ] == "track" ) {
+
+ if( queueSpotify( parts, queryItems ) )
+ return true;
+
QPair< QString, QString > pair;
QString title, artist, album, urlStr;
@@ -394,6 +398,28 @@ GlobalActionManager::doQueueAdd( const QStringList& parts, const QList< QPair< Q
return false;
}
+bool
+GlobalActionManager::queueSpotify( const QStringList& , const QList< QPair< QString, QString > >& queryItems )
+{
+ QString url;
+
+ QPair< QString, QString > pair;
+ foreach( pair, queryItems ) {
+ if( pair.first == "spotifyURL" )
+ url = pair.second;
+ else if( pair.first == "spotifyURI" )
+ url = pair.second;
+ }
+
+ if( url.isEmpty() )
+ return false;
+
+ openSpotifyLink( url );
+
+ return true;
+}
+
+
bool
GlobalActionManager::handleSearchCommand( const QUrl& url )
{
@@ -581,6 +607,9 @@ GlobalActionManager::handlePlayCommand( const QUrl& url )
}
if( parts[ 0 ] == "track" ) {
+ if( playSpotify( url ) )
+ return true;
+
QPair< QString, QString > pair;
QString title, artist, album, urlStr;
foreach( pair, url.queryItems() ) {
@@ -607,6 +636,29 @@ GlobalActionManager::handlePlayCommand( const QUrl& url )
return false;
}
+bool
+GlobalActionManager::playSpotify( const QUrl& url )
+{
+ if( !url.hasQueryItem( "spotifyURI" ) && !url.hasQueryItem( "spotifyURL" ) )
+ return false;
+
+ QString spotifyUrl = url.hasQueryItem( "spotifyURI" ) ? url.queryItemValue( "spotifyURI" ) : url.queryItemValue( "spotifyURL" );
+ SpotifyParser* p = new SpotifyParser( spotifyUrl, this );
+ connect( p, SIGNAL( track( Tomahawk::query_ptr ) ), this, SLOT( spotifyToPlay( Tomahawk::query_ptr ) ) );
+
+ return true;
+}
+
+void
+GlobalActionManager::spotifyToPlay( const query_ptr& q )
+{
+ Pipeline::instance()->resolve( q, true );
+
+ m_waitingToPlay = q;
+ connect( q.data(), SIGNAL( resolvingFinished( bool ) ), this, SLOT( waitingForResolved( bool ) ) );
+}
+
+
bool GlobalActionManager::handleBookmarkCommand(const QUrl& url)
{
QStringList parts = url.path().split( "/" ).mid( 1 ); // get the rest of the command
diff --git a/src/libtomahawk/globalactionmanager.h b/src/libtomahawk/globalactionmanager.h
index c8dd48a1f..725e8c959 100644
--- a/src/libtomahawk/globalactionmanager.h
+++ b/src/libtomahawk/globalactionmanager.h
@@ -77,6 +77,8 @@ private slots:
void xspfCreated( const QByteArray& xspf );
void expandedUrls( QStringList );
+
+ void spotifyToPlay( const Tomahawk::query_ptr& );
private:
explicit GlobalActionManager( QObject* parent = 0 );
void doBookmark( const Tomahawk::playlist_ptr& pl, const Tomahawk::query_ptr& q );
@@ -93,6 +95,9 @@ private:
bool handleOpenCommand(const QUrl& url );
bool doQueueAdd( const QStringList& parts, const QList< QPair< QString, QString > >& queryItems );
+ bool playSpotify( const QUrl& url );
+ bool queueSpotify( const QStringList& parts, const QList< QPair< QString, QString > >& queryItems );
+
/// handle parsing mime data
void handleTrackUrls( const QString& urls );
QList< Tomahawk::query_ptr > tracksFromQueryList( const QMimeData* d );
diff --git a/src/libtomahawk/pipeline.cpp b/src/libtomahawk/pipeline.cpp
index 57d38f919..3e055d512 100644
--- a/src/libtomahawk/pipeline.cpp
+++ b/src/libtomahawk/pipeline.cpp
@@ -291,10 +291,7 @@ Pipeline::shunt( const query_ptr& q )
}
else
{
- qDebug() << "Reached end of pipeline for:" << q->toString();
setQIDState( q, 0 );
-
- q->onResolvingFinished();
}
shuntNext();
diff --git a/src/libtomahawk/playlist/artistview.cpp b/src/libtomahawk/playlist/artistview.cpp
index 49b1e1153..6b5cd225e 100644
--- a/src/libtomahawk/playlist/artistview.cpp
+++ b/src/libtomahawk/playlist/artistview.cpp
@@ -151,6 +151,20 @@ ArtistView::onItemActivated( const QModelIndex& index )
}
}
+void
+ArtistView::keyPressEvent( QKeyEvent* event )
+{
+ qDebug() << Q_FUNC_INFO;
+ QTreeView::keyPressEvent( event );
+
+ if ( !model() )
+ return;
+
+ if ( event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return )
+ {
+ onItemActivated( currentIndex() );
+ }
+}
void
ArtistView::paintEvent( QPaintEvent* event )
diff --git a/src/libtomahawk/playlist/artistview.h b/src/libtomahawk/playlist/artistview.h
index fe5db9c63..f4076a200 100644
--- a/src/libtomahawk/playlist/artistview.h
+++ b/src/libtomahawk/playlist/artistview.h
@@ -74,6 +74,7 @@ protected:
virtual void resizeEvent( QResizeEvent* event );
void paintEvent( QPaintEvent* event );
+ void keyPressEvent( QKeyEvent* event );
private slots:
void onFilterChanged( const QString& filter );
diff --git a/src/libtomahawk/playlist/dynamic/DynamicModel.cpp b/src/libtomahawk/playlist/dynamic/DynamicModel.cpp
index 1cf9267c9..436b47e6b 100644
--- a/src/libtomahawk/playlist/dynamic/DynamicModel.cpp
+++ b/src/libtomahawk/playlist/dynamic/DynamicModel.cpp
@@ -137,12 +137,13 @@ DynamicModel::trackResolveFinished( bool success )
Query* q = qobject_cast( sender() );
- qDebug() << "Got resolveFinished in DynamicModel" << q->track() << q->artist();
- if( !m_waitingFor.contains( q ) )
+ tDebug() << "Got resolveFinished in DynamicModel" << q->track() << q->artist();
+ if ( !m_waitingFor.contains( q ) )
return;
- if( !q->playable() ) {
- qDebug() << "Got not playable or resolved track:" << q->track() << q->artist() << m_lastResolvedRow << m_currentAttempts;
+ if ( !q->playable() )
+ {
+ tDebug() << "Got not playable or resolved track:" << q->track() << q->artist() << m_lastResolvedRow << m_currentAttempts;
m_currentAttempts++;
int curAttempts = m_startingAfterFailed ? m_currentAttempts - 20 : m_currentAttempts; // if we just failed, m_currentAttempts includes those failures
@@ -154,7 +155,8 @@ DynamicModel::trackResolveFinished( bool success )
emit trackGenerationFailure( tr( "Could not find a playable track.\n\nPlease change the filters or try again." ) );
}
}
- else {
+ else
+ {
qDebug() << "Got successful resolved track:" << q->track() << q->artist() << m_lastResolvedRow << m_currentAttempts;
if( m_currentAttempts > 0 ) {
diff --git a/src/libtomahawk/playlist/dynamic/DynamicPlaylist.h b/src/libtomahawk/playlist/dynamic/DynamicPlaylist.h
index fc9f44bb9..63e29e9fe 100644
--- a/src/libtomahawk/playlist/dynamic/DynamicPlaylist.h
+++ b/src/libtomahawk/playlist/dynamic/DynamicPlaylist.h
@@ -91,7 +91,6 @@ class DLLEXPORT DynamicPlaylist : public Playlist
public:
virtual ~DynamicPlaylist();
-
static Tomahawk::dynplaylist_ptr load( const QString& guid );
/// Generate an empty dynamic playlist with default generator
diff --git a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h
index 4b6e7a5b3..31f1040a3 100644
--- a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h
+++ b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h
@@ -63,6 +63,7 @@ public:
virtual ~DynamicWidget();
void loadDynamicPlaylist( const dynplaylist_ptr& playlist );
+ dynplaylist_ptr playlist() { return m_playlist; }
virtual PlaylistInterface* playlistInterface() const;
diff --git a/src/libtomahawk/playlist/topbar/topbar.cpp b/src/libtomahawk/playlist/topbar/topbar.cpp
index 8849c5953..200974db1 100644
--- a/src/libtomahawk/playlist/topbar/topbar.cpp
+++ b/src/libtomahawk/playlist/topbar/topbar.cpp
@@ -19,6 +19,8 @@
#include "topbar.h"
#include "ui_topbar.h"
+#include "searchbutton.h"
+
#include
#include
#include
@@ -48,10 +50,12 @@ TopBar::TopBar( QWidget* parent )
connect( ui->filterEdit, SIGNAL( textChanged( QString ) ), SIGNAL( filterTextChanged( QString ) ) );
ui->filterEdit->setStyleSheet( "QLineEdit { border: 1px solid gray; border-radius: 6px; margin-right: 2px; }" );
+ ui->filterEdit->setInactiveText( tr( "Filter" ) );
#ifdef Q_WS_MAC
ui->filterEdit->setAttribute( Qt::WA_MacShowFocusRect, 0 );
#endif
- ui->filterEdit->setInactiveText( tr( "Filter" ) );
+
+ ui->filterEdit->searchButton()->setImage( QImage( RESPATH "images/filter.png" ) );
// initialise dudes
for( int i = 0; i < MAXDUDES; ++i )
diff --git a/src/libtomahawk/query.cpp b/src/libtomahawk/query.cpp
index 93ac8540e..eda3ae385 100644
--- a/src/libtomahawk/query.cpp
+++ b/src/libtomahawk/query.cpp
@@ -127,8 +127,8 @@ Query::addResults( const QList< Tomahawk::result_ptr >& newresults )
}
}
- emit resultsAdded( newresults );
checkResults();
+ emit resultsAdded( newresults );
}
@@ -169,9 +169,12 @@ Query::removeResult( const Tomahawk::result_ptr& result )
void
Query::onResolvingFinished()
{
-// qDebug() << Q_FUNC_INFO << "Finished resolving." << toString();
- m_resolveFinished = true;
- emit resolvingFinished( m_solved );
+ tDebug() << "Finished resolving:" << toString();
+ if ( !m_resolveFinished )
+ {
+ m_resolveFinished = true;
+ emit resolvingFinished( m_solved );
+ }
}
@@ -324,7 +327,7 @@ Query::checkResults()
emit solvedStateChanged( false );
}
- if( becameSolved )
+ if ( becameSolved )
emit solvedStateChanged( true );
}
diff --git a/src/libtomahawk/utils/animatedsplitter.cpp b/src/libtomahawk/utils/animatedsplitter.cpp
index bd733034a..0a34e32af 100644
--- a/src/libtomahawk/utils/animatedsplitter.cpp
+++ b/src/libtomahawk/utils/animatedsplitter.cpp
@@ -104,6 +104,11 @@ AnimatedSplitter::onSizeChanged( const QSize& size )
if ( i == m_greedyIndex )
{
j = height() - size.height();
+ for ( int x = 0; x < count(); x++ )
+ {
+ if ( x != i && x != wi )
+ j -= widget( x )->height();
+ }
}
else if ( i == wi )
{
@@ -145,7 +150,7 @@ AnimatedWidget::AnimatedWidget( AnimatedSplitter* parent )
, m_isHidden( false )
{
m_timeLine = new QTimeLine( ANIMATION_TIME, this );
- m_timeLine->setUpdateInterval( 5 );
+ m_timeLine->setUpdateInterval( 20 );
m_timeLine->setEasingCurve( QEasingCurve::OutBack );
connect( m_timeLine, SIGNAL( frameChanged( int ) ), SLOT( onAnimationStep( int ) ) );
diff --git a/src/libtomahawk/viewmanager.cpp b/src/libtomahawk/viewmanager.cpp
index 5454b5f3b..54fdd54ce 100644
--- a/src/libtomahawk/viewmanager.cpp
+++ b/src/libtomahawk/viewmanager.cpp
@@ -621,6 +621,8 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
}
m_stack->setCurrentWidget( page->widget() );
+ page->widget()->setFocus();
+
updateView();
}
diff --git a/src/libtomahawk/widgets/HeaderLabel.cpp b/src/libtomahawk/widgets/HeaderLabel.cpp
index 3b98ad3e7..055f2001f 100644
--- a/src/libtomahawk/widgets/HeaderLabel.cpp
+++ b/src/libtomahawk/widgets/HeaderLabel.cpp
@@ -31,11 +31,7 @@ HeaderLabel::HeaderLabel( QWidget* parent )
{
QFont f( font() );
f.setBold( true );
- f.setPointSize( 11 );
-
-#ifdef Q_WS_MAC
- f.setPointSize( f.pointSize() - 2 );
-#endif
+ f.setPixelSize( 12 );
setFont( f );
setFixedHeight( sizeHint().height() + 8 );
diff --git a/src/libtomahawk/widgets/newplaylistwidget.cpp b/src/libtomahawk/widgets/newplaylistwidget.cpp
index 81d1d4a10..201a7b015 100644
--- a/src/libtomahawk/widgets/newplaylistwidget.cpp
+++ b/src/libtomahawk/widgets/newplaylistwidget.cpp
@@ -56,6 +56,8 @@ NewPlaylistWidget::NewPlaylistWidget( QWidget* parent )
ui->suggestionsView->overlay()->setEnabled( false );
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( updateSuggestions() ) );
+
+ ui->titleEdit->setFocus();
}
diff --git a/src/libtomahawk/widgets/newplaylistwidget.ui b/src/libtomahawk/widgets/newplaylistwidget.ui
index e3a145050..0e9215b2f 100644
--- a/src/libtomahawk/widgets/newplaylistwidget.ui
+++ b/src/libtomahawk/widgets/newplaylistwidget.ui
@@ -34,9 +34,6 @@
26
-
- Qt::StrongFocus
-
-
diff --git a/src/libtomahawk/widgets/searchwidget.h b/src/libtomahawk/widgets/searchwidget.h
index 83308e482..f7d7ec021 100644
--- a/src/libtomahawk/widgets/searchwidget.h
+++ b/src/libtomahawk/widgets/searchwidget.h
@@ -48,7 +48,7 @@ public:
virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
virtual bool isTemporaryPage() const { return true; }
- virtual QString title() const { return tr( "Search" ); }
+ virtual QString title() const { return QString( tr( "Search: %1" ) ).arg( m_search ); }
virtual QString description() const { return tr( "Results for '%1'" ).arg( m_search ); }
virtual bool showStatsBar() const { return false; }
diff --git a/src/libtomahawk/widgets/welcomeplaylistmodel.cpp b/src/libtomahawk/widgets/welcomeplaylistmodel.cpp
index 07fe5fd66..fe855885c 100644
--- a/src/libtomahawk/widgets/welcomeplaylistmodel.cpp
+++ b/src/libtomahawk/widgets/welcomeplaylistmodel.cpp
@@ -1,5 +1,4 @@
/*
-
Copyright (C) 2011 Leo Franchi
This program is free software; you can redistribute it and/or modify
@@ -20,11 +19,11 @@
#include "welcomeplaylistmodel.h"
-#include
-#include