Commit 684cafc4 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Qt4 - Cleanup and start code to get the possibility on Windows to open the containing folder...

parent bb22f297
......@@ -251,7 +251,6 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
}
#undef ADD_META
}
/*************************************************************************
......@@ -259,7 +258,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
*************************************************************************/
PLModel::PLModel( playlist_t *_p_playlist, intf_thread_t *_p_intf,
playlist_item_t * p_root, int _i_depth, QObject *parent)
playlist_item_t * p_root, int _i_depth, QObject *parent)
: QAbstractItemModel(parent)
{
i_depth = _i_depth;
......@@ -969,32 +968,10 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list )
menu->addAction( qfu(I_POP_SORT), this, SLOT( popupSort() ) );
menu->addAction( qfu(I_POP_ADD), this, SLOT( popupAdd() ) );
}
// menu->addSeparator();
/*ContextUpdateMapper = new QSignalMapper(this);
QMenu *selectColMenu = new QMenu( qtr("Show columns") );
#define ADD_META_ACTION( meta ) { \
QAction* option = selectColMenu->addAction( qfu(VLC_META_##meta) ); \
option->setCheckable( true ); \
option->setChecked( rootItem->i_showflags & VLC_META_ENGINE_##meta ); \
ContextUpdateMapper->setMapping( option, VLC_META_ENGINE_##meta ); \
CONNECT( option, triggered(), ContextUpdateMapper, map() ); \
}
CONNECT(ContextUpdateMapper, mapped( int ), this, viewchanged( int ) );
ADD_META_ACTION( TITLE );
ADD_META_ACTION( ARTIST );
ADD_META_ACTION( DURATION );
ADD_META_ACTION( COLLECTION );
ADD_META_ACTION( GENRE );
ADD_META_ACTION( SEQ_NUM );
ADD_META_ACTION( RATING );
ADD_META_ACTION( DESCRIPTION );
#undef ADD_META_ACTION
menu->addMenu( selectColMenu );*/
#ifdef WIN32
menu->addSeparator();
menu->addAction( qfu( I_POP_EXPLORE ), this SLOT( popupExplore() ) );
#endif
menu->popup( point );
}
else
......@@ -1095,6 +1072,13 @@ void PLModel::popupSave()
fprintf( stderr, "Save not implemented\n" );
}
#ifdef WIN32
void PLModel::popupExplore()
{
ShellExecuteW(NULL, L"explore", L"C:\\", NULL, NULL, SW_SHOWNORMAL );
}
#endif
/**********************************************************************
* Playlist callbacks
**********************************************************************/
......
......@@ -142,10 +142,7 @@ public:
void sendArt( QString url );
void removeArt( );
int shownFlags()
{
return rootItem->i_showflags;
}
int shownFlags() { return rootItem->i_showflags; }
private:
void addCallbacks();
void delCallbacks();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment