1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

* Fixed filter behaviour.

This commit is contained in:
Christian Muehlhaeuser 2011-09-05 03:52:41 +02:00
parent 1c3b3e9173
commit 52c0e9993b
3 changed files with 21 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include <QLabel>
#include <QPixmap>
#include "viewmanager.h"
#include "thirdparty/Qocoa/qsearchfield.h"
#include "utils/tomahawkutils.h"
#include "utils/logger.h"
@ -77,6 +78,8 @@ InfoBar::InfoBar( QWidget* parent )
ui->horizontalLayout->addWidget( m_searchWidget );
setAutoFillBackground( true );
connect( ViewManager::instance(), SIGNAL( filterAvailable( bool ) ), SLOT( setFilterAvailable( bool ) ) );
}
@ -124,6 +127,20 @@ InfoBar::setPixmap( const QPixmap& p )
}
void
InfoBar::setFilter( const QString& filter )
{
m_searchWidget->setText( filter );
}
void
InfoBar::setFilterAvailable( bool b )
{
m_searchWidget->setVisible( b );
}
void
InfoBar::onFilterEdited()
{

View File

@ -47,6 +47,9 @@ public slots:
void setLongDescription( const QString& s );
void setPixmap( const QPixmap& p );
void setFilter( const QString& filter );
void setFilterAvailable( bool b );
signals:
void filterTextChanged( const QString& filter );

View File

@ -630,7 +630,7 @@ ViewManager::updateView()
connect( currentPlaylistInterface()->object(), SIGNAL( shuffleModeChanged( bool ) ),
SIGNAL( shuffleModeChanged( bool ) ) );
// m_topbar->setFilter( currentPlaylistInterface()->filter() );
m_infobar->setFilter( currentPlaylistInterface()->filter() );
}
if ( currentPage()->showStatsBar() && currentPlaylistInterface() )