Commit 690dc59a authored by Cyril Deguet's avatar Cyril Deguet

* share/skins/default/theme.xml: fixed playlist size

* modules/gui/skins/controls/playlist.cpp: fixed a segfault when deleting
  items
* modules/gui/skins/x11/x11_graphics.cpp: implemented DrawRect
parent 28373226
......@@ -2,7 +2,7 @@
* playlist.cpp: Playlist control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: playlist.cpp,v 1.11 2003/05/31 23:23:59 ipkiss Exp $
* $Id: playlist.cpp,v 1.12 2003/06/08 15:22:03 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -215,13 +215,12 @@ bool ControlPlayList::ProcessEvent( Event *evt )
case PLAYLIST_ID_DEL:
if( (GenericControl *)evt->GetParam1() == this )
{
vlc_mutex_lock( &PlayList->object_lock );
for( int i = PlayList->i_size - 1; i >= 0; i-- )
{
if( Select[i] && i != PlayList->i_index )
playlist_Delete( PlayList, i );
}
vlc_mutex_unlock( &PlayList->object_lock );
RefreshList();
RefreshAll();
}
break;
......@@ -236,7 +235,7 @@ void ControlPlayList::RefreshList()
if( NumOfItems != PlayList->i_size )
{
if( NumOfItems > 0 )
delete Select;
delete[] Select;
NumOfItems = PlayList->i_size;
if( PlayList->i_size > 0 )
{
......
......@@ -2,7 +2,7 @@
* x11_graphics.cpp: X11 implementation of the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_graphics.cpp,v 1.6 2003/06/01 22:11:24 asmax Exp $
* $Id: x11_graphics.cpp,v 1.7 2003/06/08 15:22:03 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -74,12 +74,7 @@ X11Graphics::X11Graphics( intf_thread_t *p_intf, int w, int h,
}
// Set the background color to black
XGCValues gcVal;
gcVal.foreground = 0;
XLOCK;
XChangeGC( display, Gc, GCForeground, &gcVal );
XFillRectangle( display, Image, Gc, 0, 0, w, h );
XUNLOCK;
DrawRect( 0, 0, w, h, 0 );
}
//---------------------------------------------------------------------------
X11Graphics::~X11Graphics()
......@@ -100,8 +95,12 @@ void X11Graphics::CopyFrom( int dx, int dy, int dw, int dh, Graphics *Src,
//---------------------------------------------------------------------------
void X11Graphics::DrawRect( int x, int y, int w, int h, int color )
{
/* gdk_rgb_gc_set_foreground( Gc, color );
gdk_draw_rectangle( Image, Gc, TRUE, x, y, w, h);*/
XGCValues gcVal;
gcVal.foreground = color;
XLOCK;
XChangeGC( display, Gc, GCForeground, &gcVal );
XFillRectangle( display, Image, Gc, x, y, w, h );
XUNLOCK;
}
//---------------------------------------------------------------------------
void X11Graphics::SetClipRegion( SkinRegion *rgn )
......
......@@ -146,7 +146,7 @@
<ButtonControl x="55" y="3" up="del1" down="del2" onclick="Del" onmouseover="showDel" onmouseout="hideDel" tooltiptext="Remove items"/>
<ButtonControl x="81" y="3" up="prefs1" down="prefs2" onclick="show_prefs" onmouseover="showPrefs" onmouseout="hidePrefs" tooltiptext="Show preferences"/>
</ControlGroup>
<PlayListControl id="playlist" width="180" selcolor="#C0D0E0" font="playlist1" playfont="playlist2" abs="9,9" ord="35,115">
<PlayListControl id="playlist" width="180" selcolor="#C0D0E0" font="playlist1" playfont="playlist2" abs="9,9" ord="35,150">
<SliderControl x="201" up="slider1" down="slider2" abs="0,0" ord="36,149"/>
</PlayListControl>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment