]> git.sesse.net Git - vlc/commitdiff
* ./plugins/text/logger.c: on win32 the logger interface shows up a dos
authorGildas Bazin <gbazin@videolan.org>
Wed, 22 May 2002 14:20:41 +0000 (14:20 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 22 May 2002 14:20:41 +0000 (14:20 +0000)
  command box.
* ./plugins/gtk/gnome.c: fixed uninitialized variable. (from Sam)
* ./plugins/gtk/gtk_playlist.c: simplified GtkRebuildCList(). (from Sam)

plugins/gtk/gnome.c
plugins/gtk/gtk_playlist.c
plugins/text/logger.c

index 11f3d604362a3d4f6888cafd1ea0e057afaca063..e1c00ac92e1c17a00708f968d36bdc5045d6d79c 100644 (file)
@@ -2,7 +2,7 @@
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.20 2002/05/04 02:05:03 lool Exp $
+ * $Id: gnome.c,v 1.21 2002/05/22 14:20:41 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -171,6 +171,8 @@ static int intf_Open( intf_thread_t *p_intf )
 
     p_intf->p_sys->pf_callback[0] = NULL;
 
+    p_intf->p_sys->i_part = 0;
+
     return( 0 );
 }
 
index 24aa1aa15b2ba65d391c8a286f8e3c730416f1c8..50ac2e5293651036c9cf92c70abd0184aa443c1f 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_playlist.c : Interface for the playlist dialog
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: gtk_playlist.c,v 1.30 2002/02/15 20:02:21 gbazin Exp $
+ * $Id: gtk_playlist.c,v 1.31 2002/05/22 14:20:41 gbazin Exp $
  *
  * Authors: Pierre Baillet <oct@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -689,29 +689,15 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist )
     gtk_clist_freeze( p_clist );
     gtk_clist_clear( p_clist );
    
-    for( i_dummy = 0; i_dummy < p_playlist->i_size ; i_dummy++ )
+    vlc_mutex_lock( &p_playlist->change_lock );
+    for( i_dummy = p_playlist->i_size ; i_dummy-- ; )
     {
-#ifdef WIN32 /* WIN32 HACK */
-        ppsz_text[0] = "";
-#else
-        ppsz_text[0] = rindex( p_playlist->p_item[
-                p_playlist->i_size - 1 - i_dummy].psz_name, '/' );
-        if ( ppsz_text[0] == NULL )
-        {
-            ppsz_text[0] =
-              p_playlist->p_item[ p_playlist->i_size - 1 - i_dummy ].psz_name;
-        }
-        else
-        {
-            /* Skip leading '/' */
-            ppsz_text[0]++;
-        }
-#endif
+        ppsz_text[0] = p_playlist->p_item[i_dummy].psz_name;
         ppsz_text[1] = "no info";
-        
         gtk_clist_insert( p_clist, 0, ppsz_text );
     }
+    vlc_mutex_unlock( &p_playlist->change_lock );
+
     gtk_clist_set_background( p_clist, p_playlist->i_index, &red);
     gtk_clist_thaw( p_clist );
 }
-
index 1dc9a5174471ade99a861b095e17c9259103c917..00dae538fd4908e696a61da05d8a7bd0dce807a1 100644 (file)
@@ -2,7 +2,7 @@
  * logger.c : file logging plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: logger.c,v 1.8 2002/05/01 21:31:53 gbazin Exp $
+ * $Id: logger.c,v 1.9 2002/05/22 14:20:41 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -94,6 +94,15 @@ static int intf_Open( intf_thread_t *p_intf )
 {
     char *psz_filename_tmp, *psz_filename;
 
+#ifdef WIN32
+    AllocConsole();
+    freopen( "CONOUT$", "w", stdout );
+    freopen( "CONOUT$", "w", stderr );
+    freopen( "CONIN$", "r", stdin );
+    intf_Msg( VERSION_MESSAGE );
+    intf_Msg( _("\nUsing the logger interface plugin...") );
+#endif
+
     /* Allocate instance and initialize some members */
     p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
     if( p_intf->p_sys == NULL )