[vlc-devel] commit: Qt: don't check if a variable is a command. This will show radio buttons for zzom, crop & aspect-ratio. ( Jean-Philippe Andre )
git version control
git at videolan.org
Sun Aug 24 23:16:30 CEST 2008
vlc | branch: master | Jean-Philippe Andre <jpeg at via.ecp.fr> | Sun Aug 24 16:55:39 2008 -0400| [ec57767b3dacc995a14e3eafe30eec76c5dd811e] | committer: Jean-Philippe Andre
Qt: don't check if a variable is a command. This will show radio buttons for zzom, crop & aspect-ratio.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec57767b3dacc995a14e3eafe30eec76c5dd811e
---
modules/gui/qt4/menus.cpp | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 35ebb97..90dd41f 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1177,7 +1177,6 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
return VLC_EGENERIC;
}
-#define NORMAL_OR_RADIO i_type & VLC_VAR_ISCOMMAND ? ITEM_NORMAL: ITEM_RADIO
#define NOTCOMMAND !( i_type & VLC_VAR_ISCOMMAND )
#define CURVAL val_list.p_list->p_values[i]
#define CURTEXT text_list.p_list->p_values[i].psz_string
@@ -1200,7 +1199,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
var_Get( p_object, psz_var, &val );
another_val.psz_string = strdup( CURVAL.psz_string );
menutext = qfu( CURTEXT ? CURTEXT : another_val.psz_string );
- CreateAndConnect( submenu, psz_var, menutext, "", NORMAL_OR_RADIO,
+ CreateAndConnect( submenu, psz_var, menutext, "", ITEM_RADIO,
p_object->i_object_id, another_val, i_type,
NOTCOMMAND && val.psz_string &&
!strcmp( val.psz_string, CURVAL.psz_string ) );
@@ -1212,7 +1211,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
var_Get( p_object, psz_var, &val );
if( CURTEXT ) menutext = qfu( CURTEXT );
else menutext.sprintf( "%d", CURVAL.i_int );
- CreateAndConnect( submenu, psz_var, menutext, "", NORMAL_OR_RADIO,
+ CreateAndConnect( submenu, psz_var, menutext, "", ITEM_RADIO,
p_object->i_object_id, CURVAL, i_type,
NOTCOMMAND && CURVAL.i_int == val.i_int );
break;
@@ -1221,7 +1220,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
var_Get( p_object, psz_var, &val );
if( CURTEXT ) menutext = qfu( CURTEXT );
else menutext.sprintf( "%.2f", CURVAL.f_float );
- CreateAndConnect( submenu, psz_var, menutext, "", NORMAL_OR_RADIO,
+ CreateAndConnect( submenu, psz_var, menutext, "", ITEM_RADIO,
p_object->i_object_id, CURVAL, i_type,
NOTCOMMAND && CURVAL.f_float == val.f_float );
break;
@@ -1235,7 +1234,6 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
/* clean up everything */
var_Change( p_object, psz_var, VLC_VAR_FREELIST, &val_list, &text_list );
-#undef NORMAL_OR_RADIO
#undef NOTCOMMAND
#undef CURVAL
#undef CURTEXT
More information about the vlc-devel
mailing list