From ffe7cd8e81d98da8ab7151bde5dde93da5218829 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Thu, 23 Oct 2003 16:00:48 +0000 Subject: [PATCH] * modules/gui/skins/src/*: don't forget to recreate a win32 timer when the skin is changed. --- modules/gui/skins/src/vlcproc.cpp | 4 +++- modules/gui/skins/win32/win32_run.cpp | 19 +------------------ modules/gui/skins/win32/win32_theme.cpp | 16 +++++++++++++--- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/modules/gui/skins/src/vlcproc.cpp b/modules/gui/skins/src/vlcproc.cpp index 1c363d7e3c..c285a6936e 100644 --- a/modules/gui/skins/src/vlcproc.cpp +++ b/modules/gui/skins/src/vlcproc.cpp @@ -2,7 +2,7 @@ * vlcproc.cpp: VlcProc class ***************************************************************************** * 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 Teulière * Emmanuel Puig @@ -427,6 +427,8 @@ void VlcProc::LoadSkin() // Uninitialize new theme free( p_intf->p_sys->p_new_theme_file ); p_intf->p_sys->p_new_theme_file = NULL; + + OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (int)true ); } } //--------------------------------------------------------------------------- diff --git a/modules/gui/skins/win32/win32_run.cpp b/modules/gui/skins/win32/win32_run.cpp index 4c63d601df..397a876b96 100644 --- a/modules/gui/skins/win32/win32_run.cpp +++ b/modules/gui/skins/win32/win32_run.cpp @@ -2,7 +2,7 @@ * win32_run.cpp: ***************************************************************************** * 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 Teulière * Emmanuel Puig @@ -48,19 +48,6 @@ // Specific method //--------------------------------------------------------------------------- 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 @@ -73,10 +60,6 @@ void OSRun( intf_thread_t *p_intf ) Event *ProcessEvent; int KeyModifier = 0; - // Create refresh timer - SetTimer( ((OSTheme *)p_intf->p_sys->p_theme)->GetParentWindow(), 42, 200, - (TIMERPROC)RefreshTimer ); - // Compute windows message list while( GetMessage( &msg, NULL, 0, 0 ) ) { diff --git a/modules/gui/skins/win32/win32_theme.cpp b/modules/gui/skins/win32/win32_theme.cpp index 0fe1ab023a..c005319382 100644 --- a/modules/gui/skins/win32/win32_theme.cpp +++ b/modules/gui/skins/win32/win32_theme.cpp @@ -2,7 +2,7 @@ * win32_theme.cpp: Win32 implementation of the Theme class ***************************************************************************** * 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 Teulière * Emmanuel Puig @@ -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 @@ -259,6 +267,8 @@ void Win32Theme::OnLoadTheme() // The create menu CreateSystemMenu(); + // Create refresh timer + SetTimer( ParentWindow, 42, 200, (TIMERPROC)RefreshTimer ); } //--------------------------------------------------------------------------- void Win32Theme::AddSystemMenu( string name, Event *event ) -- 2.39.5