Commit ffe7cd8e authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/skins/src/*: don't forget to recreate a win32 timer when the skin is changed.

parent edad4b8a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class * vlcproc.cpp: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.51 2003/10/22 19:12:56 ipkiss Exp $ * $Id: vlcproc.cpp,v 1.52 2003/10/23 16:00:48 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -427,6 +427,8 @@ void VlcProc::LoadSkin() ...@@ -427,6 +427,8 @@ void VlcProc::LoadSkin()
// Uninitialize new theme // Uninitialize new theme
free( p_intf->p_sys->p_new_theme_file ); free( p_intf->p_sys->p_new_theme_file );
p_intf->p_sys->p_new_theme_file = NULL; p_intf->p_sys->p_new_theme_file = NULL;
OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (int)true );
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_run.cpp: * win32_run.cpp:
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_run.cpp,v 1.21 2003/10/15 12:24:14 gbazin Exp $ * $Id: win32_run.cpp,v 1.22 2003/10/23 16:00:48 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -48,19 +48,6 @@ ...@@ -48,19 +48,6 @@
// Specific method // Specific method
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool IsVLCEvent( unsigned int msg ); bool IsVLCEvent( unsigned int msg );
int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
// Refresh Timer Callback
//---------------------------------------------------------------------------
void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
{
intf_thread_t *p_intf = (intf_thread_t *)GetWindowLongPtr( hwnd,
GWLP_USERDATA );
SkinManage( p_intf );
}
//---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Win32 interface // Win32 interface
...@@ -73,10 +60,6 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -73,10 +60,6 @@ void OSRun( intf_thread_t *p_intf )
Event *ProcessEvent; Event *ProcessEvent;
int KeyModifier = 0; int KeyModifier = 0;
// Create refresh timer
SetTimer( ((OSTheme *)p_intf->p_sys->p_theme)->GetParentWindow(), 42, 200,
(TIMERPROC)RefreshTimer );
// Compute windows message list // Compute windows message list
while( GetMessage( &msg, NULL, 0, 0 ) ) while( GetMessage( &msg, NULL, 0, 0 ) )
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_theme.cpp: Win32 implementation of the Theme class * win32_theme.cpp: Win32 implementation of the Theme class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_theme.cpp,v 1.10 2003/10/22 19:12:56 ipkiss Exp $ * $Id: win32_theme.cpp,v 1.11 2003/10/23 16:00:48 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -49,9 +49,17 @@ ...@@ -49,9 +49,17 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void SkinManage( intf_thread_t *p_intf ); int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
// Refresh Timer Callback
//---------------------------------------------------------------------------
void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
{
intf_thread_t *p_intf = (intf_thread_t *)GetWindowLongPtr( hwnd,
GWLP_USERDATA );
SkinManage( p_intf );
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Win32 interface // Win32 interface
...@@ -259,6 +267,8 @@ void Win32Theme::OnLoadTheme() ...@@ -259,6 +267,8 @@ void Win32Theme::OnLoadTheme()
// The create menu // The create menu
CreateSystemMenu(); CreateSystemMenu();
// Create refresh timer
SetTimer( ParentWindow, 42, 200, (TIMERPROC)RefreshTimer );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void Win32Theme::AddSystemMenu( string name, Event *event ) void Win32Theme::AddSystemMenu( string name, Event *event )
......
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