X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=inline;f=modules%2Fgui%2Fwince%2Fmenus.cpp;h=db7306c283be42f6a4801bef0a7fbbafb5df3c59;hb=ed3444539a2fb2c53303f63ddf8974066123e5d9;hp=9aed3fba0edd342af330f06f8bed7775cef5d71e;hpb=3ab81753822bd0a37786e6fd026a349e7a0e0830;p=vlc diff --git a/modules/gui/wince/menus.cpp b/modules/gui/wince/menus.cpp index 9aed3fba0e..db7306c283 100644 --- a/modules/gui/wince/menus.cpp +++ b/modules/gui/wince/menus.cpp @@ -29,7 +29,7 @@ # include "config.h" #endif -#include +#include #include #include "wince.h" @@ -221,15 +221,13 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) } else { - playlist_t * p_playlist = - (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, - FIND_ANYWHERE ); + playlist_t * p_playlist = pl_Yield( p_intf ); if( p_playlist && p_playlist->i_size ) { AppendMenu( hmenu, MF_SEPARATOR, 0, _T("") ); AppendMenu( hmenu, MF_STRING, PlayStream_Event, _T("Play") ); } - if( p_playlist ) vlc_object_release( p_playlist ); + if( p_playlist ) pl_Release( p_playlist ); } AppendMenu( hmenu, MF_POPUP|MF_STRING, (UINT)MiscMenu( p_intf ), @@ -461,7 +459,7 @@ void RefreshMenu( intf_thread_t *p_intf, vector *p_menu_list, int *pi_objects, int i_start_id ) { vlc_object_t *p_object; - vlc_bool_t b_section_empty = VLC_FALSE; + bool b_section_empty = false; int i; /* Initializations */ @@ -478,7 +476,7 @@ void RefreshMenu( intf_thread_t *p_intf, vector *p_menu_list, } AppendMenu( hMenu, MF_SEPARATOR, 0, _T("") ); - b_section_empty = VLC_TRUE; + b_section_empty = true; continue; } @@ -487,14 +485,14 @@ void RefreshMenu( intf_thread_t *p_intf, vector *p_menu_list, AppendMenu( hMenu, MF_GRAYED | MF_STRING, MenuDummy_Event, _FROMMB(ppsz_varnames[i]) ); - b_section_empty = VLC_FALSE; + b_section_empty = false; continue; } p_object = (vlc_object_t *)vlc_object_get( pi_objects[i] ); if( p_object == NULL ) continue; - b_section_empty = VLC_FALSE; + b_section_empty = false; CreateMenuItem( p_intf, p_menu_list, hMenu, ppsz_varnames[i], p_object, &i_item_id ); vlc_object_release( p_object ); @@ -558,7 +556,7 @@ void CreateMenuItem( intf_thread_t *p_intf, vector *p_menu_list, AppendMenu( hMenu, MF_STRING | MF_POPUP, (UINT)hMenuItem, _FROMMB(text.psz_string ? text.psz_string : psz_var) ); if( (i_type & VLC_VAR_TYPE) == VLC_VAR_STRING ) free( val.psz_string ); - if( text.psz_string ) free( text.psz_string ); + free( text.psz_string ); return; } @@ -585,12 +583,12 @@ void CreateMenuItem( intf_thread_t *p_intf, vector *p_menu_list, break; default: - if( text.psz_string ) free( text.psz_string ); + free( text.psz_string ); return; } if( (i_type & VLC_VAR_TYPE) == VLC_VAR_STRING ) free( val.psz_string ); - if( text.psz_string ) free( text.psz_string ); + free( text.psz_string ); } HMENU CreateChoicesMenu( intf_thread_t *p_intf, @@ -802,9 +800,9 @@ MenuItemExt::MenuItemExt( intf_thread_t *p_intf, int _id, char *_psz_var, MenuItemExt::~MenuItemExt() { - if( psz_var ) free( psz_var ); - if( ((i_val_type & VLC_VAR_TYPE) == VLC_VAR_STRING) - && val.psz_string ) free( val.psz_string ); + free( psz_var ); + if( ( i_val_type & VLC_VAR_TYPE ) == VLC_VAR_STRING ) + free( val.psz_string ); }; void MenuItemExt::ClearList( vector *p_menu_list )