[MPlayer-cvslog] r34066 - in trunk/gui: interface.c ui/actions.c

ib subversion at mplayerhq.hu
Tue Sep 6 11:29:04 CEST 2011


Author: ib
Date: Tue Sep  6 11:29:04 2011
New Revision: 34066

Log:
Replace some btnModify() calls by btnSet().

Prefer btnSet() to btnModify() if the "pressed" state is to be set.

Additionally, put parentheses around ternary operator.

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/actions.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Sep  6 10:59:44 2011	(r34065)
+++ trunk/gui/interface.c	Tue Sep  6 11:29:04 2011	(r34066)
@@ -227,7 +227,7 @@ void guiInit(void)
         wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
 
     if (gtkLoadFullscreen)
-        btnModify(evFullScreen, btnPressed);
+        btnSet(evFullScreen, btnPressed);
 
     guiInfo.Playing = GUI_STOP;
 
@@ -697,7 +697,7 @@ int gui(int what, void *data)
         // ...without video there will be no call to GUI_SETUP_VIDEO_WINDOW
         if (!guiInfo.VideoWindow) {
             wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
-            btnModify(evFullScreen, gtkLoadFullscreen ? btnPressed : btnReleased);
+            btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased));
         }
 
         // ...option variable fullscreen determines whether MPlayer will handle
@@ -808,7 +808,7 @@ int gui(int what, void *data)
             } else {
                 wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
                 guiInfo.VideoWindow = False;
-                btnModify(evFullScreen, gtkLoadFullscreen ? btnPressed : btnReleased);
+                btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased));
             }
 
             gui(GUI_SET_STATE, (void *)GUI_STOP);

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Tue Sep  6 10:59:44 2011	(r34065)
+++ trunk/gui/ui/actions.c	Tue Sep  6 11:29:04 2011	(r34066)
@@ -96,11 +96,11 @@ void uiPause(void)
 void uiState(void)
 {
     if (guiInfo.Playing == GUI_STOP || guiInfo.Playing == GUI_PAUSE) {
-        btnModify(evPlaySwitchToPause, btnReleased);
-        btnModify(evPauseSwitchToPlay, btnDisabled);
+        btnSet(evPlaySwitchToPause, btnReleased);
+        btnSet(evPauseSwitchToPlay, btnDisabled);
     } else {
-        btnModify(evPlaySwitchToPause, btnDisabled);
-        btnModify(evPauseSwitchToPlay, btnReleased);
+        btnSet(evPlaySwitchToPause, btnDisabled);
+        btnSet(evPauseSwitchToPlay, btnReleased);
     }
 }
 
@@ -213,7 +213,7 @@ void uiChangeSkin(char *name)
     btnModify(evSetVolume, guiInfo.Volume);
     btnModify(evSetBalance, guiInfo.Balance);
     btnModify(evSetMoviePosition, guiInfo.Position);
-    btnModify(evFullScreen, guiApp.subWindow.isFullScreen ? btnPressed : btnReleased);
+    btnSet(evFullScreen, (guiApp.subWindow.isFullScreen ? btnPressed : btnReleased));
 
     wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen);
     wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen);


More information about the MPlayer-cvslog mailing list