Changeset 34eab38e7ed514d2d382592812f802d17e3cbd99
- 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
| r4f551c2 |
r34eab38 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 52 | 52 | #include "gtk_interface.h" |
|---|
| 53 | 53 | #include "gtk_support.h" |
|---|
| | 54 | #include "gtk_playlist.h" |
|---|
| 54 | 55 | #include "intf_gtk.h" |
|---|
| 55 | 56 | |
|---|
| 56 | 57 | #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 | | |
|---|
| 65 | 58 | |
|---|
| 66 | 59 | /***************************************************************************** |
|---|
| … | … | |
| 133 | 126 | p_intf->p_sys->p_fileopen = create_intf_fileopen(); |
|---|
| 134 | 127 | gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ), |
|---|
| 135 | | "p_intf", p_intf ); |
|---|
| | 128 | "p_intf", p_intf ); |
|---|
| 136 | 129 | } |
|---|
| 137 | 130 | |
|---|
| … | … | |
| 253 | 246 | gpointer user_data) |
|---|
| 254 | 247 | { |
|---|
| 255 | | GtkWidget *filesel; |
|---|
| | 248 | GtkCList *playlist_clist; |
|---|
| 256 | 249 | gchar *filename; |
|---|
| 257 | 250 | |
|---|
| 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 */ |
|---|
| 259 | 257 | gtk_widget_hide (filesel); |
|---|
| 260 | 258 | 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 | |
|---|
| 263 | 272 | } |
|---|
| 264 | 273 | |
|---|
| r4f551c2 |
r34eab38 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Pierre Baillet <oct@zoy.org> |
|---|
| … | … | |
| 57 | 57 | #include "gtk_interface.h" |
|---|
| 58 | 58 | #include "gtk_support.h" |
|---|
| | 59 | #include "gtk_playlist.h" |
|---|
| 59 | 60 | #include "intf_gtk.h" |
|---|
| 60 | 61 | |
|---|
| | 62 | |
|---|
| 61 | 63 | #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); |
|---|
| 72 | 64 | |
|---|
| 73 | 65 | void |
|---|
| … | … | |
| 111 | 103 | if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) ) |
|---|
| 112 | 104 | { |
|---|
| 113 | | /* this shoud never happen */ |
|---|
| | 105 | /* this should never happen */ |
|---|
| 114 | 106 | intf_ErrMsgImm("intf_playlist is not a widget !"); |
|---|
| 115 | 107 | |
|---|
| … | … | |
| 274 | 266 | deleteGListItem, |
|---|
| 275 | 267 | p_intf ); |
|---|
| 276 | | |
|---|
| | 268 | /* rebuild the CList */ |
|---|
| 277 | 269 | rebuildCList( clist, playlist_p ); |
|---|
| 278 | 270 | } |
|---|