Commit 5dd029ec authored by Jean-Philippe Andre's avatar Jean-Philippe Andre Committed by Jean-Baptiste Kempf

Qt menus: popup interface menu

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5fc62fec
...@@ -62,7 +62,7 @@ void addDPStaticEntry( QMenu *menu, ...@@ -62,7 +62,7 @@ void addDPStaticEntry( QMenu *menu,
const char *help, const char *help,
const char *icon, const char *icon,
const char *member, const char *member,
const char *shortcut ) const char *shortcut = NULL )
{ {
QAction *action = NULL; QAction *action = NULL;
if( !EMPTY_STR( icon ) > 0 ) if( !EMPTY_STR( icon ) > 0 )
...@@ -662,14 +662,16 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu ) ...@@ -662,14 +662,16 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu )
#endif #endif
QMenu *openmenu = new QMenu( qtr( "Open" ), menu ); QMenu *openmenu = new QMenu( qtr( "Open" ), menu );
openmenu->addAction( qtr( "Open &File..." ), THEDP, addDPStaticEntry( openmenu, qtr( "&Open File..." ), "",
SLOT( openFileDialog() ) ); ":/pixmaps/file-asym_16px.png", SLOT( openFileDialog() ) );
openmenu->addAction( qtr( "Open &Disc..." ), THEDP, addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ), "",
SLOT( openDiscDialog() ) ); ":/pixmaps/folder-grey_16px.png", SLOT( PLAppendDir() ) );
openmenu->addAction( qtr( "Open &Network..." ), THEDP, addDPStaticEntry( openmenu, qtr( "Open &Disc..." ), "",
SLOT( openNetDialog() ) ); ":/pixmaps/disc_16px.png", SLOT( openDiscDialog() ) );
openmenu->addAction( qtr( "Open &Capture Device..." ), THEDP, addDPStaticEntry( openmenu, qtr( "Open &Network..." ), "",
SLOT( openCaptureDialog() ) ); ":/pixmaps/network_16px.png", SLOT( openNetDialog() ) );
addDPStaticEntry( openmenu, qtr( "Open &Capture Device..." ), "",
":/pixmaps/capture-card_16px.png", SLOT( openCaptureDialog() ) );
menu->addMenu( openmenu ); menu->addMenu( openmenu );
menu->addSeparator(); menu->addSeparator();
...@@ -679,7 +681,8 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu ) ...@@ -679,7 +681,8 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu )
menu->addMenu( helpmenu ); menu->addMenu( helpmenu );
#endif #endif
addDPStaticEntry( menu, qtr( "Quit" ), "", "", SLOT( quit() ) , "Ctrl+Q" ); addDPStaticEntry( menu, qtr( "Quit" ), "", ":/pixmaps/menus_quit_16px.png",
SLOT( quit() ), "Ctrl+Q" );
} }
/* Video Tracks and Subtitles tracks */ /* Video Tracks and Subtitles tracks */
...@@ -784,7 +787,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -784,7 +787,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
vlc_value_t val; vlc_value_t val;
var_Get( p_vout, "fullscreen", &val ); var_Get( p_vout, "fullscreen", &val );
val.b_bool = !val.b_bool; val.b_bool = !val.b_bool;
CreateAndConnect( menu, "fullscreen", qtr( "Toggle fullscreen" ), "", CreateAndConnect( menu, "fullscreen", qtr( "Fullscreen" ), "",
ITEM_CHECK, p_vout->i_object_id, val, VLC_VAR_BOOL, ITEM_CHECK, p_vout->i_object_id, val, VLC_VAR_BOOL,
!val.b_bool ); !val.b_bool );
b_fullscreen = !val.b_bool; b_fullscreen = !val.b_bool;
...@@ -823,6 +826,18 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -823,6 +826,18 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
submenu = new QMenu( qtr( "Interface" ), menu ); submenu = new QMenu( qtr( "Interface" ), menu );
submenu->addAction( QIcon( ":/pixmaps/playlist_16px.png" ), submenu->addAction( QIcon( ":/pixmaps/playlist_16px.png" ),
qtr( "Show Playlist" ), mi, SLOT( togglePlaylist() ) ); qtr( "Show Playlist" ), mi, SLOT( togglePlaylist() ) );
addDPStaticEntry( submenu, qtr( I_MENU_EXT ), "",
":/pixmaps/menus_settings_16px.png", SLOT( extendedDialog() ) );
action = submenu->addAction( QIcon( "" ),
qtr( "Minimal View..." ), mi, SLOT( toggleMinimalView() ) );
action->setCheckable( true );
action->setChecked( !( mi->getControlsVisibilityStatus() &
CONTROLS_VISIBLE ) );
action = submenu->addAction( QIcon( "" ),
qtr( "Toggle Fullscreen Interface" ),
mi, SLOT( toggleFullScreen() ) );
action->setCheckable( true );
action->setChecked( mi->isFullScreen() );
menu->addMenu( submenu ); menu->addMenu( submenu );
} }
......
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