]> git.sesse.net Git - vlc/blobdiff - plugins/gtk/gtk_playlist.c
* ALL: internationalized all configuration strings.
[vlc] / plugins / gtk / gtk_playlist.c
index 36c2d34ead41c231b12204f6d3006fc3f236458a..24aa1aa15b2ba65d391c8a286f8e3c730416f1c8 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_playlist.c : Interface for the playlist dialog
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: gtk_playlist.c,v 1.24 2001/12/30 07:09:55 sam Exp $
+ * $Id: gtk_playlist.c,v 1.30 2002/02/15 20:02:21 gbazin Exp $
  *
  * Authors: Pierre Baillet <oct@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -32,7 +32,8 @@
 
 #include <sys/types.h>          /* for readdir  and stat stuff */
 
-#ifndef WIN32
+#if (!defined( WIN32 ) || defined(__MINGW32__))
+/* Mingw has its own version of dirent */
 #   include <dirent.h>
 #endif
 
@@ -102,14 +103,12 @@ gboolean GtkPlaylistPrev( GtkWidget       *widget,
                           GdkEventButton  *event,
                           gpointer         user_data )
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
-
-    if( p_intf->p_input != NULL )
+    if( p_input_bank->pp_input[0] != NULL )
     {
         /* FIXME: temporary hack */
         intf_PlaylistPrev( p_main->p_playlist );
         intf_PlaylistPrev( p_main->p_playlist );
-        p_intf->p_input->b_eof = 1;
+        p_input_bank->pp_input[0]->b_eof = 1;
     }
 
     return TRUE;
@@ -120,12 +119,10 @@ gboolean GtkPlaylistNext( GtkWidget       *widget,
                           GdkEventButton  *event,
                           gpointer         user_data)
 {
-    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), (char*)user_data );
-
-    if( p_intf->p_input != NULL )
+    if( p_input_bank->pp_input[0] != NULL )
     {
         /* FIXME: temporary hack */
-        p_intf->p_input->b_eof = 1;
+        p_input_bank->pp_input[0]->b_eof = 1;
     }
 
     return TRUE;
@@ -281,10 +278,10 @@ gboolean GtkPlaylistEvent( GtkWidget * widget,
                     (event->button).y, &i_row, &i_col ) == 1 )
         {
             /* clicked is in range. */
-            if( p_intf->p_input != NULL )
+            if( p_input_bank->pp_input[0] != NULL )
             {
                 /* FIXME: temporary hack */
-                p_intf->p_input->b_eof = 1;
+                p_input_bank->pp_input[0]->b_eof = 1;
             }
 
             intf_PlaylistJumpto( p_main->p_playlist, i_row - 1 );
@@ -431,12 +428,12 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
         {
             char i_save;
 
-           i_save = p_temp[0];
-           p_temp[0] = '\0';
-           p_protocol = strdup( p_string );
-           p_temp[0] = i_save;
-           p_temp++;
-           
+            i_save = p_temp[0];
+            p_temp[0] = '\0';
+            p_protocol = strdup( p_string );
+            p_temp[0] = i_save;
+            p_temp++;
+
             /* Allowed things are proto: or proto:// */
             if( p_temp[0] == '/' && p_temp[1] == '/')
             {
@@ -460,11 +457,11 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
         {
             p_files = g_list_concat( p_files, GtkReadFiles( p_string ) ); 
         }
-       else
-       {
+        else
+        {
             p_files = g_list_concat( p_files,
                       g_list_append( NULL, g_strdup( p_string ) ) );
-       }
+        }
        
         /* free the malloc and go on... */
         free( p_protocol );
@@ -507,7 +504,7 @@ void GtkDeleteGListItem( gpointer data, gpointer param )
     if( p_intf->p_sys->i_playing == i_cur_row )
     {
         /* next ! */
-        p_intf->p_input->b_eof = 1;
+        p_input_bank->pp_input[0]->b_eof = 1;
         /* this has to set the slider to 0 */
         
         /* step minus one */