Commit a457b188 authored by Gildas Bazin's avatar Gildas Bazin

* ./plugins/text/logger.c: on win32 the logger interface shows up a dos
  command box.
* ./plugins/gtk/gnome.c: fixed uninitialized variable. (from Sam)
* ./plugins/gtk/gtk_playlist.c: simplified GtkRebuildCList(). (from Sam)
parent 3c809e53
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc * gnome.c : Gnome plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -171,6 +171,8 @@ static int intf_Open( intf_thread_t *p_intf ) ...@@ -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->pf_callback[0] = NULL;
p_intf->p_sys->i_part = 0;
return( 0 ); return( 0 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog * gtk_playlist.c : Interface for the playlist dialog
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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> * Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -689,29 +689,15 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist ) ...@@ -689,29 +689,15 @@ void GtkRebuildCList( GtkCList * p_clist, playlist_t * p_playlist )
gtk_clist_freeze( p_clist ); gtk_clist_freeze( p_clist );
gtk_clist_clear( 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] = p_playlist->p_item[i_dummy].psz_name;
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[1] = "no info"; ppsz_text[1] = "no info";
gtk_clist_insert( p_clist, 0, ppsz_text ); 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_set_background( p_clist, p_playlist->i_index, &red);
gtk_clist_thaw( p_clist ); gtk_clist_thaw( p_clist );
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* logger.c : file logging plugin for vlc * logger.c : file logging plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -94,6 +94,15 @@ static int intf_Open( intf_thread_t *p_intf ) ...@@ -94,6 +94,15 @@ static int intf_Open( intf_thread_t *p_intf )
{ {
char *psz_filename_tmp, *psz_filename; 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 */ /* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL ) if( p_intf->p_sys == NULL )
......
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