[Mplayer-cvslog] CVS: main/Gui/mplayer menu.h,1.11,1.12 play.c,1.61,1.62 sw.h,1.30,1.31 widgets.c,1.22,1.23 widgets.h,1.12,1.13

Zoltan Ponekker pontscho at mplayerhq.hu
Mon May 20 15:56:18 CEST 2002


Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mail:/var/tmp.root/cvs-serv8171/Gui/mplayer

Modified Files:
	menu.h play.c sw.h widgets.c widgets.h 
Log Message:
fix some gtk bug...

Index: menu.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/menu.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- menu.h	20 May 2002 13:39:23 -0000	1.11
+++ menu.h	20 May 2002 13:56:15 -0000	1.12
@@ -79,7 +79,7 @@
  mplMenuItem = 0;
 
  wsMoveWindow( &appMPlayer.menuWindow,False,x,y );
- wsMoveTopWindow( &appMPlayer.menuWindow );
+ wsMoveTopWindow( wsDisplay,appMPlayer.menuWindow.WindowID );
  mplMenuRender=1;
  wsVisibleWindow( &appMPlayer.menuWindow,wsShowWindow );
  wsPostRedisplay( &appMPlayer.menuWindow );

Index: play.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- play.c	14 May 2002 11:40:41 -0000	1.61
+++ play.c	20 May 2002 13:56:15 -0000	1.62
@@ -209,7 +209,8 @@
  if ( mplDrawBuffer ) free( mplDrawBuffer );
  if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
   { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
- wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
+
+ if ( wsWMType == wsWMUnknown ) wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
  wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
  wsMoveWindow( &appMPlayer.mainWindow,True,appMPlayer.main.x,appMPlayer.main.y );
  wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );

Index: sw.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/sw.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- sw.h	6 May 2002 15:05:06 -0000	1.30
+++ sw.h	20 May 2002 13:56:15 -0000	1.31
@@ -64,8 +64,8 @@
    case wsRLMouseButton:
           if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) )
            {
-            if( SubVisible++%2 ) wsMoveTopWindow( &appMPlayer.mainWindow );
-             else wsMoveTopWindow( &appMPlayer.subWindow );
+            if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID );
+             else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
 	   }
           msButton=0;
           mplSubMoved=0;

Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- widgets.c	11 May 2002 16:37:58 -0000	1.22
+++ widgets.c	20 May 2002 13:56:15 -0000	1.23
@@ -27,15 +27,10 @@
 #include "../../config.h"
 #include "../../help_mp.h"
 
-GtkWidget     * SkinBrowser;
 GtkWidget     * PlayList;
-GtkWidget     * FileSelect;
-GtkWidget     * AboutBox;
 GtkWidget     * Options;
 GtkWidget     * PopUpMenu = NULL;
 
-GtkWidget     * MessageBox;
-
 GtkWidget     * WarningPixmap;
 GtkWidget     * ErrorPixmap;
 
@@ -58,14 +53,7 @@
  mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init gtk ...\n" );
  gtk_set_locale();
  gtk_init( &argc,&argv );
- gdk_set_use_xshm( FALSE );
- 
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create about box.\n" );              AboutBox=create_About();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create skin browser.\n" );           SkinBrowser=create_SkinBrowser();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create playlist.\n" );               PlayList=create_PlayList();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create file selector.\n" );          FileSelect=create_FileSelect();
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create message box.\n" );            MessageBox=create_MessageBox(0);
-// mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create preferences dialog box.\n" ); Options=create_Options();
+// gdk_set_use_xshm( TRUE );
  
  gtkInited=1;
 }
@@ -106,7 +94,7 @@
 void gtkMessageBox( int type,gchar * str )
 {
  if ( !gtkInited ) return;
- MessageBox=create_MessageBox(0);
+ ShowMessageBox( str );
  gtk_label_set_text( GTK_LABEL( gtkMessageBoxText ),str );
  switch( type)
   {
@@ -135,45 +123,53 @@
  wsSetLayer( gdk_display,win->xwindow,appMPlayer.subWindow.isFullScreen );
 }
 
+void gtkActive( GtkWidget * wdg )
+{
+ GdkWindowPrivate * win = wdg->window;
+ wsMoveTopWindow( gdk_display,win->xwindow );
+}
+
 void gtkShow( int type,char * param )
 {
  switch( type )
   {
    case evSkinBrowser:
-	SkinBrowser=create_SkinBrowser();
+//	SkinBrowser=create_SkinBrowser();
+	ShowSkinBrowser();
 //        gtkClearList( SkinList );
         if ( gtkFillSkinList( sbMPlayerPrefixDir ) && gtkFillSkinList( sbMPlayerDirInHome ) )
          {
           gtkSetDefaultToCList( SkinList,param );
           gtk_widget_show( SkinBrowser );
 	  gtkSetLayer( SkinBrowser );
-         }
+         } else gtk_widget_destroy( SkinBrowser );
         break;
    case evPreferences:
-	Options=create_Options();
-        gtk_widget_show( Options );
-	gtkSetLayer( Options );
+        gtkMessageBox( GTK_MB_WARNING,"Sorry, this feature is under development ..." );
+//	Options=create_Options();
+//        gtk_widget_show( Options );
+//	gtkSetLayer( Options );
         break;
    case evPlayList:
-	PlayList=create_PlayList();
-        gtk_widget_show( PlayList );
-	gtkSetLayer( PlayList );
+        gtkMessageBox( GTK_MB_WARNING,"Sorry, this feature is under development ..." );
+//	PlayList=create_PlayList();
+//        gtk_widget_show( PlayList );
+//	gtkSetLayer( PlayList );
         break;
    case evLoad:
         ShowFileSelect( fsVideoSelector );
-	gtkSetLayer( FileSelect );
+	gtkSetLayer( fsFileSelect );
         break;
    case evFirstLoad:
         ShowFileSelect( fsVideoSelector );
-	gtkSetLayer( FileSelect );
+	gtkSetLayer( fsFileSelect );
         break;
    case evLoadSubtitle:
         ShowFileSelect( fsSubtitleSelector );
-	gtkSetLayer( FileSelect );
+	gtkSetLayer( fsFileSelect );
         break;
    case evAbout:
-	AboutBox=create_About();
-        gtk_widget_show( AboutBox );
+	ShowAboutBox();
 	gtkSetLayer( AboutBox );
         break;
    case evShowPopUpMenu:

Index: widgets.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- widgets.h	23 Feb 2002 15:12:53 -0000	1.12
+++ widgets.h	20 May 2002 13:56:15 -0000	1.13
@@ -19,15 +19,10 @@
 #define GTK_MB_ERROR 4
 #define GTK_MB_WARNING 8
 
-extern GtkWidget     * SkinBrowser;
 extern GtkWidget     * PlayList;
-extern GtkWidget     * FileSelect;
-extern GtkWidget     * AboutBox;
 extern GtkWidget     * Options;
 extern GtkWidget     * PopUpMenu;
 
-extern GtkWidget     * MessageBox;
-
 extern GtkWidget     * WarningPixmap;
 extern GtkWidget     * ErrorPixmap;
 
@@ -54,5 +49,7 @@
 
 extern void gtkShow( int type,char * param );
 extern void gtkMessageBox( int type,gchar * str );
+extern void gtkSetLayer( GtkWidget * wdg );
+extern void gtkActive( GtkWidget * wdg );
 
 #endif




More information about the MPlayer-cvslog mailing list