# HG changeset patch # User ib # Date 1315301344 0 # Node ID 81aaa14203373686e913d8418c51bc3c93db5df9 # Parent 0e369065b58536cfa3361b15d0045a9a37ca93f9 Replace some btnModify() calls by btnSet(). Prefer btnSet() to btnModify() if the "pressed" state is to be set. Additionally, put parentheses around ternary operator. diff -r 0e369065b585 -r 81aaa1420337 gui/interface.c --- a/gui/interface.c Tue Sep 06 08:59:44 2011 +0000 +++ b/gui/interface.c Tue Sep 06 09:29:04 2011 +0000 @@ -227,7 +227,7 @@ wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0); if (gtkLoadFullscreen) - btnModify(evFullScreen, btnPressed); + btnSet(evFullScreen, btnPressed); guiInfo.Playing = GUI_STOP; @@ -697,7 +697,7 @@ // ...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 @@ } 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); diff -r 0e369065b585 -r 81aaa1420337 gui/ui/actions.c --- a/gui/ui/actions.c Tue Sep 06 08:59:44 2011 +0000 +++ b/gui/ui/actions.c Tue Sep 06 09:29:04 2011 +0000 @@ -96,11 +96,11 @@ 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 @@ 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);