* modules/gui/skins/x11/*: proper initialization of a global var so we can start/exit the skins interface several times.
* x11_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: x11_run.cpp,v 1.23 2003/06/22 12:46:49 asmax Exp $
+ * $Id: x11_run.cpp,v 1.24 2003/07/25 22:50:12 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
Display *display = ((OSTheme *)p_intf->p_sys->p_theme)->GetDisplay();
+ X11TimerManager::Initialize();
// Timer for SkinManage
X11Timer *refreshTimer = new X11Timer( p_intf, 100000, RefreshCallback,
* x11_timer.cpp: helper class to implement timers
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: x11_timer.cpp,v 1.4 2003/06/09 12:33:17 asmax Exp $
+ * $Id: x11_timer.cpp,v 1.5 2003/07/25 22:50:12 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
X11TimerManager *X11TimerManager::_instance = NULL;
-
X11TimerManager::X11TimerManager( intf_thread_t *p_intf )
{
_p_intf = p_intf;
vlc_mutex_destroy( &_lock );
}
+void X11TimerManager::Initialize()
+{
+ _instance = NULL;
+}
// Return the instance of X11TimerManager (design pattern singleton)
X11TimerManager *X11TimerManager::Instance( intf_thread_t *p_intf )
* x11_timer.h: helper class to implement timers
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: x11_timer.h,v 1.5 2003/06/09 12:33:17 asmax Exp $
+ * $Id: x11_timer.h,v 1.6 2003/07/25 22:50:12 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
timer_thread_t *_p_timer;
list<X11Timer*> _timers;
vlc_mutex_t _lock;
-
+
X11TimerManager( intf_thread_t *p_intf );
~X11TimerManager();
void WaitNextTimer();
public:
+ static void Initialize();
static X11TimerManager *Instance( intf_thread_t *p_intf );
void Destroy();
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: dialogs.cpp,v 1.5 2003/07/23 01:13:47 gbazin Exp $
+ * $Id: dialogs.cpp,v 1.6 2003/07/25 22:50:12 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
void DialogsProvider::OnExitThread( wxCommandEvent& WXUNUSED(event) )
{
- delete this;
wxTheApp->ExitMainLoop();
}
* wxwindows.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.26 2003/07/25 13:24:29 gbazin Exp $
+ * $Id: wxwindows.cpp,v 1.27 2003/07/25 22:50:12 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
vlc_object_release( p_intf->p_sys->p_input );
}
- msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
-
if( p_intf->pf_show_dialog )
{
/* We must destroy the dialogs thread */
vlc_thread_join( p_intf );
}
+ msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
+
/* Destroy structure */
free( p_intf->p_sys );
}
#else
wxEntry( i_args, p_args );
#endif
+
+ if( p_intf->pf_show_dialog )
+ {
+ /* We need to manually clean up the dialogs class */
+ if( p_intf->p_sys->p_wxwindow ) delete p_intf->p_sys->p_wxwindow;
+ }
}
/* following functions are local */