#include "components/playlist/playlist_model.hpp"
#include <vlc_intf_strings.h>
-#include "pixmaps/type_unknown.xpm"
-
#include <QSettings>
#include "sorting.h"
*/
-void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m )
+void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m, QSettings *settings )
{
parentItem = parent; /* Can be NULL, but only for the rootItem */
i_id = _i_id; /* Playlist item specific id */
}
else
{
- QSettings settings( "vlc", "vlc-qt-interface" );
- i_showflags = settings.value( "qt-pl-showflags", 39 ).toInt();
+ i_showflags = settings->value( "qt-pl-showflags", 39 ).toInt();
if( i_showflags < 1)
- i_showflags = 39; //reasonable default to show something;
+ i_showflags = 39; /* reasonable default to show something; */
+ else if ( i_showflags >= COLUMN_END )
+ i_showflags = COLUMN_END - 1; /* show everything */
+
updateColumnHeaders();
}
}
*/
PLItem::PLItem( int _i_id, int _i_input_id, PLItem *parent, PLModel *m )
{
- init( _i_id, _i_input_id, parent, m );
+ init( _i_id, _i_input_id, parent, m, NULL );
}
PLItem::PLItem( playlist_item_t * p_item, PLItem *parent, PLModel *m )
{
- init( p_item->i_id, p_item->p_input->i_id, parent, m );
+ init( p_item->i_id, p_item->p_input->i_id, parent, m, NULL );
+}
+
+PLItem::PLItem( playlist_item_t * p_item, QSettings *settings, PLModel *m )
+{
+ init( p_item->i_id, p_item->p_input->i_id, NULL, m, settings );
}
PLItem::~PLItem()
for( uint32_t i_index=1; i_index < COLUMN_END; i_index <<= 1 )
{
if( i_showflags & i_index )
- item_col_strings.append( psz_column_title( i_index ) );
+ item_col_strings.append( qfu( psz_column_title( i_index ) ) );
}
}
if( parentItem->i_showflags & i_index )
{
char *psz = psz_column_meta( p_item->p_input, i_index );
- item_col_strings.append( psz );
+ item_col_strings.append( qfu( psz ) );
free( psz );
}
}