Commit 29ac7d73 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: remove dead code

parent 75e7a5f3
...@@ -1220,9 +1220,7 @@ QMenu * VLCMenuBar::Populate( intf_thread_t *p_intf, ...@@ -1220,9 +1220,7 @@ QMenu * VLCMenuBar::Populate( intf_thread_t *p_intf,
* Private methods. * Private methods.
*****************************************************************************/ *****************************************************************************/
static bool IsMenuEmpty( const char *psz_var, static bool IsMenuEmpty( const char *psz_var, vlc_object_t *p_object )
vlc_object_t *p_object,
bool b_root = true )
{ {
/* Check if we want to display the variable */ /* Check if we want to display the variable */
if( !(var_Type( p_object, psz_var) & VLC_VAR_HASCHOICE) ) if( !(var_Type( p_object, psz_var) & VLC_VAR_HASCHOICE) )
...@@ -1230,7 +1228,7 @@ static bool IsMenuEmpty( const char *psz_var, ...@@ -1230,7 +1228,7 @@ static bool IsMenuEmpty( const char *psz_var,
vlc_value_t val; vlc_value_t val;
var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL ); var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
return val.i_int == 0 || (val.i_int == 1 && b_root); return val.i_int == 0 || val.i_int == 1;
} }
#define TEXT_OR_VAR qfue ( text.psz_string ? text.psz_string : psz_var ) #define TEXT_OR_VAR qfue ( text.psz_string ? text.psz_string : psz_var )
...@@ -1322,14 +1320,14 @@ void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu, ...@@ -1322,14 +1320,14 @@ void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
} }
action->setEnabled( action->setEnabled(
CreateChoicesMenu( submenu, psz_var, p_object, true ) == 0 ); CreateChoicesMenu( submenu, psz_var, p_object ) == 0 );
if( forceDisabled ) if( forceDisabled )
action->setEnabled( false ); action->setEnabled( false );
} }
else else
{ {
action->setEnabled( action->setEnabled(
CreateChoicesMenu( menu, psz_var, p_object, true ) == 0 ); CreateChoicesMenu( menu, psz_var, p_object ) == 0 );
} }
FREENULL( text.psz_string ); FREENULL( text.psz_string );
return; return;
...@@ -1370,7 +1368,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var ) ...@@ -1370,7 +1368,7 @@ static bool CheckTitle( vlc_object_t *p_object, const char *psz_var )
int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var, int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
vlc_object_t *p_object, bool b_root ) vlc_object_t *p_object )
{ {
vlc_value_t val, val_list, text_list; vlc_value_t val, val_list, text_list;
int i_type, i; int i_type, i;
...@@ -1379,7 +1377,7 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var, ...@@ -1379,7 +1377,7 @@ int VLCMenuBar::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
i_type = var_Type( p_object, psz_var ); i_type = var_Type( p_object, psz_var );
/* Make sure we want to display the variable */ /* Make sure we want to display the variable */
if( submenu->isEmpty() && IsMenuEmpty( psz_var, p_object, b_root ) ) if( submenu->isEmpty() && IsMenuEmpty( psz_var, p_object ) )
return VLC_EGENERIC; return VLC_EGENERIC;
switch( i_type & VLC_VAR_TYPE ) switch( i_type & VLC_VAR_TYPE )
......
...@@ -150,7 +150,7 @@ private: ...@@ -150,7 +150,7 @@ private:
vlc_value_t, int, bool c = false ); vlc_value_t, int, bool c = false );
static void UpdateItem( intf_thread_t *, QMenu *, const char *, static void UpdateItem( intf_thread_t *, QMenu *, const char *,
vlc_object_t *, bool ); vlc_object_t *, bool );
static int CreateChoicesMenu( QMenu *,const char *, vlc_object_t *, bool ); static int CreateChoicesMenu( QMenu *,const char *, vlc_object_t * );
static void EnableStaticEntries( QMenu *, bool ); static void EnableStaticEntries( QMenu *, bool );
/* recentMRL menu */ /* recentMRL menu */
......
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