]> source.dussan.org Git - tigervnc.git/commitdiff
Removed checks "play/pause" and "stop" menu items.
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Wed, 13 Apr 2005 13:05:53 +0000 (13:05 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Wed, 13 Apr 2005 13:05:53 +0000 (13:05 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@288 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfbplayer/rfbplayer.cxx

index 87f48864b7a8f60abab614e7fedb4397d680cfc8..061c7177ac20e0afc9e4677532c1ff59531eb8b5 100644 (file)
@@ -359,9 +359,7 @@ RfbPlayer::processMainMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
       setPaused(true);
       break;
     case ID_STOP:
-      if (getTimeOffset() != 0) {
-        stopPlayback();
-      }
+      stopPlayback();
       break;
     case ID_PLAYPAUSE:
       if (rfbReader) {
@@ -1153,16 +1151,14 @@ void RfbPlayer::setPaused(bool paused) {
     tb.checkButton(ID_PAUSE, true);
     tb.checkButton(ID_PLAY, false);
     tb.checkButton(ID_STOP, false);
-    CheckMenuItem(hMenu, ID_PLAYPAUSE, MF_CHECKED);
-    CheckMenuItem(hMenu, ID_STOP, MF_UNCHECKED);
   } else {
     if (is) is->resumePlayback();
     tb.checkButton(ID_PLAY, true);
     tb.checkButton(ID_STOP, false);
     tb.checkButton(ID_PAUSE, false);
-    CheckMenuItem(hMenu, ID_PLAYPAUSE, MF_CHECKED);
-    CheckMenuItem(hMenu, ID_STOP, MF_UNCHECKED);
   }
+  tb.enableButton(ID_PAUSE, true);
+  EnableMenuItem(hMenu, ID_STOP, MF_ENABLED | MF_BYCOMMAND);
 }
 
 void RfbPlayer::stopPlayback() {
@@ -1175,8 +1171,8 @@ void RfbPlayer::stopPlayback() {
   tb.checkButton(ID_STOP, true);
   tb.checkButton(ID_PLAY, false);
   tb.checkButton(ID_PAUSE, false);
-  CheckMenuItem(hMenu, ID_STOP, MF_CHECKED);
-  CheckMenuItem(hMenu, ID_PLAYPAUSE, MF_UNCHECKED);
+  tb.enableButton(ID_PAUSE, false);
+  EnableMenuItem(hMenu, ID_STOP, MF_GRAYED | MF_BYCOMMAND);
   SendMessage(posTrackBar, TBM_SETPOS, TRUE, 0);
 }