* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.51 2003/07/20 20:33:17 gbazin Exp $
+ * $Id: interface.cpp,v 1.52 2003/07/22 15:59:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
BEGIN_EVENT_TABLE(wxVolCtrl, wxWindow)
/* Mouse events */
EVT_LEFT_DOWN(wxVolCtrl::OnChange)
+ EVT_MOTION(wxVolCtrl::OnChange)
END_EVENT_TABLE()
/*****************************************************************************
void wxVolCtrl::OnChange( wxMouseEvent& event )
{
- int i_volume = (GetRect().height - event.GetY()) * 200 / GetRect().height;
+ if( !event.LeftDown() && !event.LeftIsDown() ) return;
+
+ int i_volume = (GetClientSize().GetHeight() - event.GetY()) * 200 /
+ GetClientSize().GetHeight();
Change( i_volume );
}
* variables.c: routines for object variables handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: variables.c,v 1.26 2003/05/25 11:31:54 gbazin Exp $
+ * $Id: variables.c,v 1.27 2003/07/22 15:59:06 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
for( i = 0 ; i < p_var->choices.i_count ; i++ )
{
p_var->pf_free( &p_var->choices.p_values[i] );
+ if( p_var->choices_text.p_values[i].psz_string )
+ free( p_var->choices_text.p_values[i].psz_string );
}
free( p_var->choices.p_values );
+ free( p_var->choices_text.p_values );
}
/* Free callbacks if needed */