[totem] main: Add clear playlist method



commit ef5c8a268d315f0d74cb4fbfe68bb66856ce3013
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jul 9 11:11:03 2013 +0200

    main: Add clear playlist method

 src/totem-object.c |   12 ++++++++++++
 src/totem.h        |    3 ++-
 2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 1364dcf..a490431 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -706,6 +706,18 @@ totem_object_add_to_playlist_and_play (TotemObject *totem,
 }
 
 /**
+ * totem_object_clear_playlist:
+ * @totem: a #TotemObject
+ *
+ * Empties the current playlist.
+ **/
+void
+totem_object_clear_playlist (TotemObject *totem)
+{
+       totem_playlist_clear (totem->playlist);
+}
+
+/**
  * totem_object_get_current_mrl:
  * @totem: a #TotemObject
  *
diff --git a/src/totem.h b/src/totem.h
index a30a9f7..6979b3d 100644
--- a/src/totem.h
+++ b/src/totem.h
@@ -205,7 +205,8 @@ guint       totem_object_get_playlist_length        (TotemObject *totem);
 int    totem_object_get_playlist_pos           (TotemObject *totem);
 char * totem_object_get_title_at_playlist_pos  (TotemObject *totem,
                                                 guint playlist_index);
-void totem_object_add_to_playlist_and_play     (TotemObject *totem,
+void   totem_object_clear_playlist             (TotemObject *totem);
+void   totem_object_add_to_playlist_and_play   (TotemObject *totem,
                                                 const char *uri,
                                                 const char *display_name);
 char *  totem_object_get_current_mrl           (TotemObject *totem);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]