changeset 35804:25852c740093

Remove code almost identical to uiMenuDone() plus uiMenuInit(). Nothing but uiMenuDone() destroys the menu and nothing but uiMenuInit() builds it. This is analogous to rebuilding the playbar now.
author ib
date Sat, 26 Jan 2013 01:07:36 +0000
parents 8e5a3da0a858
children 5d163370a554
files gui/ui/actions.c
diffstat 1 files changed, 3 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/actions.c	Sat Jan 26 00:53:25 2013 +0000
+++ b/gui/ui/actions.c	Sat Jan 26 01:07:36 2013 +0000
@@ -635,21 +635,10 @@
 
     /* reload menu window */
 
-    if (was_menu && guiApp.menuIsPresent) {
-        free(menuDrawBuffer);
-        menuDrawBuffer = calloc(1, guiApp.menu.Bitmap.ImageSize);
+    if (was_menu)
+        uiMenuDone();
 
-        if (!menuDrawBuffer) {
-            gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
-            mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
-        }
-
-        wsWindowResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
-        wsImageResize(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
-        wsWindowShape(&guiApp.menuWindow, guiApp.menu.Mask.Image);
-        wsWindowVisibility(&guiApp.menuWindow, wsHideWindow);
-    } else
-        uiMenuInit();
+    uiMenuInit();
 
     /* */