Mercurial > mplayer.hg
diff gui/interface.c @ 35789:9fdc3e22063f
Move main window initialization code to uiMainInit().
The code existed twice and could be removed from both
interface.c and actions.c.
author | ib |
---|---|
date | Fri, 25 Jan 2013 15:39:18 +0000 |
parents | e3dcd5854344 |
children | f229582bf4e5 |
line wrap: on
line diff
--- a/gui/interface.c Fri Jan 25 15:12:25 2013 +0000 +++ b/gui/interface.c Fri Jan 25 15:39:18 2013 +0000 @@ -146,13 +146,6 @@ /* initialize windows */ - mainDrawBuffer = malloc(guiApp.main.Bitmap.ImageSize); - - if (!mainDrawBuffer) { - gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); - mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); - } - if (gui_save_pos) { if (gui_main_pos_x != -3) guiApp.main.x = gui_main_pos_x; @@ -173,15 +166,6 @@ if (guiWinID >= 0) guiApp.mainWindow.Parent = guiWinID; -// i=wsHideFrame|wsMaxSize|wsHideWindow; -// if ( guiApp.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow; - i = (guiApp.mainDecoration ? wsShowFrame : 0) | wsMinSize | wsMaxSize | wsHideWindow; - wsWindowCreate(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, i, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, "MPlayer"); - wsWindowShape(&guiApp.mainWindow, guiApp.main.Mask.Image); - wsXDNDMakeAwareness(&guiApp.mainWindow); - - mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)guiApp.mainWindow.WindowID); - uiMainInit(); // main window must be first! uiVideoInit(); // video window must be second! uiPlaybarInit(); @@ -193,8 +177,6 @@ btnModify(evSetBalance, guiInfo.Balance); btnModify(evSetMoviePosition, guiInfo.Position); - wsWindowIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon); - wsWindowVisibility(&guiApp.mainWindow, wsShowWindow); if (gtkShowVideoWindow) {