Commit d7e22156 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/menus.cpp: moved audio/video track menu to the top.
parent bc3c81e2
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* menus.cpp : wxWindows plugin for vlc * menus.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: menus.cpp,v 1.27 2003/11/29 13:39:43 gbazin Exp $ * $Id: menus.cpp,v 1.28 2003/11/29 16:36:56 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -234,7 +234,7 @@ wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent ) ...@@ -234,7 +234,7 @@ wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent )
{ {
#define MAX_AUDIO_ITEMS 10 #define MAX_AUDIO_ITEMS 10
vlc_object_t *p_object1, *p_object2; vlc_object_t *p_object;
char *ppsz_varnames[MAX_AUDIO_ITEMS]; char *ppsz_varnames[MAX_AUDIO_ITEMS];
int pi_objects[MAX_AUDIO_ITEMS]; int pi_objects[MAX_AUDIO_ITEMS];
int i = 0; int i = 0;
...@@ -242,30 +242,26 @@ wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent ) ...@@ -242,30 +242,26 @@ wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent )
/* Initializations */ /* Initializations */
memset( pi_objects, 0, MAX_AUDIO_ITEMS * sizeof(int) ); memset( pi_objects, 0, MAX_AUDIO_ITEMS * sizeof(int) );
p_object1 = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_AOUT, p_object = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_object1 != NULL ) if( p_object != NULL )
{
ppsz_varnames[i] = "audio-device";
pi_objects[i++] = p_object1->i_object_id;
ppsz_varnames[i] = "audio-channels";
pi_objects[i++] = p_object1->i_object_id;
}
p_object2 = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_object2 != NULL )
{ {
ppsz_varnames[i] = "audio-es"; ppsz_varnames[i] = "audio-es";
pi_objects[i++] = p_object2->i_object_id; pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object2 ); vlc_object_release( p_object );
} }
if( p_object1 != NULL ) p_object = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_AOUT,
FIND_ANYWHERE );
if( p_object != NULL )
{ {
ppsz_varnames[i] = "audio-device";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "audio-channels";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "visual"; ppsz_varnames[i] = "visual";
pi_objects[i++] = p_object1->i_object_id; pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object1 ); vlc_object_release( p_object );
} }
/* Build menu */ /* Build menu */
...@@ -285,6 +281,17 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent ) ...@@ -285,6 +281,17 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent )
/* Initializations */ /* Initializations */
memset( pi_objects, 0, MAX_VIDEO_ITEMS * sizeof(int) ); memset( pi_objects, 0, MAX_VIDEO_ITEMS * sizeof(int) );
p_object = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_object != NULL )
{
ppsz_varnames[i] = "video-es";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "spu-es";
pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object );
}
p_object = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_VOUT, p_object = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_object != NULL ) if( p_object != NULL )
...@@ -319,17 +326,6 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent ) ...@@ -319,17 +326,6 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent )
vlc_object_release( p_object ); vlc_object_release( p_object );
} }
p_object = (vlc_object_t *)vlc_object_find( _p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_object != NULL )
{
ppsz_varnames[i] = "video-es";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "spu-es";
pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object );
}
/* Build menu */ /* Build menu */
return new Menu( _p_intf, p_parent, i, return new Menu( _p_intf, p_parent, i,
ppsz_varnames, pi_objects, VideoMenu_Events ); ppsz_varnames, pi_objects, VideoMenu_Events );
......
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