Commit be84b46a authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

Qt: re-enable services dicovery and fix them

parent bd6810fb
...@@ -641,11 +641,12 @@ void DialogsProvider::menuUpdateAction( QObject *data ) ...@@ -641,11 +641,12 @@ void DialogsProvider::menuUpdateAction( QObject *data )
void DialogsProvider::SDMenuAction( QString data ) void DialogsProvider::SDMenuAction( QString data )
{ {
const char *psz_sd = qtu( data ); char *psz_sd = strdup( qtu( data ) );
if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) ) if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) )
playlist_ServicesDiscoveryAdd( THEPL, psz_sd ); playlist_ServicesDiscoveryAdd( THEPL, psz_sd );
else else
playlist_ServicesDiscoveryRemove( THEPL, psz_sd ); playlist_ServicesDiscoveryRemove( THEPL, psz_sd );
free( psz_sd );
} }
/** /**
......
...@@ -398,14 +398,16 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, ...@@ -398,14 +398,16 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
bool with_intf ) bool with_intf )
{ {
QMenu *menu = new QMenu( current ); QMenu *menu = new QMenu( current );
QAction *act;
if( mi ) if( mi )
{ {
QAction *act= act = menu->addAction( QIcon( ":/playlist_menu" ),
menu->addAction( QIcon( ":/playlist_menu" ), qtr( "Play&list..." ), qtr( "Play&list..." ), mi,
mi, SLOT( togglePlaylist() ), qtr( "Ctrl+L" ) ); SLOT( togglePlaylist() ), qtr( "Ctrl+L" ) );
act->setData( "_static_" ); act->setData( "_static_" );
} }
menu->addMenu( SDMenu( p_intf ) ); act = menu->addMenu( SDMenu( p_intf ) );
act->setData( "_static_" );
/*menu->addSeparator(); /*menu->addSeparator();
menu->addAction( qtr( "Undock from Interface" ), mi, menu->addAction( qtr( "Undock from Interface" ), mi,
SLOT( undockPlaylist() ), qtr( "Ctrl+U" ) );*/ SLOT( undockPlaylist() ), qtr( "Ctrl+U" ) );*/
......
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