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

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 ) ...@@ -251,7 +251,6 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
} }
#undef ADD_META #undef ADD_META
} }
/************************************************************************* /*************************************************************************
...@@ -259,7 +258,7 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent ) ...@@ -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, 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) : QAbstractItemModel(parent)
{ {
i_depth = _i_depth; i_depth = _i_depth;
...@@ -969,32 +968,10 @@ void PLModel::popup( QModelIndex & index, QPoint &point, QModelIndexList list ) ...@@ -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_SORT), this, SLOT( popupSort() ) );
menu->addAction( qfu(I_POP_ADD), this, SLOT( popupAdd() ) ); menu->addAction( qfu(I_POP_ADD), this, SLOT( popupAdd() ) );
} }
// menu->addSeparator(); #ifdef WIN32
menu->addSeparator();
/*ContextUpdateMapper = new QSignalMapper(this); menu->addAction( qfu( I_POP_EXPLORE ), this SLOT( popupExplore() ) );
#endif
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 );*/
menu->popup( point ); menu->popup( point );
} }
else else
...@@ -1095,6 +1072,13 @@ void PLModel::popupSave() ...@@ -1095,6 +1072,13 @@ void PLModel::popupSave()
fprintf( stderr, "Save not implemented\n" ); fprintf( stderr, "Save not implemented\n" );
} }
#ifdef WIN32
void PLModel::popupExplore()
{
ShellExecuteW(NULL, L"explore", L"C:\\", NULL, NULL, SW_SHOWNORMAL );
}
#endif
/********************************************************************** /**********************************************************************
* Playlist callbacks * Playlist callbacks
**********************************************************************/ **********************************************************************/
......
...@@ -142,10 +142,7 @@ public: ...@@ -142,10 +142,7 @@ public:
void sendArt( QString url ); void sendArt( QString url );
void removeArt( ); void removeArt( );
int shownFlags() int shownFlags() { return rootItem->i_showflags; }
{
return rootItem->i_showflags;
}
private: private:
void addCallbacks(); void addCallbacks();
void delCallbacks(); void delCallbacks();
......
Markdown is supported
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