[MPlayer-cvslog] r34421 - in trunk/gui: app.h interface.c ui/gtk/menu.c ui/main.c ui/playbar.c ui/sub.c ui/widgets.c win32/skinload.h

ib subversion at mplayerhq.hu
Fri Dec 9 14:34:39 CET 2011


Author: ib
Date: Fri Dec  9 14:34:38 2011
New Revision: 34421

Log:
Change prefix for internal events from ev to iv.

This is in order to distinguish them from the external ones.

Modified:
   trunk/gui/app.h
   trunk/gui/interface.c
   trunk/gui/ui/gtk/menu.c
   trunk/gui/ui/main.c
   trunk/gui/ui/playbar.c
   trunk/gui/ui/sub.c
   trunk/gui/ui/widgets.c
   trunk/gui/win32/skinload.h

Modified: trunk/gui/app.h
==============================================================================
--- trunk/gui/app.h	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/app.h	Fri Dec  9 14:34:38 2011	(r34421)
@@ -73,21 +73,19 @@
 
 // Internal events
 
-#define evSetAudio          45
-#define evSetVideo          46
-#define evSetSubtitle       47
-
-// General events
+#define ivSetAudio          45
+#define ivSetVideo          46
+#define ivSetSubtitle       47
 
-#define evShowPopUpMenu   5005
-#define evHidePopUpMenu   5006
-#define evSetDVDAudio     5007
-#define evSetDVDSubtitle  5008
-#define evSetDVDTitle     5009
-#define evSetDVDChapter   5010
-#define evSetVCDTrack     5012
+#define ivShowPopUpMenu   5005
+#define ivHidePopUpMenu   5006
+#define ivSetDVDAudio     5007
+#define ivSetDVDSubtitle  5008
+#define ivSetDVDTitle     5009
+#define ivSetDVDChapter   5010
+#define ivSetVCDTrack     5012
 
-#define evRedraw          7002
+#define ivRedraw          7002
 
 typedef struct {
     int message;

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/interface.c	Fri Dec  9 14:34:38 2011	(r34421)
@@ -723,7 +723,7 @@ int gui(int what, void *data)
         break;
 
     case GUI_REDRAW:
-        uiEventHandling(evRedraw, 0);
+        uiEventHandling(ivRedraw, 0);
         break;
 
     case GUI_SETUP_VIDEO_WINDOW:
@@ -756,7 +756,7 @@ int gui(int what, void *data)
 
     case GUI_END_FILE:
 
-        uiEventHandling(evRedraw, 1);
+        uiEventHandling(ivRedraw, 1);
 
         guiInfo.sh_video = NULL;
 

Modified: trunk/gui/ui/gtk/menu.c
==============================================================================
--- trunk/gui/ui/gtk/menu.c	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/ui/gtk/menu.c	Fri Dec  9 14:34:38 2011	(r34421)
@@ -461,8 +461,8 @@ GtkWidget * create_PopUpMenu( void )
       for ( i=1;i < guiInfo.Tracks;i++ )
        {
         snprintf( tmp,32,MSGTR_MENU_Title,i );
-    //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack );
-        AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( ( i + 1 ) << 16 ) + evSetVCDTrack );
+    //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + ivSetVCDTrack );
+        AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( ( i + 1 ) << 16 ) + ivSetVCDTrack );
        }
      }
      else
@@ -485,7 +485,7 @@ GtkWidget * create_PopUpMenu( void )
          snprintf( tmp,32,MSGTR_MENU_Title,i);
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp,
 			   guiInfo.Track == i,
-			   (i << 16) + evSetDVDTitle );
+			   (i << 16) + ivSetDVDTitle );
         }
       }
       else
@@ -501,7 +501,7 @@ GtkWidget * create_PopUpMenu( void )
         {
          snprintf( tmp,32,MSGTR_MENU_Chapter,i );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.Chapter == i,
-			   ( i << 16 ) + evSetDVDChapter );
+			   ( i << 16 ) + ivSetDVDChapter );
         }
       }
       else
@@ -521,7 +521,7 @@ GtkWidget * create_PopUpMenu( void )
 //	 if ( id == -1 ) id=audio_id; //guiInfo.AudioStream[i].id;
          AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp,
 			   id == guiInfo.AudioStream[i].id,
-			   ( guiInfo.AudioStream[i].id << 16 ) + evSetDVDAudio );
+			   ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio );
         }
       }
       else
@@ -533,13 +533,13 @@ GtkWidget * create_PopUpMenu( void )
      if ( guiInfo.Subtitles )
       {
        char tmp[64]; int i;
-       AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle );
+       AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle );
        for ( i=0;i < guiInfo.Subtitles;i++ )
         {
          av_strlcpy( tmp,GetLanguage( guiInfo.Subtitle[i].language ),sizeof(tmp) );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
 			   dvdsub_id == guiInfo.Subtitle[i].id,
-			   ( guiInfo.Subtitle[i].id << 16 ) + evSetDVDSubtitle );
+			   ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle );
         }
       }
       else
@@ -574,7 +574,7 @@ GtkWidget * create_PopUpMenu( void )
          int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid;
          char tmp[32];
          snprintf( tmp,32,MSGTR_MENU_Track,aid );
-         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + evSetAudio );
+         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + ivSetAudio );
         }
      }
 
@@ -590,7 +590,7 @@ GtkWidget * create_PopUpMenu( void )
          int vid = ((sh_video_t *)demuxer->v_streams[i])->vid;
          char tmp[32];
          snprintf( tmp,32,MSGTR_MENU_Track,vid );
-         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + evSetVideo );
+         AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + ivSetVideo );
         }
      }
    }
@@ -600,12 +600,12 @@ GtkWidget * create_PopUpMenu( void )
    {
     int i;
     SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles );
-    AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + evSetSubtitle );
+    AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + ivSetSubtitle );
     for ( i=0;i < global_sub_size;i++ )
      {
       char tmp[32];
       snprintf( tmp, 32, MSGTR_MENU_Track, i );
-      AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + evSetSubtitle );
+      AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + ivSetSubtitle );
      }
    }
 

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/ui/main.c	Fri Dec  9 14:34:38 2011	(r34421)
@@ -148,22 +148,22 @@ void uiEventHandling( int msg,float para
         gtkShow( evLoadURL,NULL );
 	break;
 
-   case evSetAudio:
+   case ivSetAudio:
         if ( !mpctx_get_demuxer(guiInfo.mpcontext) || audio_id == iparam ) break;
 	audio_id=iparam;
 	goto play;
 
-   case evSetVideo:
+   case ivSetVideo:
         if ( !mpctx_get_demuxer(guiInfo.mpcontext) || video_id == iparam ) break;
 	video_id=iparam;
 	goto play;
 
-   case evSetSubtitle:
+   case ivSetSubtitle:
         mp_property_do("sub",M_PROPERTY_SET,&iparam,guiInfo.mpcontext);
 	break;
 
 #ifdef CONFIG_VCD
-   case evSetVCDTrack:
+   case ivSetVCDTrack:
         guiInfo.Track=iparam;
    case evPlayVCD:
  	guiInfoMediumClear ( CLEAR_ALL );
@@ -230,19 +230,19 @@ play:
         uiPlay();
         break;
 #ifdef CONFIG_DVDREAD
-   case evSetDVDSubtitle:
+   case ivSetDVDSubtitle:
         dvdsub_id=iparam;
         goto play_dvd_2;
         break;
-   case evSetDVDAudio:
+   case ivSetDVDAudio:
         audio_id=iparam;
         goto play_dvd_2;
         break;
-   case evSetDVDChapter:
+   case ivSetDVDChapter:
         guiInfo.Chapter=iparam;
         goto play_dvd_2;
         break;
-   case evSetDVDTitle:
+   case ivSetDVDTitle:
         guiInfo.Track=iparam;
 	guiInfo.Chapter=1;
 	guiInfo.Angle=1;
@@ -394,7 +394,7 @@ set_volume:
 	break;
 
 // --- timer events
-   case evRedraw:
+   case ivRedraw:
         {
           unsigned now = GetTimerMS();
           if ((now > last_redraw_time) &&
@@ -437,7 +437,7 @@ void uiMainMouseHandle( int Button,int X
  switch ( Button )
   {
    case wsPMMouseButton:
-	  gtkShow( evHidePopUpMenu,NULL );
+	  gtkShow( ivHidePopUpMenu,NULL );
           uiShowMenu( RX,RY );
           itemtype=itPRMButton;
           break;
@@ -446,7 +446,7 @@ void uiMainMouseHandle( int Button,int X
           break;
 
    case wsPLMouseButton:
-	  gtkShow( evHidePopUpMenu,NULL );
+	  gtkShow( ivHidePopUpMenu,NULL );
           sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton;
           SelectedItem=currentselected;
           if ( SelectedItem == -1 ) break;
@@ -493,7 +493,7 @@ void uiMainMouseHandle( int Button,int X
           break;
 
    case wsRRMouseButton:
-        gtkShow( evShowPopUpMenu,NULL );
+        gtkShow( ivShowPopUpMenu,NULL );
         break;
 
 // --- rolled mouse ... de szar :)))

Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/ui/playbar.c	Fri Dec  9 14:34:38 2011	(r34421)
@@ -132,18 +132,18 @@ static void uiPlaybarMouseHandle( int Bu
  switch ( Button )
   {
    case wsPMMouseButton:
-        gtkShow( evHidePopUpMenu,NULL );
+        gtkShow( ivHidePopUpMenu,NULL );
         uiShowMenu( RX,RY );
         break;
    case wsRMMouseButton:
         uiHideMenu( RX,RY,0 );
         break;
    case wsRRMouseButton:
-        gtkShow( evShowPopUpMenu,NULL );
+        gtkShow( ivShowPopUpMenu,NULL );
 	break;
 // ---
    case wsPLMouseButton:
-	gtkShow( evHidePopUpMenu,NULL );
+	gtkShow( ivHidePopUpMenu,NULL );
         SelectedItem=currentselected;
         if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window
         item=&guiApp.playbarItems[SelectedItem];

Modified: trunk/gui/ui/sub.c
==============================================================================
--- trunk/gui/ui/sub.c	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/ui/sub.c	Fri Dec  9 14:34:38 2011	(r34421)
@@ -62,10 +62,10 @@ void uiSubMouseHandle( int Button,int X,
  switch( Button )
   {
    case wsRRMouseButton:
-          gtkShow( evShowPopUpMenu,NULL );
+          gtkShow( ivShowPopUpMenu,NULL );
           break;
    case wsPMMouseButton:
-          gtkShow( evHidePopUpMenu,NULL );
+          gtkShow( ivHidePopUpMenu,NULL );
           uiShowMenu( RX,RY );
           msButton=wsPMMouseButton;
           break;
@@ -75,7 +75,7 @@ void uiSubMouseHandle( int Button,int X,
           break;
 // ---
    case wsPLMouseButton:
-          gtkShow( evHidePopUpMenu,NULL );
+          gtkShow( ivHidePopUpMenu,NULL );
           sx=X; sy=Y;
           msButton=wsPLMouseButton;
           mplSubMoved=0;

Modified: trunk/gui/ui/widgets.c
==============================================================================
--- trunk/gui/ui/widgets.c	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/ui/widgets.c	Fri Dec  9 14:34:38 2011	(r34421)
@@ -280,7 +280,7 @@ void gtkShow(int type, char *param)
         gtkSetLayer(About);
         break;
 
-    case evShowPopUpMenu:
+    case ivShowPopUpMenu:
         gtkPopupMenu      = evNone;
         gtkPopupMenuParam = 0;
 
@@ -293,7 +293,7 @@ void gtkShow(int type, char *param)
         gtk_menu_popup(GTK_MENU(PopUpMenu), NULL, NULL, NULL, NULL, 0, 0);
         break;
 
-    case evHidePopUpMenu:
+    case ivHidePopUpMenu:
 
         if (PopUpMenu) {
             gtk_widget_hide(PopUpMenu);

Modified: trunk/gui/win32/skinload.h
==============================================================================
--- trunk/gui/win32/skinload.h	Fri Dec  9 14:14:23 2011	(r34420)
+++ trunk/gui/win32/skinload.h	Fri Dec  9 14:34:38 2011	(r34421)
@@ -181,20 +181,18 @@ skin_t *loadskin(char *skindir, int desk
 
 // --- Internal events ---
 
-#define evSetAudio          45
-#define evSetVideo          46
-#define evSetSubtitle       47
-
-// --- General events ---
+#define ivSetAudio          45
+#define ivSetVideo          46
+#define ivSetSubtitle       47
 
-#define evShowPopUpMenu   5005
-#define evHidePopUpMenu   5006
-#define evSetDVDAudio     5007
-#define evSetDVDSubtitle  5008
-#define evSetDVDTitle     5009
-#define evSetDVDChapter   5010
-#define evSetVCDTrack     5012
+#define ivShowPopUpMenu   5005
+#define ivHidePopUpMenu   5006
+#define ivSetDVDAudio     5007
+#define ivSetDVDSubtitle  5008
+#define ivSetDVDTitle     5009
+#define ivSetDVDChapter   5010
+#define ivSetVCDTrack     5012
 
-#define evRedraw          7002
+#define ivRedraw          7002
 
 #endif /* MPLAYER_GUI_SKINLOAD_H */


More information about the MPlayer-cvslog mailing list