view->setModel(model);
view->setIconSize( QSize(20,20) );
view->setAlternatingRowColors( true );
- view->header()->resizeSection( 0, 300 );
+ view->header()->resizeSection( 0, 230 );
view->header()->setSortIndicatorShown( true );
view->header()->setClickable( true );
view->setSelectionMode( QAbstractItemView::ExtendedSelection );
selector = new PLSelector( centralWidget(), p_intf, THEPL );
selector->setMaximumWidth( 140 );
+ playlist_item_t *p_root = playlist_GetPreferredNode( THEPL,
+ THEPL->p_local_category );
+
rightPanel = qobject_cast<PLPanel *>(new StandardPLPanel( centralWidget(),
- p_intf, THEPL, THEPL->p_local_category ) );
+ p_intf, THEPL, p_root ) );
connect( selector, SIGNAL( activated( int ) ),
rightPanel, SLOT( setRoot( int ) ) );
layout->addWidget( selector, 0 );
layout->addWidget( rightPanel, 10 );
centralWidget()->setLayout( layout );
- readSettings( "playlist", QSize( 600,500 ) );
+ readSettings( "playlist", QSize( 600,700 ) );
}
PlaylistDialog::~PlaylistDialog()
void PLModel::addCallbacks()
{
- fprintf( stderr, "[%i] Adding callbacks\n", i_depth );
/* Some global changes happened -> Rebuild all */
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
/* We went to the next item */
void PLModel::delCallbacks()
{
- fprintf( stderr, "[%i] Rming callbacks\n", i_depth );
var_DelCallback( p_playlist, "item-change", ItemChanged, this );
var_DelCallback( p_playlist, "playlist-current", PlaylistNext, this );
var_DelCallback( p_playlist, "intf-change", PlaylistChanged, this );
void PLModel::search( QString search_text )
{
/** \todo Fire the search with a small delay ? */
- fprintf( stderr, "Searching\n" );
PL_LOCK;
playlist_item_t *p_root = playlist_ItemGetById( p_playlist,rootItem->i_id );
assert( p_root );
char *psz_name = search_text.toUtf8().data();
- fprintf( stderr, "Searching %s\n", psz_name );
playlist_LiveSearchUpdate( p_playlist , p_root, psz_name );
PL_UNLOCK;
rebuild();