Commit 34302f82 authored by Jean-Philippe Andre's avatar Jean-Philippe Andre Committed by Jean-Baptiste Kempf

Qt menus: remove useless FindActionWithText

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d004a7f0
......@@ -191,7 +191,9 @@ static int VideoAutoMenuBuilder( vlc_object_t *p_object,
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 )
......@@ -232,17 +234,6 @@ static QAction * FindActionWithVar( QMenu *menu, const char *psz_var )
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
......@@ -506,7 +497,9 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
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" ) ); */
}
......@@ -1235,19 +1228,12 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
{
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 );
}
}
/* FIXME action->setText( text ); */
action->setToolTip( help );
action->setEnabled( i_object_id != 0 );
if( i_item_type == ITEM_CHECK )
......
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