[MPlayer-cvslog] r35867 - in trunk/gui: dialog/fileselect.c dialog/menu.c dialog/url.c interface.c ui/actions.c ui/actions.h ui/main.c ui/menu.c ui/playbar.c

ib subversion at mplayerhq.hu
Fri Jan 25 11:43:15 CET 2013


Author: ib
Date: Fri Jan 25 11:43:15 2013
New Revision: 35867

Log:
Cosmetic: Rename uiMainEvent() uiEvent().

This completes r35865 and r35866.

Additionally, rename parameter msg ev.

Modified:
   trunk/gui/dialog/fileselect.c
   trunk/gui/dialog/menu.c
   trunk/gui/dialog/url.c
   trunk/gui/interface.c
   trunk/gui/ui/actions.c
   trunk/gui/ui/actions.h
   trunk/gui/ui/main.c
   trunk/gui/ui/menu.c
   trunk/gui/ui/playbar.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/dialog/fileselect.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -542,7 +542,7 @@ static void fs_Ok_released( GtkButton * 
    item=item->next;
   }
  if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() );
- if ( uiLoadPlay ) { uiLoadPlay=False; uiMainEvent( evPlay,0 ); }
+ if ( uiLoadPlay ) { uiLoadPlay=False; uiEvent( evPlay,0 ); }
   else gui( GUI_SET_STATE,(void *) GUI_STOP );
 }
 

Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/dialog/menu.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -91,7 +91,7 @@ static void ActivateMenuItem( int Item )
 // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 );
  gtkPopupMenu=Item & 0x0000ffff;
  gtkPopupMenuParam=Item >> 16;
- uiMainEvent( Item & 0x0000ffff,Item >> 16 );
+ uiEvent( Item & 0x0000ffff,Item >> 16 );
 }
 
 static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number)

Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/dialog/url.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -105,7 +105,7 @@ static void on_Button_pressed( GtkButton
      uiSetFile( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW;
      listMgr(PLAYLIST_DELETE, 0);
      add_to_gui_playlist(str, PLAYLIST_ITEM_APPEND);
-     uiMainEvent( evPlay,0 );
+     uiEvent( evPlay,0 );
     }
   }
  HideURLDialogBox();

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/interface.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -377,23 +377,23 @@ int gui(int what, void *data)
 
         switch ((int)data) {
         case MP_CMD_VO_FULLSCREEN:
-            uiMainEvent(evFullScreen, True);
+            uiEvent(evFullScreen, True);
             break;
 
         case MP_CMD_PLAY_TREE_STEP:
-            uiMainEvent(evNext, 0);
+            uiEvent(evNext, 0);
             break;
 
         case -MP_CMD_PLAY_TREE_STEP:
-            uiMainEvent(evPrev, 0);
+            uiEvent(evPrev, 0);
             break;
 
         case MP_CMD_STOP:
-            uiMainEvent(evStop, 0);
+            uiEvent(evStop, 0);
             break;
 
         case MP_CMD_QUIT:
-            uiMainEvent(evExit, 0);
+            uiEvent(evExit, 0);
             break;
         }
 
@@ -405,7 +405,7 @@ int gui(int what, void *data)
         msg = appFindMessage((const char *)data);
 
         if ((msg == evMenu) || appFindItem(msg))
-            uiMainEvent(msg, 0);
+            uiEvent(msg, 0);
 
         break;
 
@@ -762,7 +762,7 @@ int gui(int what, void *data)
 
     case GUI_REDRAW:
 
-        uiMainEvent(ivRedraw, 0);
+        uiEvent(ivRedraw, 0);
         break;
 
     case GUI_SETUP_VIDEO_WINDOW:
@@ -778,7 +778,7 @@ int gui(int what, void *data)
         }
 
         if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
-            uiMainEvent(evFullScreen, True);
+            uiEvent(evFullScreen, True);
 
         if (guiWinID >= 0)
             wsWindowMove(&guiApp.mainWindow, True, 0, guiInfo.VideoHeight);
@@ -797,7 +797,7 @@ int gui(int what, void *data)
 
         guiInfo.sh_video = NULL;
 
-        uiMainEvent(ivRedraw, True);
+        uiEvent(ivRedraw, True);
 
         if (guiInfo.Playing) {
             if (!guiInfo.PlaylistNext) {
@@ -860,7 +860,7 @@ int gui(int what, void *data)
                     wsWindowVisibility(&guiApp.videoWindow, wsShowWindow);
 
                 if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
-                    uiMainEvent(evFullScreen, False);
+                    uiEvent(evFullScreen, False);
             } else {
                 wsWindowVisibility(&guiApp.videoWindow, wsHideWindow);
                 guiInfo.VideoWindow = False;

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/ui/actions.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -82,12 +82,12 @@ static void MediumPrepare(int type)
     }
 }
 
-void uiMainEvent(int msg, float param)
+void uiEvent(int ev, float param)
 {
     int iparam     = (int)param, osd;
     mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext);
 
-    switch (msg) {
+    switch (ev) {
 /* user events */
     case evExit:
         mplayer(MPLAYER_EXIT_GUI, EXIT_QUIT, 0);
@@ -138,24 +138,24 @@ void uiMainEvent(int msg, float param)
 #ifdef CONFIG_DVDREAD
     case ivSetDVDSubtitle:
         dvdsub_id = iparam;
-        uiMainEvent(ivPlayDVD, 0);
+        uiEvent(ivPlayDVD, 0);
         break;
 
     case ivSetDVDAudio:
         audio_id = iparam;
-        uiMainEvent(ivPlayDVD, 0);
+        uiEvent(ivPlayDVD, 0);
         break;
 
     case ivSetDVDChapter:
         guiInfo.Chapter = iparam;
-        uiMainEvent(ivPlayDVD, 0);
+        uiEvent(ivPlayDVD, 0);
         break;
 
     case ivSetDVDTitle:
         guiInfo.Track   = iparam;
         guiInfo.Chapter = 1;
         guiInfo.Angle   = 1;
-        uiMainEvent(ivPlayDVD, 0);
+        uiEvent(ivPlayDVD, 0);
         break;
 
     case evPlayDVD:
@@ -171,7 +171,7 @@ void uiMainEvent(int msg, float param)
     case evPlaySwitchToPause:
 play:
 
-        if ((msg == evPlaySwitchToPause) && (guiInfo.Playing == GUI_PAUSE))
+        if ((ev == evPlaySwitchToPause) && (guiInfo.Playing == GUI_PAUSE))
             goto NoPause;
 
         MediumPrepare(guiInfo.StreamType);
@@ -346,7 +346,7 @@ NoPause:
         mixer_setbalance(mixer, (guiInfo.Balance - 50.0) / 50.0);     // transform 0..100 to -1..1
         osd       = osd_level;
         osd_level = 0;
-        uiMainEvent(evSetVolume, guiInfo.Volume);
+        uiEvent(evSetVolume, guiInfo.Volume);
         osd_level = osd;
 
         if (osd_level) {
@@ -458,9 +458,9 @@ NoPause:
         }
 
         if (guiInfo.StreamType == STREAMTYPE_VCD)
-            uiMainEvent(evPlayVCD, 0);
+            uiEvent(evPlayVCD, 0);
         else if (guiInfo.StreamType == STREAMTYPE_DVD)
-            uiMainEvent(ivPlayDVD, 0);
+            uiEvent(ivPlayDVD, 0);
         else
             guiInfo.NewPlay = GUI_FILE_NEW;
 
@@ -485,11 +485,11 @@ NoPause:
 
 /* system events */
     case evNone:
-        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiMainEvent: evNone\n");
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiEvent: evNone\n");
         break;
 
     default:
-        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiMainEvent: unknown event %d, param %.2f\n", msg, param);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[actions] uiEvent: unknown event %d, param %.2f\n", ev, param);
         break;
     }
 }
@@ -785,7 +785,7 @@ void uiCurr(void)
     }
 
     if (guiInfo.Playing == GUI_PLAY)
-        uiMainEvent(evPlay, 0);
+        uiEvent(evPlay, 0);
 }
 
 /**
@@ -847,10 +847,10 @@ void uiPrev(void)
     }
 
     if (stop)
-        uiMainEvent(evStop, 0);
+        uiEvent(evStop, 0);
 
     if (guiInfo.Playing == GUI_PLAY)
-        uiMainEvent(evPlay, 0);
+        uiEvent(evPlay, 0);
     else if (!stop && !prev && unset)
         uiUnsetMedia(True);
 }
@@ -907,10 +907,10 @@ void uiNext(void)
     }
 
     if (stop)
-        uiMainEvent(evStop, 0);
+        uiEvent(evStop, 0);
 
     if (guiInfo.Playing == GUI_PLAY)
-        uiMainEvent(evPlay, 0);
+        uiEvent(evPlay, 0);
     else if (!stop && !next && unset)
         uiUnsetMedia(True);
 }

Modified: trunk/gui/ui/actions.h
==============================================================================
--- trunk/gui/ui/actions.h	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/ui/actions.h	Fri Jan 25 11:43:15 2013	(r35867)
@@ -22,7 +22,7 @@
 void uiAbsSeek(float sec);
 void uiChangeSkin(char *name);
 void uiCurr(void);
-void uiMainEvent(int msg, float param);
+void uiEvent(int ev, float param);
 void uiFullScreen(void);
 void uiNext(void);
 void uiPause(void);

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/ui/main.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -149,16 +149,16 @@ void uiMainMouse( int Button,int X,int Y
             case itPotmeter:
             case itHPotmeter:
                  btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f );
-		 uiMainEvent( item->message,item->value );
+		 uiEvent( item->message,item->value );
                  value=item->value;
                  break;
 	    case itVPotmeter:
                  btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f );
-		 uiMainEvent( item->message,item->value );
+		 uiEvent( item->message,item->value );
                  value=item->value;
                  break;
            }
-          uiMainEvent( item->message,value );
+          uiEvent( item->message,value );
           itemtype=0;
           break;
 
@@ -177,7 +177,7 @@ rollerhandled:
              {
               item->value+=value;
               btnModify( item->message,item->value );
-              uiMainEvent( item->message,item->value );
+              uiEvent( item->message,item->value );
              }
            }
           break;
@@ -204,7 +204,7 @@ rollerhandled:
 potihandled:
                  if ( item->value > 100.0f ) item->value=100.0f;
                  if ( item->value < 0.0f ) item->value=0.0f;
-                 uiMainEvent( item->message,item->value );
+                 uiEvent( item->message,item->value );
                  break;
            }
           break;
@@ -248,13 +248,13 @@ void uiMainKey( int KeyCode,int Type,int
       case wsEscape:
     	    if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.videoWindow.isFullScreen )
 	     {
-	      uiMainEvent( evNormalSize,0 );
+	      uiEvent( evNormalSize,0 );
 	      return;
 	     }
       default:          vo_x11_putkey( Key ); return;
      }
    }
- if ( msg != evNone ) uiMainEvent( msg,0 );
+ if ( msg != evNone ) uiEvent( msg,0 );
 }
 
 /* this will be used to handle drag & drop files */
@@ -329,8 +329,8 @@ void uiMainDND(int num,char** files)
 
   if (file) {
     uiSetFile( NULL,file,STREAMTYPE_FILE );
-    if ( guiInfo.Playing == GUI_PLAY ) uiMainEvent( evStop,0 );
-    uiMainEvent( evPlay,0 );
+    if ( guiInfo.Playing == GUI_PLAY ) uiEvent( evStop,0 );
+    uiEvent( evPlay,0 );
   }
   if (subtitles) {
     nfree(guiInfo.SubtitleFilename);

Modified: trunk/gui/ui/menu.c
==============================================================================
--- trunk/gui/ui/menu.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/ui/menu.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -170,6 +170,6 @@ void uiMenuHide( int mx,int my,int w )
         guiApp.menuItems[i].x+guiApp.menuItems[i].width,
         guiApp.menuItems[i].y+guiApp.menuItems[i].height ) )
    {
-    uiMainEvent( guiApp.menuItems[i].message,(float)w );
+    uiEvent( guiApp.menuItems[i].message,(float)w );
    }
 }

Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c	Fri Jan 25 11:28:38 2013	(r35866)
+++ trunk/gui/ui/playbar.c	Fri Jan 25 11:43:15 2013	(r35867)
@@ -177,16 +177,16 @@ static void uiPlaybarMouse( int Button, 
 	  case itPotmeter:
 	  case itHPotmeter:
 	       btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f );
-	       uiMainEvent( item->message,item->value );
+	       uiEvent( item->message,item->value );
 	       value=item->value;
 	       break;
 	  case itVPotmeter:
 	       btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f );
-	       uiMainEvent( item->message,item->value );
+	       uiEvent( item->message,item->value );
 	       value=item->value;
 	       break;
 	 }
-	uiMainEvent( item->message,value );
+	uiEvent( item->message,value );
 
 	itemtype=0;
 	break;
@@ -201,7 +201,7 @@ rollerhandled:
            {
             item->value+=value;
             btnModify( item->message,item->value );
-            uiMainEvent( item->message,item->value );
+            uiEvent( item->message,item->value );
            }
 	 }
 	break;
@@ -224,7 +224,7 @@ rollerhandled:
 potihandled:
 	       if ( item->value > 100.0f ) item->value=100.0f;
 	       if ( item->value < 0.0f ) item->value=0.0f;
-	       uiMainEvent( item->message,item->value );
+	       uiEvent( item->message,item->value );
 	       break;
 	 }
         break;


More information about the MPlayer-cvslog mailing list