diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-02 16:09:05 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-02 16:09:05 +0000 |
commit | 4173f771256083109339bdaf26736d770023e506 (patch) | |
tree | 78875f938b151e8253edb46bf9871f7258724a42 /Gui | |
parent | 44ccf8ee81155bbac4be06d6371605402a078486 (diff) | |
download | mpv-4173f771256083109339bdaf26736d770023e506.tar.bz2 mpv-4173f771256083109339bdaf26736d770023e506.tar.xz |
cleanup
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8044 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r-- | Gui/Makefile | 2 | ||||
-rw-r--r-- | Gui/app.c | 71 | ||||
-rw-r--r-- | Gui/app.h | 96 | ||||
-rw-r--r-- | Gui/cfg.c | 14 | ||||
-rw-r--r-- | Gui/cfg.h | 1 | ||||
-rw-r--r-- | Gui/events.c | 55 | ||||
-rw-r--r-- | Gui/events.h | 95 | ||||
-rw-r--r-- | Gui/interface.c | 60 | ||||
-rw-r--r-- | Gui/interface.h | 50 | ||||
-rw-r--r-- | Gui/mplayer/gtk/about.c | 2 | ||||
-rw-r--r-- | Gui/mplayer/gtk/eq.c | 6 | ||||
-rw-r--r-- | Gui/mplayer/gtk/fs.c | 2 | ||||
-rw-r--r-- | Gui/mplayer/gtk/mb.c | 2 | ||||
-rw-r--r-- | Gui/mplayer/gtk/menu.c | 2 | ||||
-rw-r--r-- | Gui/mplayer/gtk/opts.c | 57 | ||||
-rw-r--r-- | Gui/mplayer/gtk/pl.c | 2 | ||||
-rw-r--r-- | Gui/mplayer/gtk/sb.c | 4 | ||||
-rw-r--r-- | Gui/mplayer/gtk/url.c | 4 | ||||
-rw-r--r-- | Gui/mplayer/mplayer.c | 16 | ||||
-rw-r--r-- | Gui/mplayer/mw.h | 4 | ||||
-rw-r--r-- | Gui/mplayer/widgets.c | 21 | ||||
-rw-r--r-- | Gui/mplayer/widgets.h | 1 |
22 files changed, 265 insertions, 302 deletions
diff --git a/Gui/Makefile b/Gui/Makefile index a678fda70d..fae0e0d2a5 100644 --- a/Gui/Makefile +++ b/Gui/Makefile @@ -14,7 +14,7 @@ endif CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG) -SRCS = wm/ws.c wm/wsxdnd.c app.c events.c interface.c cfg.c \ +SRCS = wm/ws.c wm/wsxdnd.c app.c interface.c cfg.c \ bitmap/bitmap.c bitmap/png/png.c \ skin/skin.c skin/font.c skin/cut.c \ mplayer/mplayer.c mplayer/widgets.c mplayer/play.c \ @@ -1,4 +1,5 @@ + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -13,6 +14,61 @@ #include "mplayer/mplayer.h" #include "interface.h" +evName evNames[] = + { + { evNone, "evNone" }, + { evPlay, "evPlay" }, + { evStop, "evStop" }, + { evPause, "evPause" }, + { evPrev, "evPrev" }, + { evNext, "evNext" }, + { evLoad, "evLoad" }, + { evEqualizer, "evEqualizer" }, + { evEqualizer, "evEqualeaser" }, + { evPlayList, "evPlaylist" }, + { evExit, "evExit" }, + { evIconify, "evIconify" }, + { evIncBalance, "evIncBalance" }, + { evDecBalance, "evDecBalance" }, + { evFullScreen, "evFullScreen" }, + { evFName, "evFName" }, + { evMovieTime, "evMovieTime" }, + { evAbout, "evAbout" }, + { evLoadPlay, "evLoadPlay" }, + { evPreferences, "evPreferences" }, + { evSkinBrowser, "evSkinBrowser" }, + { evBackward10sec, "evBackward10sec" }, + { evForward10sec, "evForward10sec" }, + { evBackward1min, "evBackward1min" }, + { evForward1min, "evForward1min" }, + { evBackward10min, "evBackward10min" }, + { evForward10min, "evForward10min" }, + { evIncVolume, "evIncVolume" }, + { evDecVolume, "evDecVolume" }, + { evMute, "evMute" }, + { evIncAudioBufDelay, "evIncAudioBufDelay" }, + { evDecAudioBufDelay, "evDecAudioBufDelay" }, + { evPlaySwitchToPause, "evPlaySwitchToPause" }, + { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, + { evNormalSize, "evNormalSize" }, + { evDoubleSize, "evDoubleSize" }, + { evSetMoviePosition, "evSetMoviePosition" }, + { evSetVolume, "evSetVolume" }, + { evSetBalance, "evSetBalance" }, + { evHelp, "evHelp" }, + { evLoadSubtitle, "evLoadSubtitle" }, + { evPlayDVD, "evPlayDVD" }, + { evPlayVCD, "evPlayVCD" }, + { evSetURL, "evSetURL" }, + { evLoadAudioFile, "evLoadAudioFile" }, + { evDropSubtitle, "evDropSubtitle" }, + { evSetAspect, "evSetAspect" } + }; + +int evBoxs = sizeof( evNames ) / sizeof( evName ); + +// --- + extern char *get_path(char *); listItems appMPlayer; @@ -98,18 +154,3 @@ int appFindMessage( unsigned char * str ) if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg; return -1; } - -void appInit( void * disp ) -{ - skinDirInHome=get_path("Skin"); - skinMPlayerDir=DATADIR "/Skin"; - printf("SKIN dir 1: '%s'\n",skinDirInHome); - printf("SKIN dir 2: '%s'\n",skinMPlayerDir); - if ( !skinName ) skinName=strdup( "default" ); - switch ( skinRead( skinName ) ) - { - case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 ); - case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 ); - } - mplInit( disp ); // does gtk & ws initialization, create windows -} @@ -1,11 +1,100 @@ -#ifndef __MY_APPS -#define __MY_APPS +#ifndef __APPS_H +#define __APPS_H #include "bitmap/bitmap.h" #include "wm/ws.h" #include "wm/wskeys.h" -#include "events.h" + +// --- User events ------ + +#define evNone 0 +#define evPlay 1 +#define evStop 2 +#define evPause 3 +#define evPrev 6 +#define evNext 7 +#define evLoad 8 +#define evEqualizer 9 +#define evPlayList 10 +#define evIconify 11 +#define evAbout 12 +#define evLoadPlay 13 +#define evPreferences 14 +#define evSkinBrowser 15 +#define evPlaySwitchToPause 16 +#define evPauseSwitchToPlay 17 + +#define evBackward10sec 18 +#define evForward10sec 19 +#define evBackward1min 20 +#define evForward1min 21 +#define evBackward10min 22 +#define evForward10min 23 + +#define evNormalSize 24 +#define evDoubleSize 25 +#define evFullScreen 26 + +#define evSetMoviePosition 27 +#define evSetVolume 28 +#define evSetBalance 29 +#define evMute 30 + +#define evIncVolume 31 +#define evDecVolume 32 +#define evIncAudioBufDelay 33 +#define evDecAudioBufDelay 34 +#define evIncBalance 35 +#define evDecBalance 36 + +#define evHelp 37 + +#define evLoadSubtitle 38 +#define evDropSubtitle 43 +#define evPlayDVD 39 +#define evPlayVCD 40 +#define evPlayNetwork 41 +#define evLoadAudioFile 42 +#define evSetAspect 44 +// 45 ... + +#define evExit 1000 + +// --- General events --- + +#define evFileLoaded 5000 +#define evHideMouseCursor 5001 +#define evMessageBox 5002 +#define evGeneralTimer 5003 +#define evGtkIsOk 5004 +#define evShowPopUpMenu 5005 +#define evHidePopUpMenu 5006 +#define evSetDVDAudio 5007 +#define evSetDVDSubtitle 5008 +#define evSetDVDTitle 5009 +#define evSetDVDChapter 5010 +#define evSubtitleLoaded 5011 +#define evSetVCDTrack 5012 +#define evSetURL 5013 + +#define evFName 7000 +#define evMovieTime 7001 +#define evRedraw 7002 +#define evHideWindow 7003 +#define evShowWindow 7004 +#define evFirstLoad 7005 + +// ---------------------- + +typedef struct +{ + int msg; + char * name; +} evName; + +extern int evBoxs; +extern evName evNames[]; #define itNULL 0 #define itButton 101 // button @@ -77,7 +166,6 @@ extern char * skinDirInHome; extern char * skinMPlayerDir; extern char * skinName; -extern void appInit( void * disp ); extern void appInitStruct( listItems * item ); extern void appClearItem( wItem * item ); extern void appCopy( listItems * item1,listItems * item2 ); @@ -24,11 +24,14 @@ int gtkEnableAudioEqualizer = 0; int gtkVopPP = 0; -int gtkVopLAVC = 0; -int gtkVopFAME = 0; +#ifdef USE_LIBAVCODEC + int gtkVopLAVC = 0; +#endif +#ifdef USE_LIBFAME + int gtkVopFAME = 0; +#endif int gtkAONoSound = 0; -float gtkAODelay = 0.0f; int gtkAONorm = 0; int gtkAOSurround = 0; int gtkAOExtraStereo = 0; @@ -73,8 +76,12 @@ static config_t gui_opts[] = { "vf_pp",>kVopPP,CONF_TYPE_FLAG,0,0,1,NULL }, { "vf_autoq",&auto_quality,CONF_TYPE_INT,CONF_RANGE,0,100,NULL }, +#ifdef USE_LIBAVCODEC { "vf_lavc",>kVopLAVC,CONF_TYPE_FLAG,0,0,1,NULL }, +#endif +#ifdef USE_LIBFAME { "vf_fame",>kVopFAME,CONF_TYPE_FLAG,0,0,1,NULL }, +#endif { "ao_driver",&audio_driver_list,CONF_TYPE_STRING_LIST,0,0,0,NULL }, { "ao_nosound",>kAONoSound,CONF_TYPE_FLAG,0,0,1,NULL }, @@ -82,7 +89,6 @@ static config_t gui_opts[] = { "ao_surround",>kAOSurround,CONF_TYPE_FLAG,0,0,1,NULL }, { "ao_extra_stereo",>kAOExtraStereo,CONF_TYPE_FLAG,0,0,1,NULL }, { "ao_extra_stereo_coefficient",>kAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL }, - { "ao_delay",>kAODelay,CONF_TYPE_FLOAT,CONF_RANGE,-100,100,NULL }, { "ao_oss_mixer",>kAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL }, { "ao_oss_device",>kAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL }, @@ -9,7 +9,6 @@ extern int gtkVopLAVC; extern int gtkVopFAME; extern int gtkAONoSound; -extern float gtkAODelay; extern int gtkAONorm; extern int gtkAOFakeSurround; extern int gtkAOExtraStereo; diff --git a/Gui/events.c b/Gui/events.c deleted file mode 100644 index c210ef58d0..0000000000 --- a/Gui/events.c +++ /dev/null @@ -1,55 +0,0 @@ - -#include "events.h" - -evName evNames[] = - { - { evNone, "evNone" }, - { evPlay, "evPlay" }, - { evStop, "evStop" }, - { evPause, "evPause" }, - { evPrev, "evPrev" }, - { evNext, "evNext" }, - { evLoad, "evLoad" }, - { evEqualizer, "evEqualizer" }, - { evEqualizer, "evEqualeaser" }, - { evPlayList, "evPlaylist" }, - { evExit, "evExit" }, - { evIconify, "evIconify" }, - { evIncBalance, "evIncBalance" }, - { evDecBalance, "evDecBalance" }, - { evFullScreen, "evFullScreen" }, - { evFName, "evFName" }, - { evMovieTime, "evMovieTime" }, - { evAbout, "evAbout" }, - { evLoadPlay, "evLoadPlay" }, - { evPreferences, "evPreferences" }, - { evSkinBrowser, "evSkinBrowser" }, - { evBackward10sec, "evBackward10sec" }, - { evForward10sec, "evForward10sec" }, - { evBackward1min, "evBackward1min" }, - { evForward1min, "evForward1min" }, - { evBackward10min, "evBackward10min" }, - { evForward10min, "evForward10min" }, - { evIncVolume, "evIncVolume" }, - { evDecVolume, "evDecVolume" }, - { evMute, "evMute" }, - { evIncAudioBufDelay, "evIncAudioBufDelay" }, - { evDecAudioBufDelay, "evDecAudioBufDelay" }, - { evPlaySwitchToPause, "evPlaySwitchToPause" }, - { evPauseSwitchToPlay, "evPauseSwitchToPlay" }, - { evNormalSize, "evNormalSize" }, - { evDoubleSize, "evDoubleSize" }, - { evSetMoviePosition, "evSetMoviePosition" }, - { evSetVolume, "evSetVolume" }, - { evSetBalance, "evSetBalance" }, - { evHelp, "evHelp" }, - { evLoadSubtitle, "evLoadSubtitle" }, - { evPlayDVD, "evPlayDVD" }, - { evPlayVCD, "evPlayVCD" }, - { evSetURL, "evSetURL" }, - { evLoadAudioFile, "evLoadAudioFile" }, - { evDropSubtitle, "evDropSubtitle" }, - { evSetAspect, "evSetAspect" } - }; - -int evBoxs = sizeof( evNames ) / sizeof( evName ); diff --git a/Gui/events.h b/Gui/events.h deleted file mode 100644 index fcd723ab32..0000000000 --- a/Gui/events.h +++ /dev/null @@ -1,95 +0,0 @@ - -#ifndef _MYEVENTHANDLER -#define _MYEVENTHANDLER - -// --- User events ------ - -#define evNone 0 -#define evPlay 1 -#define evStop 2 -#define evPause 3 -#define evPrev 6 -#define evNext 7 -#define evLoad 8 -#define evEqualizer 9 -#define evPlayList 10 -#define evIconify 11 -#define evAbout 12 -#define evLoadPlay 13 -#define evPreferences 14 -#define evSkinBrowser 15 -#define evPlaySwitchToPause 16 -#define evPauseSwitchToPlay 17 - -#define evBackward10sec 18 -#define evForward10sec 19 -#define evBackward1min 20 -#define evForward1min 21 -#define evBackward10min 22 -#define evForward10min 23 - -#define evNormalSize 24 -#define evDoubleSize 25 -#define evFullScreen 26 - -#define evSetMoviePosition 27 -#define evSetVolume 28 -#define evSetBalance 29 -#define evMute 30 - -#define evIncVolume 31 -#define evDecVolume 32 -#define evIncAudioBufDelay 33 -#define evDecAudioBufDelay 34 -#define evIncBalance 35 -#define evDecBalance 36 - -#define evHelp 37 - -#define evLoadSubtitle 38 -#define evDropSubtitle 43 -#define evPlayDVD 39 -#define evPlayVCD 40 -#define evPlayNetwork 41 -#define evLoadAudioFile 42 -#define evSetAspect 44 -// 45 ... - -#define evExit 1000 - -// --- General events --- - -#define evFileLoaded 5000 -#define evHideMouseCursor 5001 -#define evMessageBox 5002 -#define evGeneralTimer 5003 -#define evGtkIsOk 5004 -#define evShowPopUpMenu 5005 -#define evHidePopUpMenu 5006 -#define evSetDVDAudio 5007 -#define evSetDVDSubtitle 5008 -#define evSetDVDTitle 5009 -#define evSetDVDChapter 5010 -#define evSubtitleLoaded 5011 -#define evSetVCDTrack 5012 -#define evSetURL 5013 - -#define evFName 7000 -#define evMovieTime 7001 -#define evRedraw 7002 -#define evHideWindow 7003 -#define evShowWindow 7004 -#define evFirstLoad 7005 - -// ---------------------- - -typedef struct -{ - int msg; - char * name; -} evName; - -extern int evBoxs; -extern evName evNames[]; - -#endif diff --git a/Gui/interface.c b/Gui/interface.c index 7facf32803..5834fa17ca 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -163,8 +163,21 @@ void guiInit( void ) fullscreen=gtkLoadFullscreen; gtkInit(); +// --- initialize X wsXInit( (void *)mDisplay ); - appInit( (void*)mDisplay ); +// --- + skinDirInHome=get_path("Skin"); + skinMPlayerDir=DATADIR "/Skin"; + printf("SKIN dir 1: '%s'\n",skinDirInHome); + printf("SKIN dir 2: '%s'\n",skinMPlayerDir); + if ( !skinName ) skinName=strdup( "default" ); + switch ( skinRead( skinName ) ) + { + case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 ); + case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 ); + } + mplInit( (void *)mDisplay ); +// --- if ( plCurrent && !filename ) mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE ); if ( sub_name ) guiSetFilename( guiIntfStruct.Subtitlename,sub_name ); @@ -175,9 +188,8 @@ void guiInit( void ) void guiDone( void ) { - mp_msg( MSGT_GPLAYER,MSGL_V,"[mplayer] exit.\n" ); + mp_msg( MSGT_GPLAYER,MSGL_V,"[gui] done.\n" ); cfg_write(); - gtkDone(); wsXDone(); } @@ -399,7 +411,7 @@ int guiGetEvent( int type,char * arg ) if ( vcd_seek_to_track( stream->fd,i ) < 0 ) break; vcd_seek_to_track( stream->fd,vcd_track ); guiIntfStruct.VCDTracks=--i; - mp_msg( MSGT_GPLAYER,MSGL_INFO,"[interface] vcd tracks: %d\n",guiIntfStruct.VCDTracks ); + mp_msg( MSGT_GPLAYER,MSGL_INFO,"[gui] vcd tracks: %d\n",guiIntfStruct.VCDTracks ); guiIntfStruct.Track=vcd_track; break; } @@ -478,7 +490,14 @@ int guiGetEvent( int type,char * arg ) } // -- subtitle #ifdef HAVE_DXR3 - if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) && guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS && !gtkVopLAVC && !gtkVopFAME ) + if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) && guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS +#ifdef USE_LIBAVCODEC + && !gtkVopLAVC +#endif +#ifdef USE_LIBFAME + && !gtkVopFAME +#endif + ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_NEEDLAVCFAME ); guiIntfStruct.Playing=0; @@ -524,14 +543,22 @@ int guiGetEvent( int type,char * arg ) } #ifdef HAVE_DXR3 +#ifdef USE_LIBAVCODEC remove_vop( "lavc" ); +#endif +#ifdef USE_LIBFAME remove_vop( "fame" ); +#endif if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) ) { if ( ( guiIntfStruct.StreamType != STREAMTYPE_DVD)&&( guiIntfStruct.StreamType != STREAMTYPE_VCD ) ) { +#ifdef USE_LIBAVCODEC if ( gtkVopLAVC ) add_vop( "lavc" ); +#endif +#ifdef USE_LIBFAME if ( gtkVopFAME ) add_vop( "fame" ); +#endif } } #endif @@ -540,7 +567,6 @@ int guiGetEvent( int type,char * arg ) else remove_vop( "pp" ); // --- audio opts - audio_delay=gtkAODelay; // if ( ao_plugin_cfg.plugin_list ) { free( ao_plugin_cfg.plugin_list ); ao_plugin_cfg.plugin_list=NULL; } if ( gtkAONorm ) gset( &ao_plugin_cfg.plugin_list,"volnorm" ); if ( gtkEnableAudioEqualizer ) gset( &ao_plugin_cfg.plugin_list,"eq" ); @@ -578,14 +604,10 @@ int guiGetEvent( int type,char * arg ) return False; } -extern unsigned int GetTimerMS( void ); -extern int mplTimer; - void guiEventHandling( void ) { if ( !guiIntfStruct.Playing || guiIntfStruct.NoWindow ) wsHandleEvents(); gtkEventHandling(); - mplTimer=GetTimerMS() / 20; } // --- @@ -701,18 +723,6 @@ void * gtkSet( int cmd,float fparam, void * vparam ) } else { url_item->next=NULL; URLList=url_item; } return NULL; // --- subtitle - case gtkSetSubAuto: - sub_auto=(int)fparam; - return NULL; - case gtkSetSubDelay: - sub_delay=fparam; - return NULL; - case gtkSetSubFPS: - sub_fps=(int)fparam; - return NULL; - case gtkSetSubPos: - sub_pos=(int)fparam; - return NULL; #if defined( USE_OSD ) || defined( USE_SUB ) #ifndef HAVE_FREETYPE case gtkSetFontFactor: @@ -763,16 +773,10 @@ void * gtkSet( int cmd,float fparam, void * vparam ) if ( (unsigned int)vparam & guiVCD ) guiIntfStruct.VCDTracks=0; #endif return NULL; - case gtkSetCacheSize: - stream_cache_size=(int)fparam; - return NULL; case gtkSetExtraStereo: gtkAOExtraStereoMul=fparam; audio_plugin_extrastereo.control( AOCONTROL_PLUGIN_ES_SET,(int)>kAOExtraStereoMul ); return NULL; - case gtkSetAudioDelay: - audio_delay=gtkAODelay=fparam; - return NULL; case gtkSetPanscan: { mp_cmd_t * mp_cmd; diff --git a/Gui/interface.h b/Gui/interface.h index f2a3c2cc5c..81875f21af 100644 --- a/Gui/interface.h +++ b/Gui/interface.h @@ -161,34 +161,28 @@ extern plItem * plLastPlayed; extern URLItem * URLList; -#define gtkSetContrast 0 -#define gtkSetBrightness 1 -#define gtkSetHue 2 -#define gtkSetSaturation 3 -#define gtkSetEqualizer 4 -#define gtkAddPlItem 5 -#define gtkGetNextPlItem 6 -#define gtkGetPrevPlItem 7 -#define gtkGetCurrPlItem 8 -#define gtkDelPl 9 -#define gtkSetExtraStereo 10 -#define gtkSetAudioDelay 11 -#define gtkSetPanscan 12 -#define gtkSetSubDelay 13 -#define gtkSetSubFPS 14 -#define gtkSetSubPos 15 -#define gtkSetSubAuto 16 -#define gtkSetFontFactor 17 -#define gtkSetAutoq 18 -#define gtkClearStruct 19 -#define gtkAddURLItem 20 -#define gtkSetFontOutLine 21 -#define gtkSetFontBlur 22 -#define gtkSetFontTextScale 23 -#define gtkSetFontOSDScale 24 -#define gtkSetFontEncoding 25 -#define gtkSetFontAutoScale 26 -#define gtkSetCacheSize 27 +#define gtkSetContrast 0 +#define gtkSetBrightness 1 +#define gtkSetHue 2 +#define gtkSetSaturation 3 +#define gtkSetEqualizer 4 +#define gtkAddPlItem 5 +#define gtkGetNextPlItem 6 +#define gtkGetPrevPlItem 7 +#define gtkGetCurrPlItem 8 +#define gtkDelPl 9 +#define gtkSetExtraStereo 10 +#define gtkSetPanscan 11 +#define gtkSetFontFactor 12 +#define gtkSetAutoq 13 +#define gtkClearStruct 14 +#define gtkAddURLItem 15 +#define gtkSetFontOutLine 16 +#define gtkSetFontBlur 17 +#define gtkSetFontTextScale 18 +#define gtkSetFontOSDScale 19 +#define gtkSetFontEncoding 20 +#define gtkSetFontAutoScale 21 extern float gtkEquChannels[6][10]; diff --git a/Gui/mplayer/gtk/about.c b/Gui/mplayer/gtk/about.c index b30ba3e051..b828219cee 100644 --- a/Gui/mplayer/gtk/about.c +++ b/Gui/mplayer/gtk/about.c @@ -1,5 +1,5 @@ -#include "../../events.h" +#include "../../app.h" #include "../../../config.h" #include "../../../help_mp.h" diff --git a/Gui/mplayer/gtk/eq.c b/Gui/mplayer/gtk/eq.c index 9d460cb401..4d3ff11618 100644 --- a/Gui/mplayer/gtk/eq.c +++ b/Gui/mplayer/gtk/eq.c @@ -9,7 +9,7 @@ #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> -#include "../../events.h" +#include "../../app.h" #include "../../cfg.h" #include "../../help_mp.h" #include "../../../config.h" @@ -290,7 +290,7 @@ GtkWidget * create_Equalizer( void ) accel_group=gtk_accel_group_new(); - Equalizer=gtk_window_new( GTK_WINDOW_DIALOG ); + Equalizer=gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( Equalizer,MSGTR_Equalizer ); gtk_object_set_data( GTK_OBJECT( Equalizer ),MSGTR_Equalizer,Equalizer ); gtk_widget_set_usize( Equalizer,550,256 ); @@ -846,7 +846,7 @@ GtkWidget * create_EquConfig( void ) accel_group=gtk_accel_group_new(); - EquConfig=gtk_window_new( GTK_WINDOW_DIALOG ); + EquConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( EquConfig,"EquConfig" ); gtk_object_set_data( GTK_OBJECT( EquConfig ),"EquConfig",EquConfig ); gtk_widget_set_usize( EquConfig,350,198 ); diff --git a/Gui/mplayer/gtk/fs.c b/Gui/mplayer/gtk/fs.c index e363cd142c..a4ed811010 100644 --- a/Gui/mplayer/gtk/fs.c +++ b/Gui/mplayer/gtk/fs.c @@ -12,7 +12,7 @@ #include "mplayer/pixmaps/dir.xpm" #include "mplayer/pixmaps/file.xpm" -#include "../../events.h" +#include "../../app.h" #include "../../interface.h" #include "../../../config.h" #include "../../../help_mp.h" diff --git a/Gui/mplayer/gtk/mb.c b/Gui/mplayer/gtk/mb.c index 2593c21d6e..6b5ddc8bb3 100644 --- a/Gui/mplayer/gtk/mb.c +++ b/Gui/mplayer/gtk/mb.c @@ -1,5 +1,5 @@ -#include "../../events.h" +#include "../../app.h" #include "../../../config.h" #include "../../../help_mp.h" diff --git a/Gui/mplayer/gtk/menu.c b/Gui/mplayer/gtk/menu.c index 638cd78494..093ab95f84 100644 --- a/Gui/mplayer/gtk/menu.c +++ b/Gui/mplayer/gtk/menu.c @@ -7,7 +7,7 @@ #include "../../../help_mp.h" #include "../../../mplayer.h" -#include "../../events.h" +#include "../../app.h" #include "menu.h" #include "../widgets.h" diff --git a/Gui/mplayer/gtk/opts.c b/Gui/mplayer/gtk/opts.c index 35f0592342..ec15ae681d 100644 --- a/Gui/mplayer/gtk/opts.c +++ b/Gui/mplayer/gtk/opts.c @@ -425,7 +425,7 @@ void prButton( GtkButton * button,gpointer user_data ) gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) ); gtkAONoSound=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoSound ) ); gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); - gtkSet( gtkSetAudioDelay,HSAudioDelayadj->value,NULL ); + audio_delay=HSAudioDelayadj->value; gaddlist( &audio_driver_list,ao_driver[0] ); gaddlist( &video_driver_list,vo_driver[0] ); @@ -442,13 +442,13 @@ void prButton( GtkButton * button,gpointer user_data ) if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1; // -- 3. page - gtkSet( gtkSetSubAuto,!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ),NULL ); + sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ); gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) ); gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) ); sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) ); - gtkSet( gtkSetSubDelay,HSSubDelayadj->value,NULL ); - gtkSet( gtkSetSubFPS,HSSubFPSadj->value,NULL ); - gtkSet( gtkSetSubPos,HSSubPositionadj->value,NULL ); + sub_delay=HSSubDelayadj->value; + sub_fps=HSSubFPSadj->value; + sub_pos=(int)HSSubPositionadj->value; if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDNone ) ) ) osd_level=0; if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ) ) ) osd_level=1; if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTandP ) ) ) osd_level=2; @@ -475,8 +475,8 @@ void prButton( GtkButton * button,gpointer user_data ) gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) ); gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) gtkSet( gtkSetCacheSize,SBCacheadj->value,NULL ); - else gtkSet( gtkSetCacheSize,0,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) stream_cache_size=SBCacheadj->value; + else stream_cache_size=0; { int i; @@ -529,16 +529,16 @@ static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer u gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); break; case 1: // audio delay - gtkSet( gtkSetAudioDelay,HSAudioDelayadj->value,NULL ); + audio_delay=HSAudioDelayadj->value; break; case 2: // panscan gtkSet( gtkSetPanscan,HSPanscanadj->value,NULL ); break; case 3: // sub delay - gtkSet( gtkSetSubDelay,HSSubDelayadj->value,NULL ); + sub_delay=HSSubDelayadj->value; break; case 4: // sub position - gtkSet( gtkSetSubPos,HSSubPositionadj->value,NULL ); + sub_pos=(int)HSSubPositionadj->value; break; case 5: // font factor #ifndef HAVE_FREETYPE @@ -682,14 +682,9 @@ GtkWidget * create_Preferences( void ) accel_group=gtk_accel_group_new(); - Preferences=gtk_window_new( GTK_WINDOW_DIALOG ); + Preferences=gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( Preferences,"Preferences" ); gtk_object_set_data( GTK_OBJECT( Preferences ),"Preferences",Preferences ); -//#ifndef HAVE_FREETYPE -// gtk_widget_set_usize( Preferences,512,400 ); -//#else -// gtk_widget_set_usize( Preferences,612,565 ); -//#endif gtk_window_set_title( GTK_WINDOW( Preferences ),MSGTR_Preferences ); gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER ); // gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE ); @@ -2000,7 +1995,7 @@ GtkWidget * create_OSSConfig( void ) accel_group=gtk_accel_group_new(); - OSSConfig=gtk_window_new( GTK_WINDOW_DIALOG ); + OSSConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_widget_set_name( OSSConfig,"OSSConfig" ); gtk_object_set_data( GTK_OBJECT( OSSConfig ),"OSSConfig",OSSConfig ); gtk_widget_set_usize( OSSConfig,270,92 ); @@ -2184,8 +2179,12 @@ static GtkWidget * DXR3Config; static GtkWidget * CBDevice; static GtkWidget * CEDXR3Device; static GtkWidget * RBVNone; -static GtkWidget * RBVLavc; -static GtkWidget * RBVFame; +#ifdef USE_LIBAVCODEC + static GtkWidget * RBVLavc; +#endif +#ifdef USE_LIBFAME + static GtkWidget * RBVFame; +#endif static GtkWidget * dxr3BOk; static GtkWidget * dxr3BCancel; @@ -2201,8 +2200,12 @@ void ShowDXR3Config( void ) gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),gtkDXR3Device ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVNone ),TRUE ); +#ifdef USE_LIBAVCODEC if ( gtkVopLAVC ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVLavc ),TRUE ); +#endif +#ifdef USE_LIBFAME if ( gtkVopFAME ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVFame ),TRUE ); +#endif gtk_widget_show( DXR3Config ); gtkSetLayer( DXR3Config ); @@ -2223,8 +2226,12 @@ static void dxr3Button( GtkButton * button,gpointer user_data ) { case 0: // Ok gfree( (void **)>kDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) ); +#ifdef USE_LIBAVCODEC gtkVopLAVC=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBVLavc ) ); +#endif +#ifdef USE_LIBFAME gtkVopFAME=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBV |