Changeset 34eab38e7ed514d2d382592812f802d17e3cbd99

Show
Ignore:
Timestamp:
08/04/01 15:09:32 (8 years ago)
Author:
Pierre Baillet <octplane@videolan.org>
git-committer:
Pierre Baillet <octplane@videolan.org> 986735372 +0000
git-parent:

[9dde7278ad08603d2329c5c766984a209979992e]

git-author:
Pierre Baillet <octplane@videolan.org> 986735372 +0000
Message:

Corrected playlist update on file opening.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/gtk/gtk_callbacks.c

    r4f551c2 r34eab38  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000, 2001 VideoLAN 
    5  * $Id: gtk_callbacks.c,v 1.12 2001/03/21 13:42:34 sam Exp $ 
     5 * $Id: gtk_callbacks.c,v 1.13 2001/04/08 13:09:32 octplane Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    5252#include "gtk_interface.h" 
    5353#include "gtk_support.h" 
     54#include "gtk_playlist.h" 
    5455#include "intf_gtk.h" 
    5556 
    5657#include "main.h" 
    57  
    58 /**************************************************************************** 
    59  * External function 
    60  */ 
    61 void on_generic_drop_data_received( intf_thread_t * p_intf, 
    62                         GtkSelectionData *data, guint info, int position); 
    63  
    64  
    6558 
    6659/***************************************************************************** 
     
    133126        p_intf->p_sys->p_fileopen = create_intf_fileopen(); 
    134127        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ), 
    135                              "p_intf", p_intf ); 
     128                             "p_intf", p_intf ); 
    136129    } 
    137130 
     
    253246                                        gpointer         user_data) 
    254247{ 
    255     GtkWidget *filesel
     248    GtkCList *playlist_clist
    256249    gchar *filename; 
    257250 
    258     filesel = gtk_widget_get_toplevel (GTK_WIDGET (button)); 
     251    GtkWidget *filesel = gtk_widget_get_toplevel ( GTK_WIDGET (button) ); 
     252     
     253    /* retrieve the interface */ 
     254    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(filesel), "intf_fileopen" ); 
     255     
     256    /* hide the widget */ 
    259257    gtk_widget_hide (filesel); 
    260258    filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); 
    261  
    262     intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, (char*)filename ); 
     259     
     260    /* catch the GTK CList */ 
     261    playlist_clist = GTK_CLIST(  
     262            lookup_widget(p_intf->p_sys->p_playlist,"playlist_clist")); 
     263     
     264    intf_PlaylistAdd( p_main->p_playlist,  
     265            PLAYLIST_END,  
     266            (char*)filename ); 
     267     
     268    /* update the display */ 
     269    rebuildCList( playlist_clist ,  
     270            p_main->p_playlist ); 
     271    
    263272} 
    264273 
  • plugins/gtk/gtk_playlist.c

    r4f551c2 r34eab38  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: gtk_playlist.c,v 1.8 2001/03/21 13:42:34 sam Exp $ 
     5 * $Id: gtk_playlist.c,v 1.9 2001/04/08 13:09:32 octplane Exp $ 
    66 * 
    77 * Authors: Pierre Baillet <oct@zoy.org> 
     
    5757#include "gtk_interface.h" 
    5858#include "gtk_support.h" 
     59#include "gtk_playlist.h" 
    5960#include "intf_gtk.h" 
    6061 
     62 
    6163#include "main.h" 
    62  
    63 /* Playlist specific functions */ 
    64 void rebuildCList(GtkCList * clist, playlist_t * playlist_p); 
    65 gint compareItems(gconstpointer a, gconstpointer b); 
    66 int hasValidExtension(gchar * filename); 
    67 GList * intf_readFiles(gchar * fsname ); 
    68 int intf_AppendList( playlist_t * p_playlist, int i_pos, GList * list ); 
    69 void GtkPlayListManage( gpointer p_data ); 
    70 void on_generic_drop_data_received( intf_thread_t * p_intf, 
    71                 GtkSelectionData *data, guint info, int position); 
    7264 
    7365void 
     
    111103    if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) ) 
    112104    { 
    113         /* this shoud never happen */ 
     105        /* this should never happen */ 
    114106        intf_ErrMsgImm("intf_playlist is not a widget !"); 
    115107 
     
    274266                        deleteGListItem,  
    275267                        p_intf ); 
    276          
     268        /* rebuild the CList */ 
    277269        rebuildCList( clist, playlist_p ); 
    278270    }