diff gui/interface.c @ 33731:81f71d910333

Cosmetic: Change prefix for symbolic constants from GMP to GUI. GMP could be confused with the GNU Multiple Precision Arithmetic Library. Additionally, rename NEW_FILE SET_FILE and PREPARATION PREPARE to phrase requests.
author ib
date Tue, 05 Jul 2011 12:05:06 +0000
parents b4c64f168b29
children 90c992ac5011
line wrap: on
line diff
--- a/gui/interface.c	Tue Jul 05 11:34:26 2011 +0000
+++ b/gui/interface.c	Tue Jul 05 12:05:06 2011 +0000
@@ -561,11 +561,11 @@
         mixer = mpctx_get_mixer(guiInfo.mpcontext);
 
     switch (what) {
-    case GMP_SET_CONTEXT:
+    case GUI_SET_CONTEXT:
         guiInfo.mpcontext = arg;
         break;
 
-    case GMP_SET_STATE:
+    case GUI_SET_STATE:
 
         switch ((int)arg) {
         case GUI_STOP:
@@ -579,7 +579,7 @@
         uiState();
         break;
 
-    case GMP_NEW_FILE:
+    case GUI_SET_FILE:
 
 // if ( guiInfo.Playing == 1 && guiInfo.FilenameChanged )
         if (guiInfo.FilenameChanged) {
@@ -598,9 +598,9 @@
 
         break;
 
-    case GMP_RUN_COMMAND:
+    case GUI_RUN_COMMAND:
 
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GMP_RUN_COMMAND: %d\n", (int)arg);
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", (int)arg);
 
         switch ((int)arg) {
         case MP_CMD_VO_FULLSCREEN:
@@ -626,9 +626,9 @@
 
         break;
 
-    case GMP_PREPARATION:
+    case GUI_PREPARE:
 
-        gui(GMP_NEW_FILE, 0);
+        gui(GUI_SET_FILE, 0);
 
         switch (guiInfo.StreamType) {
         case STREAMTYPE_PLAYLIST:
@@ -839,7 +839,7 @@
 
         break;
 
-    case GMP_SET_STREAM:
+    case GUI_SET_STREAM:
 
         stream = arg;
         guiInfo.StreamType = stream->type;
@@ -875,11 +875,11 @@
 
         break;
 
-    case GMP_SET_AFILTER:
+    case GUI_SET_AFILTER:
         guiInfo.afilter = arg;
         break;
 
-    case GMP_SET_VIDEO:
+    case GUI_SET_VIDEO:
 
         // video
 
@@ -904,14 +904,14 @@
 
         break;
 
-    case GMP_SET_AUDIO:
+    case GUI_SET_AUDIO:
 
         guiInfo.AudioChannels = arg ? ((sh_audio_t *)arg)->channels : 0;
 
         if (arg && !guiInfo.sh_video)
             guiInfo.MovieWindow = False;
 
-        gui(GMP_SET_MIXER, 0);
+        gui(GUI_SET_MIXER, 0);
 
         if (gtkEnableAudioEqualizer) {
             equalizer_t eq;
@@ -930,7 +930,7 @@
         wsVisibleWindow(&guiApp.subWindow, (guiInfo.MovieWindow ? wsShowWindow : wsHideWindow));
         break;
 
-    case GMP_SET_MIXER:
+    case GUI_SET_MIXER:
         if (mixer) {
             float l, r;
             static float last_balance = -1;
@@ -952,11 +952,11 @@
         }
         break;
 
-    case GMP_REDRAW:
+    case GUI_REDRAW:
         uiEventHandling(evRedraw, 0);
         break;
 
-    case GMP_SETUP_VIDEO_WINDOW:
+    case GUI_SETUP_VIDEO_WINDOW:
 
         if (!guiApp.subWindow.isFullScreen) {
             wsResizeWindow(&guiApp.subWindow, vo_dwidth, vo_dheight);
@@ -972,13 +972,13 @@
         WinID = guiApp.subWindow.WindowID;
         break;
 
-    case GMP_X_EVENT:
+    case GUI_X_EVENT:
         guiInfo.event_struct = arg;
         wsEvents(wsDisplay, arg);
         gtkEventHandling();
         break;
 
-    case GMP_END_FILE:
+    case GUI_END_FILE:
 
         if (!uiGotoTheNext && guiInfo.Playing) {
             uiGotoTheNext = 1;
@@ -1013,7 +1013,7 @@
             } else
                 wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
 
-            gui(GMP_SET_STATE, (void *)GUI_STOP);
+            gui(GUI_SET_STATE, (void *)GUI_STOP);
             uiSubRender = 1;
             wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
             wsClearWindow(guiApp.subWindow);