/*****************************************************************************
* menus.cpp : WinCE gui plugin for VLC
*****************************************************************************
- * Copyright (C) 2000-2004 VideoLAN
+ * Copyright (C) 2000-2004 the VideoLAN team
* $Id$
*
* Authors: Marodon Cedric <cedric_marodon@yahoo.fr>
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc(), free() */
-#include <string.h> /* strerror() */
-#include <stdio.h>
#include <vlc/vlc.h>
-#include <vlc/intf.h>
+#include <vlc_interface.h>
#include "wince.h"
/* Delete old menu */
int count = wce_GetMenuItemCount( hMenu );
for( i = 0; i <= count; i++ ) RemoveMenu( hMenu, 0, MF_BYPOSITION );
-
+
if( p_intf->p_sys->p_navig_menu )
MenuItemExt::ClearList( p_intf->p_sys->p_navig_menu );
else p_intf->p_sys->p_navig_menu = new vector<MenuItemExt*>;
* Refresh the menu.
*****************************************************************************/
void RefreshMenu( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list,
- HMENU hMenu , int i_count, char **ppsz_varnames,
+ HMENU hMenu , int i_count, char **ppsz_varnames,
int *pi_objects, int i_start_id )
{
vlc_object_t *p_object;
p_menu_list->push_back( pMenuItemExt );
CheckMenuItem( hMenu, *pi_item_id ,
( val.b_bool ? MF_UNCHECKED : MF_CHECKED ) |
- MF_BYCOMMAND );
+ MF_BYCOMMAND );
break;
default:
}
HMENU CreateChoicesMenu( intf_thread_t *p_intf,
- vector<MenuItemExt*> *p_menu_list, char *psz_var,
+ vector<MenuItemExt*> *p_menu_list, char *psz_var,
vlc_object_t *p_object, int *pi_item_id )
{
MenuItemExt *pMenuItemExt;
MenuItemExt *p_menuitemext = NULL;
vector<MenuItemExt*>::iterator iter;
+ if( p_intf->p_sys->p_settings_menu )
for( iter = p_intf->p_sys->p_settings_menu->begin();
iter != p_intf->p_sys->p_settings_menu->end(); iter++ )
if( (*iter)->id == id )
p_menuitemext = *iter;
break;
}
+
+ if( p_intf->p_sys->p_audio_menu && !p_menuitemext )
for( iter = p_intf->p_sys->p_audio_menu->begin();
- iter != p_intf->p_sys->p_audio_menu->end(); iter++ )
+ iter != p_intf->p_sys->p_audio_menu->end(); iter++ )
if( (*iter)->id == id )
{
p_menuitemext = *iter;
break;
}
+
+ if( p_intf->p_sys->p_video_menu && !p_menuitemext )
for( iter = p_intf->p_sys->p_video_menu->begin();
iter != p_intf->p_sys->p_video_menu->end(); iter++ )
if( (*iter)->id == id )
p_menuitemext = *iter;
break;
}
+
+ if( p_intf->p_sys->p_navig_menu && !p_menuitemext )
for( iter = p_intf->p_sys->p_navig_menu->begin();
iter != p_intf->p_sys->p_navig_menu->end(); iter++ )
if( (*iter)->id == id )