*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
+ * Jean-Philippe André <jpeg@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
SLOT( loadSubtitlesFile() ) );
action->setData( "_static_" );
- ACT_ADD( current, "fullscreen", qtr( "&Fullscreen" ) );
+ ACT_ADD( current, "fullscreen", qtr( "Toggle &Fullscreen" ) );
ACT_ADD( current, "zoom", qtr( "&Zoom" ) );
ACT_ADD( current, "deinterlace", qtr( "&Deinterlace" ) );
ACT_ADD( current, "aspect-ratio", qtr( "&Aspect Ratio" ) );
/* Main Menu that sticks everything together */
void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
{
+ MainInterface *mi = p_intf->p_sys->p_mi;
if( show )
{
/* Delete and recreate a popup if there is one */
PopupMenuControlEntries( menu, p_intf, p_input );
menu->addSeparator();
+ bool b_fullscreen;
if( p_input )
{
vlc_object_yield( p_input );
InputAutoMenuBuilder( VLC_OBJECT( p_input ), objects, varnames );
- /* Audio menu */
vlc_object_t *p_aout = ( vlc_object_t * )
vlc_object_find( p_input, VLC_OBJECT_AOUT, FIND_ANYWHERE );
+ vlc_object_t *p_vout = ( vlc_object_t * )
+ vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD );
+
+ /* Add a fullscreen switch button */
+ if( p_vout )
+ {
+ vlc_value_t val;
+ var_Get( p_vout, "fullscreen", &val );
+ val.b_bool = !val.b_bool;
+ CreateAndConnect( menu, "fullscreen", qtr( "Toggle fullscreen" ), "",
+ ITEM_CHECK, p_vout->i_object_id, val, VLC_VAR_BOOL,
+ !val.b_bool );
+ b_fullscreen = !val.b_bool;
+ }
+
+ /* Audio menu */
AudioAutoMenuBuilder( p_aout, p_input, objects, varnames );
if( p_aout )
vlc_object_release( p_aout );
action->setEnabled( false );
/* Video menu */
- vlc_object_t *p_vout = ( vlc_object_t * )
- vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD );
VideoAutoMenuBuilder( p_vout, p_input, objects, varnames );
if( p_vout )
vlc_object_release( p_vout );
}
menu->addSeparator();
+
+ /* Add some special entries for windowed mode */
+ if( !b_fullscreen )
+ {
+ submenu = new QMenu( qtr( "Interface" ), menu );
+ submenu->addAction( QIcon( ":/pixmaps/playlist_16px.png" ),
+ qtr( "Show Playlist" ), mi, SLOT( togglePlaylist() ) );
+ menu->addMenu( submenu );
+ }
+
PopupMenuStaticEntries( p_intf, menu );
p_intf->p_sys->p_popup_menu = menu;