# HG changeset patch # User ib # Date 1308743311 0 # Node ID 6aa251adfba08dac35651ed0761098af32ab9fab # Parent b374c74a5f17ccff01f8a88769dbda29da55cc23 Rename guiGetEvent type guiCEvent guiSetState. Type guiCEvent sets the state and should be named so. diff -r b374c74a5f17 -r 6aa251adfba0 gui/interface.c --- 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: diff -r b374c74a5f17 -r 6aa251adfba0 gui/interface.h --- 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 diff -r b374c74a5f17 -r 6aa251adfba0 gui/ui/actions.c --- 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); diff -r b374c74a5f17 -r 6aa251adfba0 gui/ui/gtk/fileselect.c --- 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 ) diff -r b374c74a5f17 -r 6aa251adfba0 gui/win32/dialogs.c --- 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); diff -r b374c74a5f17 -r 6aa251adfba0 gui/win32/interface.c --- 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) diff -r b374c74a5f17 -r 6aa251adfba0 gui/win32/preferences.c --- 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]); diff -r b374c74a5f17 -r 6aa251adfba0 mplayer.c --- 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