* share/skins/default/theme.xml: fixed playlist size
authorCyril Deguet <asmax@videolan.org>
Sun, 8 Jun 2003 15:22:03 +0000 (15:22 +0000)
committerCyril Deguet <asmax@videolan.org>
Sun, 8 Jun 2003 15:22:03 +0000 (15:22 +0000)
* modules/gui/skins/controls/playlist.cpp: fixed a segfault when deleting
  items
* modules/gui/skins/x11/x11_graphics.cpp: implemented DrawRect

modules/gui/skins/controls/playlist.cpp
modules/gui/skins/x11/x11_graphics.cpp
share/skins/default/theme.xml

index 91a1a3c..bf8b5bf 100644 (file)
@@ -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 Teulière <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 )
         {
index 3c6b3eb..5477014 100644 (file)
@@ -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 )
index 1ae5c23..209d94d 100644 (file)
         <ButtonControl x="55"  y="3" up="del1"  down="del2"  onclick="Del" onmouseover="showDel"  onmouseout="hideDel"  tooltiptext="Remove items"/>\r
         <ButtonControl x="81"  y="3" up="prefs1"  down="prefs2"  onclick="show_prefs" onmouseover="showPrefs"  onmouseout="hidePrefs"  tooltiptext="Show preferences"/>\r
       </ControlGroup>\r
-      <PlayListControl id="playlist" width="180" selcolor="#C0D0E0" font="playlist1" playfont="playlist2" abs="9,9" ord="35,115">\r
+      <PlayListControl id="playlist" width="180" selcolor="#C0D0E0" font="playlist1" playfont="playlist2" abs="9,9" ord="35,150">\r
         <SliderControl x="201" up="slider1" down="slider2" abs="0,0" ord="36,149"/>\r
       </PlayListControl>\r
 \r