[Mplayer-cvslog] CVS: main/Gui/mplayer mw.h,1.70,1.71 widgets.c,1.32,1.33 widgets.h,1.15,1.16

Zoltan Ponekker pontscho at mplayerhq.hu
Fri Jul 19 22:52:18 CEST 2002


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

Modified Files:
	mw.h widgets.c widgets.h 
Log Message:


- fix audio equalizer
- rewrite video equalizer handling (i teszted with mga g400 [x]mga,xv,xvidix and radeon xv,xvidix )
- fix some small gtk bug
- i dunno, i don't remember ... :)


Index: mw.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- mw.h	12 Jul 2002 00:53:25 -0000	1.70
+++ mw.h	19 Jul 2002 20:51:45 -0000	1.71
@@ -192,7 +192,11 @@
             image=fntRender( item->fontid,0,item->width,"%s",item->label );
             goto drawrenderedtext;
        case itDLabel:
-            image=fntRender( item->fontid,mplTimer%item->width,item->width,"%s",Translate( item->label ) );
+            {
+	     char * t = Translate( item->label );
+	     int    l = fntTextWidth( item->fontid,t );
+             image=fntRender( item->fontid,mplTimer%(l?l:item->width),item->width,"%s",t );
+	    }
 drawrenderedtext:
             if ( image )
              {
@@ -499,6 +503,7 @@
  switch ( Button )
   {
    case wsPMMouseButton:
+	  gtkShow( evHidePopUpMenu,NULL );
           mplShowMenu( RX,RY );
           itemtype=itPRMButton;
           break;
@@ -507,6 +512,7 @@
           break;
 
    case wsPLMouseButton:
+	  gtkShow( evHidePopUpMenu,NULL );
           sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton; // if move the main window
           SelectedItem=currentselected;
           if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window

Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- widgets.c	12 Jul 2002 00:53:25 -0000	1.32
+++ widgets.c	19 Jul 2002 20:51:45 -0000	1.33
@@ -39,6 +39,7 @@
 int gtkPopupMenu = 0;
 int gtkPopupMenuParam = 0;
 int gtkInited = 0;
+int gtkVisible = 0;
 
 #include "gtk/sb.h"
 #include "gtk/pl.h"
@@ -117,7 +118,8 @@
 void gtkEventHandling( void )
 {
  int i;
- for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 );
+ if ( gtkVisible > 0 )
+   for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 );
 }
 
 // --- funcs
@@ -180,7 +182,7 @@
          } 
 	 else 
 	  {
-	   gtk_widget_destroy( SkinBrowser );
+	   gtk_widget_destroy( SkinBrowser ); gtkVisible--;
 	   gtkMessageBox( GTK_MB_ERROR,"Skin dirs not found ... Please install skins." );
 	  }
         break;
@@ -218,15 +220,17 @@
    case evShowPopUpMenu:
         gtkPopupMenu=evNone;
         gtkPopupMenuParam=0;
-        if ( PopUpMenu ) gtk_widget_hide_on_delete( PopUpMenu );
+        if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); gtkVisible--; }
         PopUpMenu=create_PopUpMenu();
         gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 );
+	gtkVisible++;
         break;
    case evHidePopUpMenu:
-        if ( PopUpMenu ) gtk_widget_hide_on_delete( PopUpMenu );
+        if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); gtkVisible--; PopUpMenu=NULL; }
         break;
    case evPlayNetwork:
 	ShowURLDialogBox();
+	gtkSetLayer( URL );
 	break;
   }
 }

Index: widgets.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- widgets.h	5 Jul 2002 23:46:57 -0000	1.15
+++ widgets.h	19 Jul 2002 20:51:45 -0000	1.16
@@ -41,6 +41,8 @@
 extern Pixmap      guiIcon;
 extern Pixmap	   guiIconMask;
 
+extern int gtkVisible;
+
 extern void widgetsCreate( void );
 
 extern void gtkInit( void );




More information about the MPlayer-cvslog mailing list