Commit 1204fed2 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Missed the deadline again ;-(

- Fixed the playlist_AddExt() call
- Fixed a compiler warning
parent 08c1cc54
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc * pda.c : PDA Gtk2 plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.19 2004/01/25 18:53:07 gbazin Exp $ * $Id: pda.c,v 1.20 2004/02/10 20:28:37 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org> * Marc Ariberti <marcari@videolan.org>
...@@ -305,6 +305,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -305,6 +305,8 @@ static void Run( intf_thread_t *p_intf )
gtk_tree_view_set_headers_clickable(p_intf->p_sys->p_tvplaylist, TRUE); gtk_tree_view_set_headers_clickable(p_intf->p_sys->p_tvplaylist, TRUE);
/* END OF PLAYLIST GTK_TREE_VIEW */ /* END OF PLAYLIST GTK_TREE_VIEW */
/* Hide the Preference TAB for now. */
/* Show the control window */ /* Show the control window */
gtk_widget_show( p_intf->p_sys->p_window ); gtk_widget_show( p_intf->p_sys->p_window );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin. * pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: pda_callbacks.c,v 1.26 2004/01/29 17:51:07 zorglub Exp $ * $Id: pda_callbacks.c,v 1.27 2004/02/10 20:28:37 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -91,7 +91,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_ ...@@ -91,7 +91,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
{ {
intf_thread_t *p_intf = GtkGetIntf( widget ); intf_thread_t *p_intf = GtkGetIntf( widget );
playlist_t *p_playlist; playlist_t *p_playlist;
int i , i_id , i_pos; int i_id , i_pos=0;
GtkTreeView *p_tvplaylist = NULL; GtkTreeView *p_tvplaylist = NULL;
p_playlist = (playlist_t *) p_playlist = (playlist_t *)
...@@ -136,7 +136,8 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_ ...@@ -136,7 +136,8 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
i_id = playlist_AddExt( p_playlist, (const char*)name, i_id = playlist_AddExt( p_playlist, (const char*)name,
(const char*)name, (const char*)name,
PLAYLIST_APPEND, PLAYLIST_END, PLAYLIST_APPEND, PLAYLIST_END,
ppsz_options, i_pos ); (mtime_t) 0,
(const char **) ppsz_options, i_pos );
} }
/* Cleanup memory */ /* Cleanup memory */
...@@ -814,6 +815,11 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data) ...@@ -814,6 +815,11 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data)
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
void deleteItemFromPlaylist(gpointer data, gpointer user_data)
{
gtk_tree_path_free((GtkTreePath*) data); // removing an item.
}
void onDeletePlaylist(GtkButton *button, gpointer user_data) void onDeletePlaylist(GtkButton *button, gpointer user_data)
{ {
intf_thread_t *p_intf = GtkGetIntf( button ); intf_thread_t *p_intf = GtkGetIntf( button );
...@@ -861,7 +867,10 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data) ...@@ -861,7 +867,10 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data)
} }
} }
} }
#if 0
g_list_foreach (p_rows, (GFunc*)gtk_tree_path_free, NULL); g_list_foreach (p_rows, (GFunc*)gtk_tree_path_free, NULL);
#endif /* Testing the next line */
g_list_foreach (p_rows, (GFunc*)deleteItemFromPlaylist, NULL);
g_list_free (p_rows); g_list_free (p_rows);
} }
......
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