Changeset 9a825a723d24c0bc378f2bf8f03cf6690af883ec

Show
Ignore:
Timestamp:
22/07/03 17:59:06 (5 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1058889546 +0000
git-parent:

[e6063e73a23728020548569fa48e7b1976bc29a4]

git-author:
Gildas Bazin <gbazin@videolan.org> 1058889546 +0000
Message:

* src/misc/variables.c: fixed small mem leak (courtesy of Andy Lindsay)
* modules/gui/wxwindows/interface.cpp: small improvements to the volume control.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/wxwindows/interface.cpp

    rac35c59 r9a825a7  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000-2001 VideoLAN 
    5  * $Id: interface.cpp,v 1.51 2003/07/20 20:33:17 gbazin Exp $ 
     5 * $Id: interface.cpp,v 1.52 2003/07/22 15:59:06 gbazin Exp $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    114114    /* Mouse events */ 
    115115    EVT_LEFT_DOWN(wxVolCtrl::OnChange) 
     116    EVT_MOTION(wxVolCtrl::OnChange) 
    116117END_EVENT_TABLE() 
    117118 
     
    854855void wxVolCtrl::OnChange( wxMouseEvent& event ) 
    855856{ 
    856     int i_volume = (GetRect().height - event.GetY()) * 200 / GetRect().height; 
     857    if( !event.LeftDown() && !event.LeftIsDown() ) return; 
     858 
     859    int i_volume = (GetClientSize().GetHeight() - event.GetY()) * 200 / 
     860                    GetClientSize().GetHeight(); 
    857861    Change( i_volume ); 
    858862} 
  • src/misc/variables.c

    r92993d5 r9a825a7  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: variables.c,v 1.26 2003/05/25 11:31:54 gbazin Exp $ 
     5 * $Id: variables.c,v 1.27 2003/07/22 15:59:06 gbazin Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    305305        { 
    306306            p_var->pf_free( &p_var->choices.p_values[i] ); 
     307            if( p_var->choices_text.p_values[i].psz_string ) 
     308                free( p_var->choices_text.p_values[i].psz_string ); 
    307309        } 
    308310        free( p_var->choices.p_values ); 
     311        free( p_var->choices_text.p_values ); 
    309312    } 
    310313