Commit 3487d61e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt/Skins: give complete access to the Tools menu to the skins. Close #2275

parent 98c06d9e
...@@ -293,7 +293,7 @@ void QVLCMenu::createMenuBar( MainInterface *mi, ...@@ -293,7 +293,7 @@ void QVLCMenu::createMenuBar( MainInterface *mi,
BAR_DADD( VideoMenu( p_intf, NULL ), qtr( "&Video" ), 2 ); BAR_DADD( VideoMenu( p_intf, NULL ), qtr( "&Video" ), 2 );
BAR_DADD( NavigMenu( p_intf, NULL ), qtr( "P&layback" ), 3 ); BAR_DADD( NavigMenu( p_intf, NULL ), qtr( "P&layback" ), 3 );
BAR_ADD( ToolsMenu( p_intf ), qtr( "&Tools" ) ); BAR_ADD( ToolsMenu( NULL ), qtr( "&Tools" ) );
BAR_ADD( ViewMenu( p_intf, NULL, mi, visual_selector_enabled, true ), BAR_ADD( ViewMenu( p_intf, NULL, mi, visual_selector_enabled, true ),
qtr( "V&iew" ) ); qtr( "V&iew" ) );
...@@ -353,11 +353,13 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf ) ...@@ -353,11 +353,13 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf )
} }
/* Playlist/MediaLibrary Control */ /* Playlist/MediaLibrary Control */
QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf ) QMenu *QVLCMenu::ToolsMenu( QMenu *parent )
{ {
VLC_UNUSED( p_intf ); //TODO remove QMenu *menu;
QMenu *menu = new QMenu(); if( parent == NULL )
menu = new QMenu();
else
menu = parent;
addDPStaticEntry( menu, qtr( I_MENU_EXT ), ":/settings", addDPStaticEntry( menu, qtr( I_MENU_EXT ), ":/settings",
SLOT( extendedDialog() ), "Ctrl+E" ); SLOT( extendedDialog() ), "Ctrl+E" );
...@@ -715,12 +717,6 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu, ...@@ -715,12 +717,6 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
void QVLCMenu::PopupMenuStaticEntries( QMenu *menu ) void QVLCMenu::PopupMenuStaticEntries( QMenu *menu )
{ {
#if 0
QMenu *toolsmenu = ToolsMenu( p_intf, menu, false, true );
toolsmenu->setTitle( qtr( "Tools" ) );
menu->addMenu( toolsmenu );
#endif
QMenu *openmenu = new QMenu( qtr( "Open Media" ), menu ); QMenu *openmenu = new QMenu( qtr( "Open Media" ), menu );
addDPStaticEntry( openmenu, qtr( "&Open File..." ), addDPStaticEntry( openmenu, qtr( "&Open File..." ),
":/file-asym", SLOT( openFileDialog() ) ); ":/file-asym", SLOT( openFileDialog() ) );
...@@ -881,13 +877,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -881,13 +877,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
{ {
submenu->addAction( QIcon( ":/playlist" ), submenu->addAction( QIcon( ":/playlist" ),
qtr( "Show Playlist" ), mi, SLOT( togglePlaylist() ) ); qtr( "Show Playlist" ), mi, SLOT( togglePlaylist() ) );
}
addDPStaticEntry( submenu, qtr( I_MENU_EXT ),
":/settings", SLOT( extendedDialog() ) );
addDPStaticEntry( submenu, qtr( I_MENU_INFO ) , ":/info",
SLOT( mediaInfoDialog() ), "Ctrl+I" );
if( mi )
{
action = submenu->addAction( QIcon( "" ), action = submenu->addAction( QIcon( "" ),
qtr( "Minimal View" ), mi, SLOT( toggleMinimalView() ) ); qtr( "Minimal View" ), mi, SLOT( toggleMinimalView() ) );
action->setCheckable( true ); action->setCheckable( true );
...@@ -902,8 +891,8 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -902,8 +891,8 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
else /* We are using the skins interface. else /* We are using the skins interface.
If not, this entry will not show. */ If not, this entry will not show. */
{ {
addDPStaticEntry( submenu, qtr( "&Preferences..." ),
":/preferences", SLOT( prefsDialog() ), "Ctrl+P" ); QMenu *tools = ToolsMenu( submenu );
submenu->addSeparator(); submenu->addSeparator();
objects.clear(); objects.clear();
varnames.clear(); varnames.clear();
......
...@@ -101,7 +101,7 @@ private: ...@@ -101,7 +101,7 @@ private:
/* All main Menus */ /* All main Menus */
static QMenu *FileMenu( intf_thread_t * ); static QMenu *FileMenu( intf_thread_t * );
static QMenu *SDMenu( intf_thread_t * ); static QMenu *SDMenu( intf_thread_t * );
static QMenu *ToolsMenu( intf_thread_t * ); static QMenu *ToolsMenu( QMenu * );
static QMenu *ViewMenu( intf_thread_t *, QMenu *, MainInterface *, static QMenu *ViewMenu( intf_thread_t *, QMenu *, MainInterface *,
bool, bool with = true ); bool, bool with = true );
static QMenu *NavigMenu( intf_thread_t *, QMenu * ); static QMenu *NavigMenu( intf_thread_t *, QMenu * );
......
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