Commit 6f54b381 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: menus, more cohenrency.

Try to mimic a bit more the mac menus.
parent 0fc3f644
...@@ -198,16 +198,16 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object, ...@@ -198,16 +198,16 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object,
PUSH_INPUTVAR( "video-es" ); PUSH_INPUTVAR( "video-es" );
PUSH_INPUTVAR( "spu-es" ); PUSH_INPUTVAR( "spu-es" );
PUSH_VAR( "fullscreen" ); PUSH_VAR( "fullscreen" );
PUSH_VAR( "zoom" );
PUSH_VAR( "scaling" );
PUSH_VAR( "deinterlace" );
PUSH_VAR( "aspect-ratio" );
PUSH_VAR( "crop" );
PUSH_VAR( "video-on-top" ); PUSH_VAR( "video-on-top" );
#ifdef WIN32 #ifdef WIN32
PUSH_VAR( "directx-wallpaper" ); PUSH_VAR( "directx-wallpaper" );
#endif #endif
PUSH_VAR( "video-snapshot" ); PUSH_VAR( "video-snapshot" );
PUSH_VAR( "zoom" );
PUSH_VAR( "scale" );
PUSH_VAR( "aspect-ratio" );
PUSH_VAR( "crop" );
PUSH_VAR( "deinterlace" );
/* Special case for postproc */ /* Special case for postproc */
// FIXME // FIXME
...@@ -241,10 +241,10 @@ static int AudioAutoMenuBuilder( aout_instance_t *p_object, ...@@ -241,10 +241,10 @@ static int AudioAutoMenuBuilder( aout_instance_t *p_object,
vector<vlc_object_t *> &objects, vector<vlc_object_t *> &objects,
vector<const char *> &varnames ) vector<const char *> &varnames )
{ {
PUSH_VAR( "visual" );
PUSH_INPUTVAR( "audio-es" ); PUSH_INPUTVAR( "audio-es" );
PUSH_VAR( "audio-device" );
PUSH_VAR( "audio-channels" ); PUSH_VAR( "audio-channels" );
PUSH_VAR( "audio-device" );
PUSH_VAR( "visual" );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -291,9 +291,9 @@ void QVLCMenu::createMenuBar( MainInterface *mi, ...@@ -291,9 +291,9 @@ void QVLCMenu::createMenuBar( MainInterface *mi,
QMenuBar *bar = mi->menuBar(); QMenuBar *bar = mi->menuBar();
BAR_ADD( FileMenu( p_intf, bar ), qtr( "&Media" ) ); BAR_ADD( FileMenu( p_intf, bar ), qtr( "&Media" ) );
BAR_DADD( NavigMenu( p_intf, bar ), qtr( "P&layback" ), 3 );
BAR_DADD( AudioMenu( p_intf, bar ), qtr( "&Audio" ), 1 ); BAR_DADD( AudioMenu( p_intf, bar ), qtr( "&Audio" ), 1 );
BAR_DADD( VideoMenu( p_intf, bar ), qtr( "&Video" ), 2 ); BAR_DADD( VideoMenu( p_intf, bar ), qtr( "&Video" ), 2 );
BAR_DADD( NavigMenu( p_intf, bar ), qtr( "P&layback" ), 3 );
BAR_ADD( ToolsMenu( bar ), qtr( "&Tools" ) ); BAR_ADD( ToolsMenu( bar ), qtr( "&Tools" ) );
BAR_ADD( ViewMenu( p_intf, NULL, mi, visual_selector_enabled, true ), BAR_ADD( ViewMenu( p_intf, NULL, mi, visual_selector_enabled, true ),
...@@ -330,7 +330,7 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf, QWidget *parent ) ...@@ -330,7 +330,7 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf, QWidget *parent )
addDPStaticEntry( menu, qtr( "Paste &MRL" ), addDPStaticEntry( menu, qtr( "Paste &MRL" ),
NULL, SLOT( openUrlDialog() ), "Ctrl+V" ); NULL, SLOT( openUrlDialog() ), "Ctrl+V" );
recentsMenu = new QMenu( qtr( "Recently &Played" ), menu ); recentsMenu = new QMenu( qtr( "&Recent Media" ), menu );
updateRecents( p_intf ); updateRecents( p_intf );
menu->addMenu( recentsMenu ); menu->addMenu( recentsMenu );
menu->addSeparator(); menu->addSeparator();
...@@ -496,23 +496,25 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current ) ...@@ -496,23 +496,25 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
if( current->isEmpty() ) if( current->isEmpty() )
{ {
ACT_ADD( current, "audio-es", qtr( "Audio &Track" ) ); ACT_ADD( current, "audio-es", qtr( "Audio &Track" ) );
ACT_ADD( current, "audio-device", qtr( "Audio &Device" ) );
ACT_ADD( current, "audio-channels", qtr( "Audio &Channels" ) ); ACT_ADD( current, "audio-channels", qtr( "Audio &Channels" ) );
ACT_ADD( current, "audio-device", qtr( "Audio &Device" ) );
current->addSeparator();
ACT_ADD( current, "visual", qtr( "&Visualizations" ) );
current->addSeparator(); current->addSeparator();
ACT_ADD( current, "visual", qtr( "&Visualizations" ) ); ACT_ADD( current, "visual", qtr( "&Visualizations" ) );
current->addSeparator(); current->addSeparator();
QAction *action = current->addAction( qtr( "Mute Audio" ), QAction *action = current->addAction( qtr( "Increase Volume" ),
ActionsManager::getInstance( p_intf ), SLOT( toggleMuteAudio() ) );
action->setData( true );
action = current->addAction( qtr( "Increase Volume" ),
ActionsManager::getInstance( p_intf ), SLOT( AudioUp() ) ); ActionsManager::getInstance( p_intf ), SLOT( AudioUp() ) );
action->setData( true ); action->setData( true );
action = current->addAction( qtr( "Decrease Volume" ), action = current->addAction( qtr( "Decrease Volume" ),
ActionsManager::getInstance( p_intf ), SLOT( AudioDown() ) ); ActionsManager::getInstance( p_intf ), SLOT( AudioDown() ) );
action->setData( true ); action->setData( true );
action = current->addAction( qtr( "Mute" ),
ActionsManager::getInstance( p_intf ), SLOT( toggleMuteAudio() ) );
action->setData( true );
} }
p_input = THEMIM->getInput(); p_input = THEMIM->getInput();
...@@ -558,18 +560,22 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current ) ...@@ -558,18 +560,22 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
addDPStaticEntry( submenu, qtr( "Open File..." ), "", addDPStaticEntry( submenu, qtr( "Open File..." ), "",
SLOT( loadSubtitlesFile() ) ); SLOT( loadSubtitlesFile() ) );
submenu->addSeparator(); submenu->addSeparator();
current->addSeparator();
ACT_ADD( current, "fullscreen", qtr( "&Fullscreen" ) ); ACT_ADD( current, "fullscreen", qtr( "&Fullscreen" ) );
ACT_ADD( current, "zoom", qtr( "&Zoom" ) );
ACT_ADD( current, "deinterlace", qtr( "&Deinterlace" ) );
ACT_ADD( current, "aspect-ratio", qtr( "&Aspect Ratio" ) );
ACT_ADD( current, "crop", qtr( "&Crop" ) );
ACT_ADD( current, "video-on-top", qtr( "Always &On Top" ) ); ACT_ADD( current, "video-on-top", qtr( "Always &On Top" ) );
#ifdef WIN32 #ifdef WIN32
ACT_ADD( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) ); ACT_ADD( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) );
#endif #endif
ACT_ADD( current, "video-snapshot", qtr( "Sna&pshot" ) ); ACT_ADD( current, "video-snapshot", qtr( "Sna&pshot" ) );
ACT_ADD( current, "postproc-q", qtr( "Post processing" ) ); current->addSeparator();
ACT_ADD( current, "zoom", qtr( "&Zoom" ) );
ACT_ADD( current, "scale", qtr( "Sca&le" ) );
ACT_ADD( current, "aspect-ratio", qtr( "&Aspect Ratio" ) );
ACT_ADD( current, "crop", qtr( "&Crop" ) );
ACT_ADD( current, "deinterlace", qtr( "&Deinterlace" ) );
ACT_ADD( current, "postproc-q", qtr( "&Post processing" ) );
} }
p_input = THEMIM->getInput(); p_input = THEMIM->getInput();
......
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