mirror of
https://code.videolan.org/videolan/vlc
synced 2024-07-29 11:58:24 +02:00
* modules/gui/win32/win32.cpp: fixed a stupid bug (closes #155)
* modules/gui/win32/menu.cpp: removed some ^M chars
This commit is contained in:
parent
c11c394388
commit
d215f2b3cf
@ -2,7 +2,7 @@
|
||||
* menu.cpp: functions to handle menu items
|
||||
*****************************************************************************
|
||||
* 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>
|
||||
*
|
||||
@ -86,39 +86,39 @@ void __fastcall TMenusGen::VoutVarClick( TObject *Sender )
|
||||
}
|
||||
|
||||
/*
|
||||
* Modules
|
||||
*/
|
||||
|
||||
/* Interface modules: we spawn a new interface */
|
||||
void __fastcall TMenusGen::InterfaceModuleClick( TObject *Sender )
|
||||
{
|
||||
TMenuItem * Item = (TMenuItem *)Sender;
|
||||
|
||||
AnsiString IntfName = CleanCaption( Item->Caption );
|
||||
|
||||
intf_thread_t *p_newintf;
|
||||
char *psz_oldmodule = config_GetPsz( p_intf->p_vlc, "intf" );
|
||||
|
||||
config_PutPsz( p_intf->p_vlc, "intf", IntfName.c_str() );
|
||||
p_newintf = intf_Create( p_intf->p_vlc );
|
||||
config_PutPsz( p_intf->p_vlc, "intf", psz_oldmodule );
|
||||
|
||||
if( psz_oldmodule )
|
||||
{
|
||||
free( psz_oldmodule );
|
||||
}
|
||||
|
||||
if( p_newintf )
|
||||
{
|
||||
p_newintf->b_block = VLC_FALSE;
|
||||
if( intf_RunThread( p_newintf ) )
|
||||
{
|
||||
vlc_object_detach( p_newintf );
|
||||
intf_Destroy( p_newintf );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
* Modules
|
||||
*/
|
||||
|
||||
/* Interface modules: we spawn a new interface */
|
||||
void __fastcall TMenusGen::InterfaceModuleClick( TObject *Sender )
|
||||
{
|
||||
TMenuItem * Item = (TMenuItem *)Sender;
|
||||
|
||||
AnsiString IntfName = CleanCaption( Item->Caption );
|
||||
|
||||
intf_thread_t *p_newintf;
|
||||
char *psz_oldmodule = config_GetPsz( p_intf->p_vlc, "intf" );
|
||||
|
||||
config_PutPsz( p_intf->p_vlc, "intf", IntfName.c_str() );
|
||||
p_newintf = intf_Create( p_intf->p_vlc );
|
||||
config_PutPsz( p_intf->p_vlc, "intf", psz_oldmodule );
|
||||
|
||||
if( psz_oldmodule )
|
||||
{
|
||||
free( psz_oldmodule );
|
||||
}
|
||||
|
||||
if( p_newintf )
|
||||
{
|
||||
p_newintf->b_block = VLC_FALSE;
|
||||
if( intf_RunThread( p_newintf ) )
|
||||
{
|
||||
vlc_object_detach( p_newintf );
|
||||
intf_Destroy( p_newintf );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Audio
|
||||
*/
|
||||
@ -502,18 +502,18 @@ int __fastcall TMenusGen::Pos2Data( int title, int chapter )
|
||||
}
|
||||
|
||||
/* This function deletes all the '&' characters in the caption string,
|
||||
* because Borland automatically adds one when (and only when!) you click on
|
||||
* the menuitem. Grrrrr... */
|
||||
AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption )
|
||||
{
|
||||
while( Caption.LastDelimiter( "&" ) != 0 )
|
||||
{
|
||||
Caption.Delete( Caption.LastDelimiter( "&" ), 1 );
|
||||
}
|
||||
|
||||
return Caption;
|
||||
}
|
||||
|
||||
* because Borland automatically adds one when (and only when!) you click on
|
||||
* the menuitem. Grrrrr... */
|
||||
AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption )
|
||||
{
|
||||
while( Caption.LastDelimiter( "&" ) != 0 )
|
||||
{
|
||||
Caption.Delete( Caption.LastDelimiter( "&" ), 1 );
|
||||
}
|
||||
|
||||
return Caption;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* VarChange: change a variable in a vlc_object_t
|
||||
****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* win32.cpp : Win32 interface plugin for vlc
|
||||
*****************************************************************************
|
||||
* 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 Teulière <ipkiss@via.ecp.fr>
|
||||
*
|
||||
@ -268,7 +268,7 @@ int Win32Manage( intf_thread_t *p_intf )
|
||||
|
||||
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 );
|
||||
|
Loading…
Reference in New Issue
Block a user