Commit 3a8f5790 authored by gbazin's avatar gbazin
Browse files

* mozilla/vlcshell.cpp: added fullscreen=yes/no option

* modules/gui/wxwindows/*: fixed auto-generated menus on win32.
parent fb7ad320
......@@ -744,9 +744,11 @@ void Interface::UpdateAcceleratorTable()
void Interface::OnMenuOpen(wxMenuEvent& event)
{
#if !defined( __WXMSW__ )
if( event.GetEventObject() == p_settings_menu )
#if defined( __WXMSW__ )
# define GetEventObject GetMenu
#endif
if( event.GetEventObject() == p_settings_menu )
{
p_settings_menu = SettingsMenu( p_intf, this, p_settings_menu );
......@@ -759,26 +761,24 @@ void Interface::OnMenuOpen(wxMenuEvent& event)
wxU(_(HELP_PREFS)) );
}
#if !defined( __WXMSW__ )
else if( event.GetEventObject() == p_audio_menu )
#endif
{
p_audio_menu = AudioMenu( p_intf, this, p_audio_menu );
}
#if !defined( __WXMSW__ )
else if( event.GetEventObject() == p_video_menu )
#endif
{
p_video_menu = VideoMenu( p_intf, this, p_video_menu );
}
#if !defined( __WXMSW__ )
else if( event.GetEventObject() == p_navig_menu )
#endif
{
p_navig_menu = NavigMenu( p_intf, this, p_navig_menu );
}
#if defined( __WXMSW__ )
# undef GetEventObject
#endif
}
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
......
......@@ -58,7 +58,7 @@ class Menu: public wxMenu
{
public:
/* Constructor */
Menu( intf_thread_t *p_intf, wxWindow *p_parent, int i_start_id );
Menu( intf_thread_t *p_intf, int i_start_id );
virtual ~Menu();
void Populate( int i_count, char **ppsz_names, int *pi_objects );
......@@ -242,7 +242,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
}
/* Build menu */
Menu popupmenu( p_intf, p_parent, PopupMenu_Events );
Menu popupmenu( p_intf, PopupMenu_Events );
popupmenu.Populate( i, ppsz_varnames, pi_objects );
#if 1
......@@ -294,7 +294,7 @@ wxMenu *AudioMenu( intf_thread_t *_p_intf, wxWindow *p_parent, wxMenu *p_menu )
/* Build menu */
Menu *p_vlc_menu = (Menu *)p_menu;
if( !p_vlc_menu )
p_vlc_menu = new Menu( _p_intf, p_parent, AudioMenu_Events );
p_vlc_menu = new Menu( _p_intf, AudioMenu_Events );
else
p_vlc_menu->Clear();
......@@ -365,7 +365,7 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent, wxMenu *p_menu )
/* Build menu */
Menu *p_vlc_menu = (Menu *)p_menu;
if( !p_vlc_menu )
p_vlc_menu = new Menu( _p_intf, p_parent, VideoMenu_Events );
p_vlc_menu = new Menu( _p_intf, VideoMenu_Events );
else
p_vlc_menu->Clear();
......@@ -418,7 +418,7 @@ wxMenu *NavigMenu( intf_thread_t *_p_intf, wxWindow *p_parent, wxMenu *p_menu )
/* Build menu */
Menu *p_vlc_menu = (Menu *)p_menu;
if( !p_vlc_menu )
p_vlc_menu = new Menu( _p_intf, p_parent, NavigMenu_Events );
p_vlc_menu = new Menu( _p_intf, NavigMenu_Events );
else
p_vlc_menu->Clear();
......@@ -454,7 +454,7 @@ wxMenu *SettingsMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
/* Build menu */
Menu *p_vlc_menu = (Menu *)p_menu;
if( !p_vlc_menu )
p_vlc_menu = new Menu( _p_intf, p_parent, SettingsMenu_Events );
p_vlc_menu = new Menu( _p_intf, SettingsMenu_Events );
else
p_vlc_menu->Clear();
......@@ -466,8 +466,7 @@ wxMenu *SettingsMenu( intf_thread_t *_p_intf, wxWindow *p_parent,
/*****************************************************************************
* Constructor.
*****************************************************************************/
Menu::Menu( intf_thread_t *_p_intf, wxWindow *p_parent, int _i_start_id )
: wxMenu( )
Menu::Menu( intf_thread_t *_p_intf, int _i_start_id ) : wxMenu( )
{
/* Initializations */
p_intf = _p_intf;
......@@ -542,7 +541,7 @@ static void RecursiveDestroy( wxMenu *menu )
{
RecursiveDestroy( submenu );
}
menu->Delete( item );
menu->Destroy( item );
}
}
......
......@@ -2,7 +2,7 @@
* vlcshell.cpp: a VLC plugin for Mozilla
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vlcshell.cpp,v 1.29 2004/01/25 17:52:17 gbazin Exp $
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -395,6 +395,14 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
VLC_Set( p_plugin->i_vlc, "conf::loop", value );
}
}
else if( !strcmp( argn[i], "fullscreen" ) )
{
if( !strcmp( argv[i], "yes" ) )
{
value.b_bool = VLC_TRUE;
VLC_Set( p_plugin->i_vlc, "conf::fullscreen", value );
}
}
#endif
}
......
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