[totem] main: Add accessors for the save property



commit c6b588863fb66fc636135c2a5b6e11c608a82d87
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Mar 11 12:59:53 2013 +0100

    main: Add accessors for the save property

 src/totem-playlist.c |   17 +++++++++++++++++
 src/totem-playlist.h |    4 ++++
 2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index 034b30e..96fc75d 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -2915,6 +2915,23 @@ totem_playlist_set_shuffle (TotemPlaylist *playlist, gboolean shuffle)
 }
 
 void
+totem_playlist_set_save (TotemPlaylist *playlist,
+                        gboolean       save)
+{
+       g_return_if_fail (TOTEM_IS_PLAYLIST (playlist));
+
+       g_settings_set_boolean (playlist->priv->settings, "save-playback-state", save);
+}
+
+gboolean
+totem_playlist_get_save (TotemPlaylist *playlist)
+{
+       g_return_val_if_fail (TOTEM_IS_PLAYLIST (playlist), FALSE);
+
+       return playlist->priv->save;
+}
+
+void
 totem_playlist_set_at_start (TotemPlaylist *playlist)
 {
        g_return_if_fail (TOTEM_IS_PLAYLIST (playlist));
diff --git a/src/totem-playlist.h b/src/totem-playlist.h
index 79c18f2..d08be2c 100644
--- a/src/totem-playlist.h
+++ b/src/totem-playlist.h
@@ -153,6 +153,10 @@ gboolean   totem_playlist_get_shuffle (TotemPlaylist *playlist);
 void       totem_playlist_set_shuffle (TotemPlaylist *playlist,
                                       gboolean shuffle);
 
+gboolean   totem_playlist_get_save (TotemPlaylist *playlist);
+void       totem_playlist_set_save (TotemPlaylist *playlist,
+                                   gboolean       save);
+
 gboolean   totem_playlist_set_playing (TotemPlaylist *playlist, TotemPlaylistStatus state);
 TotemPlaylistStatus totem_playlist_get_playing (TotemPlaylist *playlist);
 


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