[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdemultimedia/kscd
From:       Alex Kern <alex.kern () gmx ! de>
Date:       2004-08-03 22:53:39
Message-ID: 20040803225339.C7D4599E8 () office ! kde ! org
[Download RAW message or body]

CVS commit by kernalex: 

correct exit at end of playing, have one more issue with cdchangers. timing?


  M +13 -8     kscd.cpp   1.266
  M +3 -2      kscd.h   1.103


--- kdemultimedia/kscd/kscd.cpp  #1.265:1.266
@@ -461,5 +461,5 @@ void KSCD::setShuffle(int shuffle)
     /* FIXME this helps us to display "Random" in Status line
        should it maybe to be replaced with symbol "RAND" or something others */
-    cdModeChanged();
+    setRandomLabel(wm_cd_status());
 }
 
@@ -1048,13 +1048,19 @@ void KSCD::cdMode()
     } else {
         kdDebug(67000) << "Mode changed from " << prev_cdmode << " to " << cdmode << endl;
+        cdModeChanged(prev_cdmode, cdmode);
         prev_cdmode = cdmode;
-        cdModeChanged();
     }
 } /* cdMode */
 
-void KSCD::cdModeChanged()
+void KSCD::setRandomLabel(int mode)
 {
-    int cdmode = wm_cd_status();
+     if(mode == WM_CDM_PLAYING) {
+            updatePlayPB(true);
+            statuslabel->setText(Prefs::randomPlay()?i18n("Random"):i18n("Playing"));
+     }
+}
 
+void KSCD::cdModeChanged(int previous, int cdmode)
+{
     switch (cdmode)
     {
@@ -1072,6 +1078,5 @@ void KSCD::cdModeChanged()
 
         case WM_CDM_PLAYING:
-            updatePlayPB(true);
-            statuslabel->setText(Prefs::randomPlay()?i18n("Random"):i18n("Playing"));
+            setRandomLabel(cdmode);
             break;
 
@@ -1088,5 +1093,5 @@ void KSCD::cdModeChanged()
             statuslabel->setText(i18n("Stopped"));
 
-            if (Prefs::ejectOnFinish() && !stoppedByUser)
+            if (Prefs::ejectOnFinish() && !stoppedByUser && WM_CDS_DISC_READY(previous))
             {
                 ejectClicked();
@@ -1233,5 +1238,5 @@ void KSCD::CDDialogDone()
 void KSCD::get_cddb_info(bool /*_updateDialog*/)
 {
-    kdDebug(67000) << "calls get_cddb_info" << endl;
+    kdDebug(67000) << "get_cddb_info() called" << endl;
     if (!cd ||
         !cddrive_is_ok ||

--- kdemultimedia/kscd/kscd.h  #1.102:1.103
@@ -176,6 +176,7 @@ public slots:
     void loopOff();
     void loopClicked();
+    void setRandomLabel(int mode);
     void cdMode();
-    void cdModeChanged();
+    void cdModeChanged(int previous, int current);
     void trackSelected(int);
     void showConfig();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic