CVS: main/Gui app.c,1.22,1.23 app.h,1.17,1.18 cfg.c,1.36,1.37 cfg.h,1.14,1.15 interface.c,1.81,1.82
Update of /cvsroot/mplayer/main/Gui In directory mail:/var/tmp.root/cvs-serv19304/Gui Modified Files: app.c app.h cfg.c cfg.h interface.c Log Message: many 10l for me ... Index: app.c =================================================================== RCS file: /cvsroot/mplayer/main/Gui/app.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- app.c 1 Feb 2003 16:41:39 -0000 1.22 +++ app.c 20 Mar 2003 12:41:32 -0000 1.23 @@ -119,17 +119,20 @@ appClearItem( &item->Items[i] ); for ( i=0;i<item->NumberOfMenuItems;i++ ) appClearItem( &item->MenuItems[i] ); + for ( i=0;i<item->NumberOfBarItems;i++ ) + appClearItem( &item->barItems[i] ); item->NumberOfItems=-1; - memset( item->Items,0,128 * sizeof( wItem ) ); + memset( item->Items,0,256 * sizeof( wItem ) ); item->NumberOfMenuItems=-1; - memset( item->MenuItems,0,32 * sizeof( wItem ) ); + memset( item->MenuItems,0,64 * sizeof( wItem ) ); + item->NumberOfBarItems=-1; + memset( item->barItems,0,256 * sizeof( wItem ) ); appClearItem( &item->main ); item->mainDecoration=0; appClearItem( &item->sub ); - item->sub.Bitmap.Width=384; item->sub.Bitmap.Height=384; - item->sub.width=384; item->sub.height=384; + item->sub.width=0; item->sub.height=0; item->sub.x=-1; item->sub.y=-1; appClearItem( &item->menuBase ); appClearItem( &item->menuSelected ); Index: app.h =================================================================== RCS file: /cvsroot/mplayer/main/Gui/app.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- app.h 17 Jan 2003 22:39:38 -0000 1.17 +++ app.h 20 Mar 2003 12:41:32 -0000 1.18 @@ -164,7 +164,7 @@ wItem MenuItems[64]; // --- int NumberOfBarItems; - wItem barItems[32]; + wItem barItems[256]; } listItems; extern listItems appMPlayer; Index: cfg.c =================================================================== RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- cfg.c 17 Mar 2003 00:48:07 -0000 1.36 +++ cfg.c 20 Mar 2003 12:41:32 -0000 1.37 @@ -60,6 +60,11 @@ int gtkShowVideoWindow = 1; int gtkEnablePlayBar = 1; +int gui_save_pos = 1; +int gui_main_pos_x = -2; +int gui_main_pos_y = -2; +int gui_sub_pos_x = -1; +int gui_sub_pos_y = -1; // --- extern char * get_path( char * filename ); @@ -143,6 +148,12 @@ { "autosync_size",>kAutoSync,CONF_TYPE_INT,CONF_RANGE,0,10000,NULL }, { "gui_skin",&skinName,CONF_TYPE_STRING,0,0,0,NULL }, + + { "gui_save_pos", &gui_save_pos, CONF_TYPE_FLAG,0,0,1,NULL}, + { "gui_main_pos_x", &gui_main_pos_x, CONF_TYPE_INT,0,0,0,NULL}, + { "gui_main_pos_y", &gui_main_pos_y, CONF_TYPE_INT,0,0,0,NULL}, + { "gui_video_out_pos_x", &gui_sub_pos_x, CONF_TYPE_INT,0,0,0,NULL}, + { "gui_video_out_pos_y", &gui_sub_pos_y, CONF_TYPE_INT,0,0,0,NULL}, { "equ_channel_1",>kEquChannel1,CONF_TYPE_STRING,0,0,0,NULL }, { "equ_channel_2",>kEquChannel2,CONF_TYPE_STRING,0,0,0,NULL }, Index: cfg.h =================================================================== RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- cfg.h 1 Feb 2003 16:41:39 -0000 1.14 +++ cfg.h 20 Mar 2003 12:41:32 -0000 1.15 @@ -42,6 +42,12 @@ extern int gtkShowVideoWindow; extern int gtkEnablePlayBar; +extern int gui_save_pos; +extern int gui_main_pos_x; +extern int gui_main_pos_y; +extern int gui_sub_pos_x; +extern int gui_sub_pos_y; + extern int cfg_read( void ); extern int cfg_write( void ); Index: interface.c =================================================================== RCS file: /cvsroot/mplayer/main/Gui/interface.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- interface.c 20 Mar 2003 07:51:03 -0000 1.81 +++ interface.c 20 Mar 2003 12:41:33 -0000 1.82 @@ -204,14 +204,21 @@ exit( 0 ); } + if ( gui_save_pos ) + { + appMPlayer.main.x = gui_main_pos_x; + appMPlayer.main.y = gui_main_pos_y; + appMPlayer.sub.x = gui_sub_pos_x; + appMPlayer.sub.y = gui_sub_pos_y; + } + if (WinID>0) - { + { appMPlayer.subWindow.Parent=WinID; appMPlayer.sub.x=0; appMPlayer.sub.y=0; - } - if (guiWinID>=0) - appMPlayer.mainWindow.Parent=guiWinID; + } + if (guiWinID>=0) appMPlayer.mainWindow.Parent=guiWinID; wsCreateWindow( &appMPlayer.subWindow, appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height, @@ -331,6 +338,13 @@ { mplMainRender=0; mp_msg( MSGT_GPLAYER,MSGL_V,"[gui] done.\n" ); + + if ( gui_save_pos ) + { + gui_main_pos_x=appMPlayer.mainWindow.X; gui_main_pos_y=appMPlayer.mainWindow.Y; + gui_sub_pos_x=appMPlayer.subWindow.X; gui_sub_pos_y=appMPlayer.subWindow.Y; + } + cfg_write(); wsXDone(); }
participants (1)
-
Zoltan Ponekker