summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-24 15:12:16 (UTC)
committer zecke <zecke>2004-09-24 15:12:16 (UTC)
commita214128c01e38ffd50edc4ed5b5c72593796eab2 (patch) (unidiff)
tree7830f6c4052bc091eec065955427006fec3c4d50
parent5ec51a8bb49a0a668bb2d7ab652a1a1e776a0e42 (diff)
downloadopie-a214128c01e38ffd50edc4ed5b5c72593796eab2.zip
opie-a214128c01e38ffd50edc4ed5b5c72593796eab2.tar.gz
opie-a214128c01e38ffd50edc4ed5b5c72593796eab2.tar.bz2
-Save the State on deletion of the MediaPlayerState
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 44bc46b..31773f2 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -42,24 +42,26 @@
42 42
43 43
44MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) 44MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
45 : QObject( parent, name ) { 45 : QObject( parent, name ) {
46 Config cfg( "OpiePlayer" ); 46 Config cfg( "OpiePlayer" );
47 readConfig( cfg ); 47 readConfig( cfg );
48 streaming = false; 48 streaming = false;
49 seekable = true; 49 seekable = true;
50} 50}
51 51
52 52
53MediaPlayerState::~MediaPlayerState() { 53MediaPlayerState::~MediaPlayerState() {
54 Config cfg( "OpiePlayer" );
55 writeConfig( cfg );
54} 56}
55 57
56 58
57void MediaPlayerState::readConfig( Config& cfg ) { 59void MediaPlayerState::readConfig( Config& cfg ) {
58 cfg.setGroup("Options"); 60 cfg.setGroup("Options");
59 fullscreen = cfg.readBoolEntry( "FullScreen" ); 61 fullscreen = cfg.readBoolEntry( "FullScreen" );
60 scaled = cfg.readBoolEntry( "Scaling" ); 62 scaled = cfg.readBoolEntry( "Scaling" );
61 looping = cfg.readBoolEntry( "Looping" ); 63 looping = cfg.readBoolEntry( "Looping" );
62 shuffled = cfg.readBoolEntry( "Shuffle" ); 64 shuffled = cfg.readBoolEntry( "Shuffle" );
63 videoGamma = cfg.readNumEntry( "VideoGamma" ); 65 videoGamma = cfg.readNumEntry( "VideoGamma" );
64 playing = FALSE; 66 playing = FALSE;
65 streaming = FALSE; 67 streaming = FALSE;
@@ -248,12 +250,15 @@ void MediaPlayerState::togglePaused() {
248} 250}
249 251
250void MediaPlayerState::togglePlaying() { 252void MediaPlayerState::togglePlaying() {
251 setPlaying( !playing); 253 setPlaying( !playing);
252} 254}
253 255
254void MediaPlayerState::toggleBlank() { 256void MediaPlayerState::toggleBlank() {
255 setBlanked( !blanked); 257 setBlanked( !blanked);
256} 258}
257 259
258 260
259 261
262
263
264