PUSH_VAR( "aspect-ratio" );
PUSH_VAR( "crop" );
PUSH_VAR( "video-on-top" );
+#ifdef WIN32
PUSH_VAR( "directx-wallpaper" );
+#endif
PUSH_VAR( "video-snapshot" );
if( p_object )
return NULL;
}
-static QAction * FindActionWithText( QMenu *menu, QString &text )
-{
- QAction *action;
- foreach( action, menu->actions() )
- {
- if( action->text() == text )
- return action;
- }
- return NULL;
-}
-
/*****************************************************************************
* All normal menus
* Simple Code
setDesktopAware set to false */
QMenuBar *bar = mi->menuBar();
BAR_ADD( FileMenu(), qtr( "&Media" ) );
- BAR_ADD( PlaylistMenu( p_intf, mi ), qtr( "&Playlist" ) );
- BAR_ADD( ToolsMenu( p_intf, NULL, mi, visual_selector_enabled, true ),
- qtr( "&Tools" ) );
+
BAR_DADD( AudioMenu( p_intf, NULL ), qtr( "&Audio" ), 1 );
BAR_DADD( VideoMenu( p_intf, NULL ), qtr( "&Video" ), 2 );
BAR_DADD( NavigMenu( p_intf, NULL ), qtr( "P&layback" ), 3 );
+
+ BAR_ADD( PlaylistMenu( p_intf, mi ), qtr( "&Playlist" ) );
+ BAR_ADD( ToolsMenu( p_intf, NULL, mi, visual_selector_enabled, true ),
+ qtr( "&Tools" ) );
+
BAR_ADD( HelpMenu( NULL ), qtr( "&Help" ) );
}
#undef BAR_ADD
addDPStaticEntry( menu, qtr( "&Open File..." ), "",
":/file-asym", SLOT( openFileDialog() ), "Ctrl+O" );
addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ), "",
- ":/folder-grey", SLOT( PLAppendDir() ), "Ctrl+F" );
+ ":/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
addDPStaticEntry( menu, qtr( "Open &Disc..." ), "",
":/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
addDPStaticEntry( menu, qtr( "Open &Network..." ), "",
"Ctrl+C" );
menu->addSeparator();
+ addDPStaticEntry( menu, qtr( "Conve&rt / Save..." ), "", "",
+ SLOT( openThenTranscodingDialogs() ), "Ctrl+R" );
addDPStaticEntry( menu, qtr( "&Streaming..." ), "",
":/stream", SLOT( openThenStreamingDialogs() ),
"Ctrl+S" );
- addDPStaticEntry( menu, qtr( "Conve&rt / Save..." ), "", "",
- SLOT( openThenTranscodingDialogs() ), "Ctrl+R" );
menu->addSeparator();
addDPStaticEntry( menu, qtr( "&Quit" ) , "",
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, "directx-wallpaper", qtr( "DirectX Wallpaper" ) ); */
+#ifdef WIN32
+ ACT_ADD( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) );
+#endif
ACT_ADD( current, "video-snapshot", qtr( "Sna&pshot" ) );
/* ACT_ADD( current, "ffmpeg-pp-q", qtr( "Decoder" ) ); */
}
addDPStaticEntry( openmenu, qtr( "&Open File..." ), "",
":/file-asym", SLOT( openFileDialog() ) );
addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ), "",
- ":/folder-grey", SLOT( PLAppendDir() ) );
+ ":/folder-grey", SLOT( PLOpenDir() ) );
addDPStaticEntry( openmenu, qtr( "Open &Disc..." ), "",
":/disc", SLOT( openDiscDialog() ) );
addDPStaticEntry( openmenu, qtr( "Open &Network..." ), "",
action->setCheckable( true );
action->setChecked( mi->isFullScreen() );
}
+ else /* We are using the skins interface.
+ If not, this entry will not show. */
+ {
+ objects.clear();
+ varnames.clear();
+ vlc_object_t *p_object = ( vlc_object_t* )
+ vlc_object_find( p_intf, VLC_OBJECT_INTF, FIND_PARENT );
+ if( p_object )
+ {
+ objects.push_back( p_object->i_object_id );
+ varnames.push_back( "intf-skins" );
+ Populate( p_intf, submenu, varnames, objects );
+ vlc_object_release( p_object );
+ }
+ else
+ {
+ msg_Dbg( p_intf, "could not find parent interface" );
+ }
+ }
menu->addMenu( submenu );
}
}
if( var_Change( p_object, psz_var, VLC_VAR_GETLIST,
- &val_list, &text_list ) < 0 )
+ &val_list, &text_list ) < 0 )
{
return VLC_EGENERIC;
}
QAction *action = FindActionWithVar( menu, psz_var );
if( !action )
{
- /* This is a value */
- action = FindActionWithText( menu, text );
- if( !action )
- {
- action = new QAction( text, menu );
- menu->addAction( action );
- }
+ action = new QAction( text, menu );
+ menu->addAction( action );
}
- /* FIXME action->setText( text ); */
action->setToolTip( help );
-
action->setEnabled( i_object_id != 0 );
if( i_item_type == ITEM_CHECK )