Commit 41409dfc authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: Fix (use different id numbers for each menus).
parent 666800bc
......@@ -2,7 +2,7 @@
* menus.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: menus.cpp,v 1.3 2003/05/07 12:23:06 gbazin Exp $
* $Id: menus.cpp,v 1.4 2003/05/07 15:54:49 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -77,7 +77,9 @@ enum
/* menu items */
FirstAutoGenerated_Event = wxID_HIGHEST + 1000,
MenuDummy_Event,
MenuLast_Event,
AudioMenu_Events,
VideoMenu_Events = wxID_HIGHEST + 1100,
PopupMenu_Events = wxID_HIGHEST + 1200,
};
BEGIN_EVENT_TABLE(Menu, wxMenu)
......@@ -161,7 +163,8 @@ void PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface,
/* Build menu */
wxMenu *popupmenu = new Menu( _p_intf, _p_main_interface, i,
ppsz_varnames, pi_objects );
ppsz_varnames, pi_objects,
PopupMenu_Events );
_p_main_interface->p_popup_menu = popupmenu;
_p_main_interface->PopupMenu( popupmenu, pos.x, pos.y );
......@@ -203,7 +206,7 @@ wxMenu *AudioMenu( intf_thread_t *_p_intf, Interface *_p_main_interface )
/* Build menu */
return new Menu( _p_intf, _p_main_interface, i,
ppsz_varnames, pi_objects );
ppsz_varnames, pi_objects, AudioMenu_Events );
}
wxMenu *VideoMenu( intf_thread_t *_p_intf, Interface *_p_main_interface )
......@@ -240,14 +243,15 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, Interface *_p_main_interface )
/* Build menu */
return new Menu( _p_intf, _p_main_interface, i,
ppsz_varnames, pi_objects );
ppsz_varnames, pi_objects, VideoMenu_Events );
}
/*****************************************************************************
* Constructor.
*****************************************************************************/
Menu::Menu( intf_thread_t *_p_intf, Interface *_p_main_interface,
int i_count, char **ppsz_varnames, int *pi_objects ):
int i_count, char **ppsz_varnames, int *pi_objects,
int i_start_id ):
wxMenu( )
{
vlc_object_t *p_object;
......@@ -257,7 +261,7 @@ Menu::Menu( intf_thread_t *_p_intf, Interface *_p_main_interface,
p_intf = _p_intf;
p_main_interface = _p_main_interface;
i_item_id = MenuLast_Event;
i_item_id = i_start_id;
for( i = 0; i < i_count; i++ )
{
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.20 2003/05/07 12:23:06 gbazin Exp $
* $Id: wxwindows.h,v 1.21 2003/05/07 15:54:49 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -473,7 +473,7 @@ class Menu: public wxMenu
public:
/* Constructor */
Menu( intf_thread_t *p_intf, Interface *p_main_interface, int i_count,
char **ppsz_names, int *pi_objects );
char **ppsz_names, int *pi_objects, int i_start_id );
virtual ~Menu();
private:
......
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