#include "qt4.hpp"
#include "components/playlist/playlist_model.hpp"
-#include "dialogs/mediainfo.hpp"
#include <vlc_intf_strings.h>
#include "pixmaps/type_unknown.xpm"
/* No parent, should be the main one */
if( parentItem == NULL )
{
- i_showflags = config_GetInt( model->p_intf, "qt-pl-showflags" );
+ i_showflags = model->shownFlags();
updateColumnHeaders();
}
else
{
item_col_strings.clear();
- if( model->i_depth == 1 ) /* Selector Panel */
+ if( model->i_depth == DEPTH_SEL ) /* Selector Panel */
{
item_col_strings.append( "" );
return;
}
/* update the PL Item, get the good names and so on */
+/* This function may not be the best way to do it
+ It destroys everything and gets everything again instead of just
+ building the necessary columns.
+ This does extra work if you re-display the same column. Slower...
+ On the other hand, this way saves memory.
+ There must be a more clever way.
+ */
void PLItem::update( playlist_item_t *p_item, bool iscurrent )
{
char psz_duration[MSTRTIME_MAX_SIZE];
PLModel::~PLModel()
{
+ config_PutInt( p_intf, "qt-pl-showflags", rootItem->i_showflags );
+ config_SaveConfigFile( p_intf, NULL );
delCallbacks();
delete rootItem;
}
endInsertColumns();
}
rebuild();
- config_PutInt( p_intf, "qt-pl-showflags", rootItem->i_showflags );
- config_SaveConfigFile( p_intf, NULL );
}
}