]> git.sesse.net Git - vlc/commitdiff
Missed the deadline again ;-(
authorJean-Paul Saman <jpsaman@videolan.org>
Tue, 10 Feb 2004 20:28:37 +0000 (20:28 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Tue, 10 Feb 2004 20:28:37 +0000 (20:28 +0000)
- Fixed the playlist_AddExt() call
- Fixed a compiler warning

modules/gui/pda/pda.c
modules/gui/pda/pda_callbacks.c

index 44f4393a4d39bdaaba48de6412016a92e72e08c0..bc50518070db5ed98174269e8a415096fc758626 100644 (file)
@@ -2,7 +2,7 @@
  * pda.c : PDA Gtk2 plugin for vlc
  *****************************************************************************
  * 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>
  *          Marc Ariberti <marcari@videolan.org>
@@ -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);
     /* END OF PLAYLIST GTK_TREE_VIEW */
 
+    /* Hide the Preference TAB for now. */
+
     /* Show the control window */
     gtk_widget_show( p_intf->p_sys->p_window );
 
index 33df88658bff6d670e6f3a864965df9503bdd757..1d6b6b6a53734dbcb07ba21b3101406e7d5e27fe 100644 (file)
@@ -2,7 +2,7 @@
  * pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
  *****************************************************************************
  * 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>
  *
@@ -91,7 +91,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
 {
     intf_thread_t *p_intf = GtkGetIntf( widget );
     playlist_t    *p_playlist;
-    int           i , i_id , i_pos;
+    int           i_id , i_pos=0;
     GtkTreeView   *p_tvplaylist = NULL;
 
     p_playlist = (playlist_t *)
@@ -136,7 +136,8 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
                 i_id = playlist_AddExt( p_playlist, (const char*)name,
                               (const char*)name,
                               PLAYLIST_APPEND, PLAYLIST_END,
-                              ppsz_options, i_pos );
+                              (mtime_t) 0,
+                              (const char **) ppsz_options, i_pos );
             }
 
             /* Cleanup memory */
@@ -814,6 +815,11 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data)
     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)
 {
     intf_thread_t *p_intf = GtkGetIntf( button );
@@ -861,7 +867,10 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data)
                     }
                 }
             }
+#if 0 
             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);
         }