Mercurial > mplayer.hg
changeset 35001:05d54ab2ba5c
Add check-mark for menu item "Debug Console".
That way it is more apparent whether there is a debug console or not.
Patch by Stephen Sheldon, sfsheldo gmail com.
author | ib |
---|---|
date | Wed, 15 Aug 2012 17:22:01 +0000 |
parents | 1de771df5f2f |
children | 64d72a128ea8 |
files | gui/win32/gui.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/win32/gui.c Wed Aug 15 17:02:23 2012 +0000 +++ b/gui/win32/gui.c Wed Aug 15 17:22:01 2012 +0000 @@ -116,7 +116,7 @@ return "?"; } -static void console_toggle(void) +static void console_toggle(gui_t *gui) { if (console_state) { @@ -157,6 +157,10 @@ 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)); } void capitalize(char *filename) @@ -1020,7 +1024,7 @@ handlemsg(hWnd, evPreferences); break; case ID_CONSOLE: - console_toggle(); + console_toggle(gui); break; case ID_ONLINEHELP: ShellExecute(NULL, "open", ONLINE_HELP_URL, NULL, NULL, SW_SHOWNORMAL); @@ -1599,6 +1603,6 @@ sprintf(temp, "%s/%s", skindir, skinName); if(create_window(gui, temp)) return NULL; if(create_videowindow(gui)) return NULL; - if(console) console_toggle(); + if(console) console_toggle(gui); return gui; }