[vlc-devel] Qt: fix macro RADIO_OR_COMMAND

Adrian Yanes devel at ayanes.com
Thu Feb 23 15:56:42 CET 2012


Qt: additional fix for 3feeb9
Details: audio checkmarks and Add-Interface submenu get fixed  as well
---
 modules/gui/qt4/menus.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 520aafb..46666cd 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1396,7 +1396,7 @@ int VLCMenuBar::CreateChoicesMenu( QMenu
*submenu, const char *psz_var,

 #define CURVAL val_list.p_list->p_values[i]
 #define CURTEXT text_list.p_list->p_values[i].psz_string
-#define RADIO_OR_COMMAND  ( i_type & VLC_VAR_ISCOMMAND ) ? ITEM_RADIO
: ITEM_NORMAL
+#define RADIO_OR_COMMAND  ( i_type & ( VLC_VAR_ISCOMMAND |
VLC_VAR_HASCHOICE ) ) ? ITEM_RADIO : ITEM_NORMAL

     for( i = 0; i < val_list.p_list->i_count; i++ )
     {
-- 
1.7.9

On 23 February 2012 15:52, Adrian Yanes <devel at ayanes.com> wrote:
> Commit d858c4 introduces a new macro that is chosen to evaluate if an
> element in submenus should be an ITEM_NORMAL or ITEM_RADIO
> based on VLC_VAR_ISCOMMAND flag. The conditional results were in
> the wrong order. Close: #6149 #6197
>
> ---
>  modules/gui/qt4/menus.cpp |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
> index f9b97b1..520aafb 100644
> --- a/modules/gui/qt4/menus.cpp
> +++ b/modules/gui/qt4/menus.cpp
> @@ -1396,7 +1396,7 @@ int VLCMenuBar::CreateChoicesMenu( QMenu
> *submenu, const char *psz_var,
>
>  #define CURVAL val_list.p_list->p_values[i]
>  #define CURTEXT text_list.p_list->p_values[i].psz_string
> -#define RADIO_OR_COMMAND  ( i_type & VLC_VAR_ISCOMMAND ) ?
> ITEM_NORMAL : ITEM_RADIO
> +#define RADIO_OR_COMMAND  ( i_type & VLC_VAR_ISCOMMAND ) ? ITEM_RADIO
> : ITEM_NORMAL
>
>     for( i = 0; i < val_list.p_list->i_count; i++ )
>     {
> --
> 1.7.6.3



More information about the vlc-devel mailing list