changeset 33611:6aa251adfba0

Rename guiGetEvent type guiCEvent guiSetState. Type guiCEvent sets the state and should be named so.
author ib
date Wed, 22 Jun 2011 11:48:31 +0000
parents b374c74a5f17
children 4dc685f18963
files gui/interface.c gui/interface.h gui/ui/actions.c gui/ui/gtk/fileselect.c gui/win32/dialogs.c gui/win32/interface.c gui/win32/preferences.c mplayer.c
diffstat 8 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Wed Jun 22 11:30:27 2011 +0000
+++ b/gui/interface.c	Wed Jun 22 11:48:31 2011 +0000
@@ -572,7 +572,7 @@
         gtkEventHandling();
         break;
 
-    case guiCEvent:
+    case guiSetState:
 
         switch ((int)arg) {
         case guiSetPlay:
--- a/gui/interface.h	Wed Jun 22 11:30:27 2011 +0000
+++ b/gui/interface.h	Wed Jun 22 11:48:31 2011 +0000
@@ -37,7 +37,7 @@
 #define GMPlayer "gmplayer"
 
 #define guiXEvent          0
-#define guiCEvent          1
+#define guiSetState        1
 #define guiIEvent          2
 #define guiSetDVD          3
 #define guiSetFileName     4
--- a/gui/ui/actions.c	Wed Jun 22 11:30:27 2011 +0000
+++ b/gui/ui/actions.c	Wed Jun 22 11:48:31 2011 +0000
@@ -128,7 +128,7 @@
         } else
             wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
 
-        guiGetEvent(guiCEvent, (void *)guiSetStop);
+        guiGetEvent(guiSetState, (void *)guiSetStop);
         uiSubRender = 1;
         wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
         wsClearWindow(guiApp.subWindow);
@@ -148,7 +148,7 @@
         return;
     }
 
-    guiGetEvent(guiCEvent, (void *)guiSetPlay);
+    guiGetEvent(guiSetState, (void *)guiSetPlay);
     uiSubRender = 0;
     wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
     wsClearWindow(guiApp.subWindow);
--- a/gui/ui/gtk/fileselect.c	Wed Jun 22 11:30:27 2011 +0000
+++ b/gui/ui/gtk/fileselect.c	Wed Jun 22 11:48:31 2011 +0000
@@ -510,7 +510,7 @@
   }
  if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() );
  if ( uiMainAutoPlay ) { uiMainAutoPlay=0; uiEventHandling( evPlay,0 ); }
-  else guiGetEvent( guiCEvent,(void *) guiSetStop );
+  else guiGetEvent( guiSetState,(void *) guiSetStop );
 }
 
 static void fs_Cancel_released( GtkButton * button,gpointer user_data )
--- a/gui/win32/dialogs.c	Wed Jun 22 11:30:27 2011 +0000
+++ b/gui/win32/dialogs.c	Wed Jun 22 11:48:31 2011 +0000
@@ -708,7 +708,7 @@
                     int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0);
                     if (len)
                     {
-                        if (guiInfo.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop);
+                        if (guiInfo.Playing) guiGetEvent(guiSetState, (void *) guiSetStop);
                         free(skinName);
                         skinName = malloc(len + 1);
                         SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);
--- a/gui/win32/interface.c	Wed Jun 22 11:30:27 2011 +0000
+++ b/gui/win32/interface.c	Wed Jun 22 11:48:31 2011 +0000
@@ -218,7 +218,7 @@
         }
         case evStop:
             if(guiInfo.Playing)
-                guiGetEvent(guiCEvent, (void *) guiSetStop);
+                guiGetEvent(guiSetState, (void *) guiSetStop);
             break;
         case evSetMoviePosition:
         {
@@ -288,7 +288,7 @@
                     guiInfo.Chapter = guiInfo.DVD.current_chapter;
                     guiInfo.Angle = guiInfo.DVD.current_angle;
                     guiInfo.DiskChanged = 1;
-                    guiGetEvent(guiCEvent, (void *) guiSetPlay);
+                    guiGetEvent(guiSetState, (void *) guiSetPlay);
                     break;
                 }
 #endif
@@ -297,8 +297,8 @@
                     guiInfo.FilenameChanged = guiInfo.NewPlay = 1;
                     update_playlistwindow();
                     uiGotoTheNext = guiInfo.Playing? 0 : 1;
-                    guiGetEvent(guiCEvent, (void *) guiSetStop);
-                    guiGetEvent(guiCEvent, (void *) guiSetPlay);
+                    guiGetEvent(guiSetState, (void *) guiSetStop);
+                    guiGetEvent(guiSetState, (void *) guiSetPlay);
                     break;
                }
            }
@@ -324,7 +324,7 @@
        return;
    }
    guiInfo.NewPlay = 1;
-   guiGetEvent(guiCEvent, (void *) guiSetPlay);
+   guiGetEvent(guiSetState, (void *) guiSetPlay);
 }
 
 void uiPause( void )
@@ -428,12 +428,12 @@
         style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
         SetWindowLong(mygui->subwindow, GWL_STYLE, style);
     }
-    guiGetEvent(guiCEvent, (void *) guiSetStop);
+    guiGetEvent(guiSetState, (void *) guiSetStop);
 }
 
 void uiStop(void)
 {
-    guiGetEvent(guiCEvent, (void *) guiSetStop);
+    guiGetEvent(guiSetState, (void *) guiSetStop);
 }
 
 void uiSetFileName(char *dir, char *name, int type)
@@ -660,7 +660,7 @@
         case guiSetAfilter:
             guiInfo.afilter = arg;
             break;
-        case guiCEvent:
+        case guiSetState:
         {
             guiInfo.Playing = (int) arg;
             switch (guiInfo.Playing)
--- a/gui/win32/preferences.c	Wed Jun 22 11:30:27 2011 +0000
+++ b/gui/win32/preferences.c	Wed Jun 22 11:48:31 2011 +0000
@@ -558,7 +558,7 @@
                 case ID_APPLY:
                 {
                     int strl;
-                    if(guiInfo.Playing) guiGetEvent(guiCEvent, (void *)guiSetStop);
+                    if(guiInfo.Playing) guiGetEvent(guiSetState, (void *)guiSetStop);
 
                     /* Set the video driver */
                     free(video_driver_list[0]);
--- a/mplayer.c	Wed Jun 22 11:30:27 2011 +0000
+++ b/mplayer.c	Wed Jun 22 11:48:31 2011 +0000
@@ -2537,7 +2537,7 @@
     }
 #ifdef CONFIG_GUI
     if (use_gui)
-        guiGetEvent(guiCEvent, (char *)guiSetPause);
+        guiGetEvent(guiSetState, (char *)guiSetPause);
 #endif
     if (mpctx->video_out && mpctx->sh_video && vo_config_count)
         mpctx->video_out->control(VOCTRL_PAUSE, NULL);
@@ -2604,7 +2604,7 @@
         if (guiInfo.Playing == guiSetStop)
             mpctx->eof = 1;
         else
-            guiGetEvent(guiCEvent, (char *)guiSetPlay);
+            guiGetEvent(guiSetState, (char *)guiSetPlay);
     }
 #endif
 }
@@ -3052,7 +3052,7 @@
     if (use_gui) {
         guiInit();
         guiGetEvent(guiSetContext, mpctx);
-        guiGetEvent(guiCEvent, (char *)((gui_no_filename) ? 0 : 1));
+        guiGetEvent(guiSetState, (char *)((gui_no_filename) ? 0 : 1));
     }
 #endif