* modules/gui/wxwindows/*, modules/gui/wxwindows/*: don't forget to delete all our variables callbacks.
* modules/gui/wxwindows/dialogs.cpp: don't delete the dialogs provider twice.
* modules/gui/wxwindows/menus.cpp: small cosmetic changes.
* dialogs.cpp: Handles all the different dialog boxes we provide.
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: dialogs.cpp,v 1.15 2003/10/14 22:41:41 gbazin Exp $
+ * $Id: dialogs.cpp,v 1.16 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
module_Unneed( p_provider, p_module );
vlc_object_destroy( p_provider );
}
+
+ /* Unregister callbacks */
+ playlist_t *p_playlist =
+ (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist != NULL )
+ {
+ var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB,
+ p_intf->p_sys->p_dialogs );
+ vlc_object_release( p_playlist );
+ }
}
void Dialogs::ShowOpen( bool b_play )
* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: skin_main.cpp,v 1.48 2003/10/14 22:41:41 gbazin Exp $
+ * $Id: skin_main.cpp,v 1.49 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
//---------------------------------------------------------------------------
intf_thread_t *g_pIntf;
-//---------------------------------------------------------------------------
-// Exported interface functions.
-//---------------------------------------------------------------------------
-#ifdef WIN32
-extern "C" __declspec( dllexport )
- int __VLC_SYMBOL( vlc_entry ) ( module_t *p_module );
-#endif
-
//---------------------------------------------------------------------------
// Local prototypes.
//---------------------------------------------------------------------------
* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlcproc.cpp,v 1.44 2003/09/05 15:55:30 asmax Exp $
+ * $Id: vlcproc.cpp,v 1.45 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist != NULL )
{
- // We want to be noticed of playlit changes
+ // We want to be notified of playlit changes
var_AddCallback( p_playlist, "intf-change", RefreshCallback, this );
// Raise/lower interface with middle click on vout
if( p_playlist != NULL )
{
var_DelCallback( p_playlist, "intf-change", RefreshCallback, this );
+ var_DelCallback( p_playlist, "intf-show", IntfShowCallback, this );
vlc_object_release( p_playlist );
}
}
* win32_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_run.cpp,v 1.20 2003/06/22 12:46:49 asmax Exp $
+ * $Id: win32_run.cpp,v 1.21 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
// Check if vlc is closing
Proc->IsClosing();
}
+
+ /* Cleanup */
+ delete Proc;
}
//---------------------------------------------------------------------------
bool IsVLCEvent( unsigned int msg )
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: dialogs.cpp,v 1.8 2003/08/28 15:59:03 gbazin Exp $
+ * $Id: dialogs.cpp,v 1.9 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
if( p_file_generic_dialog ) delete p_file_generic_dialog;
if( p_intf->p_sys->p_icon ) delete p_intf->p_sys->p_icon;
+
+ /* We must set this here because on win32 this destructor will be
+ * automatically called so we must not call it again on wxApp->OnExit().
+ * There shouldn't be any race conditions as all this should be done
+ * from the same thread. */
+ p_intf->p_sys->p_wxwindow = NULL;
}
void DialogsProvider::OnIdle( wxIdleEvent& WXUNUSED(event) )
* menus.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: menus.cpp,v 1.21 2003/10/14 22:41:41 gbazin Exp $
+ * $Id: menus.cpp,v 1.22 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
{
/* menu items */
MenuDummy_Event = wxID_HIGHEST + 1000,
- OpenFileSimple_Event,
+ OpenFileSimple_Event = wxID_HIGHEST + 1100,
OpenFile_Event,
OpenDisc_Event,
OpenNet_Event,
int i_start_id ): wxMenu( )
{
vlc_object_t *p_object;
+ vlc_bool_t b_section_empty = VLC_FALSE;
int i;
/* Initializations */
{
if( !ppsz_varnames[i] )
{
+ if( b_section_empty )
+ {
+ Append( MenuDummy_Event + i, wxU(_("Empty")) );
+ Enable( MenuDummy_Event + i, FALSE );
+ }
+
AppendSeparator();
+ b_section_empty = VLC_TRUE;
continue;
}
if( !pi_objects[i] )
{
Append( MenuDummy_Event, wxU(ppsz_varnames[i]) );
+ b_section_empty = VLC_FALSE;
continue;
}
p_object = (vlc_object_t *)vlc_object_get( p_intf, pi_objects[i] );
if( p_object == NULL ) continue;
+ b_section_empty = VLC_FALSE;
CreateMenuItem( this, ppsz_varnames[i], p_object );
vlc_object_release( p_object );
}
/* Special case for empty menus */
- if( GetMenuItemCount() == 0 )
+ if( GetMenuItemCount() == 0 || b_section_empty )
{
- Append( MenuDummy_Event, wxU(_("Empty")) );
- Enable( MenuDummy_Event, FALSE );
+ Append( MenuDummy_Event + i, wxU(_("Empty")) );
+ Enable( MenuDummy_Event + i, FALSE );
}
}
* timer.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: timer.cpp,v 1.33 2003/10/14 22:41:41 gbazin Exp $
+ * $Id: timer.cpp,v 1.34 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
Timer::~Timer()
{
+ /* Unregister callback */
+ playlist_t *p_playlist =
+ (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist != NULL )
+ {
+ var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
+ vlc_object_release( p_playlist );
+ }
}
/*****************************************************************************
* wxwindows.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.34 2003/10/14 22:41:41 gbazin Exp $
+ * $Id: wxwindows.cpp,v 1.35 2003/10/15 12:24:14 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/* Show the interface */
MainInterface->Show( TRUE );
-
SetTopWindow( MainInterface );
+ MainInterface->Raise();
}
/* Creates the dialogs provider */