[MPlayer-cvslog] r35096 - trunk/gui/win32/gui.c

ib subversion at mplayerhq.hu
Wed Aug 15 19:46:38 CEST 2012


Author: ib
Date: Wed Aug 15 19:46:38 2012
New Revision: 35096

Log:
Rewrite condition and use console_state instead of console.

Although - currently - both variables are the same, it's console_state
which reflects the current state of the debug console.

Modified:
   trunk/gui/win32/gui.c

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	Wed Aug 15 19:22:01 2012	(r35095)
+++ trunk/gui/win32/gui.c	Wed Aug 15 19:46:38 2012	(r35096)
@@ -157,10 +157,12 @@ static void console_toggle(gui_t *gui)
         print_version("MPlayer");
         console_state = 1;
     }
-    if (gui == NULL)
-        return;
-    CheckMenuItem(gui->traymenu, ID_CONSOLE, MF_BYCOMMAND | (console ? MF_CHECKED : MF_UNCHECKED));
-    CheckMenuItem(gui->menu, ID_CONSOLE, MF_BYCOMMAND | (console ? MF_CHECKED : MF_UNCHECKED));
+
+    if (gui)
+    {
+        CheckMenuItem(gui->traymenu, ID_CONSOLE, MF_BYCOMMAND | (console_state ? MF_CHECKED : MF_UNCHECKED));
+        CheckMenuItem(gui->menu, ID_CONSOLE, MF_BYCOMMAND | (console_state ? MF_CHECKED : MF_UNCHECKED));
+    }
 }
 
 void capitalize(char *filename)


More information about the MPlayer-cvslog mailing list