Commit d215f2b3 authored by Olivier Teulière's avatar Olivier Teulière

* modules/gui/win32/win32.cpp: fixed a stupid bug (closes #155)

 * modules/gui/win32/menu.cpp: removed some ^M chars
parent c11c3943
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* menu.cpp: functions to handle menu items * menu.cpp: functions to handle menu items
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: menu.cpp,v 1.11 2003/01/27 17:41:01 ipkiss Exp $ * $Id: menu.cpp,v 1.12 2003/02/01 22:21:44 ipkiss Exp $
* *
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr> * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
* *
...@@ -86,39 +86,39 @@ void __fastcall TMenusGen::VoutVarClick( TObject *Sender ) ...@@ -86,39 +86,39 @@ void __fastcall TMenusGen::VoutVarClick( TObject *Sender )
} }
/* /*
* Modules * Modules
*/ */
/* Interface modules: we spawn a new interface */ /* Interface modules: we spawn a new interface */
void __fastcall TMenusGen::InterfaceModuleClick( TObject *Sender ) void __fastcall TMenusGen::InterfaceModuleClick( TObject *Sender )
{ {
TMenuItem * Item = (TMenuItem *)Sender; TMenuItem * Item = (TMenuItem *)Sender;
AnsiString IntfName = CleanCaption( Item->Caption ); AnsiString IntfName = CleanCaption( Item->Caption );
intf_thread_t *p_newintf; intf_thread_t *p_newintf;
char *psz_oldmodule = config_GetPsz( p_intf->p_vlc, "intf" ); char *psz_oldmodule = config_GetPsz( p_intf->p_vlc, "intf" );
config_PutPsz( p_intf->p_vlc, "intf", IntfName.c_str() ); config_PutPsz( p_intf->p_vlc, "intf", IntfName.c_str() );
p_newintf = intf_Create( p_intf->p_vlc ); p_newintf = intf_Create( p_intf->p_vlc );
config_PutPsz( p_intf->p_vlc, "intf", psz_oldmodule ); config_PutPsz( p_intf->p_vlc, "intf", psz_oldmodule );
if( psz_oldmodule ) if( psz_oldmodule )
{ {
free( psz_oldmodule ); free( psz_oldmodule );
} }
if( p_newintf ) if( p_newintf )
{ {
p_newintf->b_block = VLC_FALSE; p_newintf->b_block = VLC_FALSE;
if( intf_RunThread( p_newintf ) ) if( intf_RunThread( p_newintf ) )
{ {
vlc_object_detach( p_newintf ); vlc_object_detach( p_newintf );
intf_Destroy( p_newintf ); intf_Destroy( p_newintf );
} }
} }
} }
/* /*
* Audio * Audio
*/ */
...@@ -502,18 +502,18 @@ int __fastcall TMenusGen::Pos2Data( int title, int chapter ) ...@@ -502,18 +502,18 @@ int __fastcall TMenusGen::Pos2Data( int title, int chapter )
} }
/* This function deletes all the '&' characters in the caption string, /* This function deletes all the '&' characters in the caption string,
* because Borland automatically adds one when (and only when!) you click on * because Borland automatically adds one when (and only when!) you click on
* the menuitem. Grrrrr... */ * the menuitem. Grrrrr... */
AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption ) AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption )
{ {
while( Caption.LastDelimiter( "&" ) != 0 ) while( Caption.LastDelimiter( "&" ) != 0 )
{ {
Caption.Delete( Caption.LastDelimiter( "&" ), 1 ); Caption.Delete( Caption.LastDelimiter( "&" ), 1 );
} }
return Caption; return Caption;
} }
/**************************************************************************** /****************************************************************************
* VarChange: change a variable in a vlc_object_t * VarChange: change a variable in a vlc_object_t
**************************************************************************** ****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32.cpp : Win32 interface plugin for vlc * win32.cpp : Win32 interface plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: win32.cpp,v 1.13 2003/01/26 02:22:59 ipkiss Exp $ * $Id: win32.cpp,v 1.14 2003/02/01 22:21:44 ipkiss Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* *
...@@ -268,7 +268,7 @@ int Win32Manage( intf_thread_t *p_intf ) ...@@ -268,7 +268,7 @@ int Win32Manage( intf_thread_t *p_intf )
if( b_need_menus ) if( b_need_menus )
{ {
//p_intf->p_sys->p_menus->SetupMenus(); p_intf->p_sys->p_menus->SetupMenus();
} }
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
......
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