Mercurial > mplayer.hg
changeset 7538:c7b61f316edf
- add "start in fullscreen" function
- fix some small bug
- don't quit if the config file is wrong
author | pontscho |
---|---|
date | Sat, 28 Sep 2002 19:42:10 +0000 |
parents | 719bb52b987a |
children | 56ea9db91251 |
files | Gui/cfg.c Gui/cfg.h Gui/interface.c Gui/mplayer/gtk/opts.c help/help_mp-en.h |
diffstat | 5 files changed, 44 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/cfg.c Sat Sep 28 19:17:34 2002 +0000 +++ b/Gui/cfg.c Sat Sep 28 19:42:10 2002 +0000 @@ -39,6 +39,8 @@ int gtkSubDumpMPSub = 0; int gtkSubDumpSrt = 0; +int gtkLoadFullscreen = 0; + // --- extern char * get_path( char * filename ); @@ -92,7 +94,8 @@ { "font_autoscale",&subtitle_autoscale,CONF_TYPE_INT,CONF_RANGE,0,3,NULL }, #endif - { "cache",&stream_cache_size,CONF_TYPE_INT,CONF_RANGE,4,65535,NULL }, + { "cache",&stream_cache_size,CONF_TYPE_INT,CONF_RANGE,0,65535,NULL }, + { "load_fullscreen",>kLoadFullscreen,CONF_TYPE_FLAG,0,0,1,NULL }, { "gui_skin",&skinName,CONF_TYPE_STRING,0,0,0,NULL }, @@ -145,7 +148,7 @@ if ( m_config_parse_config_file( gui_conf,cfg ) < 0 ) { mp_msg( MSGT_GPLAYER,MSGL_FATAL,"[cfg] config file read error ...\n" ); - exit( 1 ); +// exit( 1 ); } free( cfg );
--- a/Gui/cfg.h Sat Sep 28 19:17:34 2002 +0000 +++ b/Gui/cfg.h Sat Sep 28 19:42:10 2002 +0000 @@ -26,6 +26,7 @@ extern char * gtkEquChannel4; extern char * gtkEquChannel5; extern char * gtkEquChannel6; +extern int gtkLoadFullscreen; extern int cfg_read( void ); extern int cfg_write( void );
--- a/Gui/interface.c Sat Sep 28 19:17:34 2002 +0000 +++ b/Gui/interface.c Sat Sep 28 19:42:10 2002 +0000 @@ -142,13 +142,14 @@ memset( >kEquChannels,0,sizeof( gtkEquChannels ) ); gtkAOOSSMixer=strdup( PATH_DEV_MIXER ); gtkAOOSSDevice=strdup( PATH_DEV_DSP ); + fullscreen=gtkLoadFullscreen; gtkInit(); wsXInit( (void *)mDisplay ); // cfg_read(); appInit( (void*)mDisplay ); - + if ( plCurrent && !filename ) mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE ); if ( sub_name ) guiSetFilename( guiIntfStruct.Subtitlename,sub_name ); #if defined( USE_OSD ) || defined( USE_SUB )
--- a/Gui/mplayer/gtk/opts.c Sat Sep 28 19:17:34 2002 +0000 +++ b/Gui/mplayer/gtk/opts.c Sat Sep 28 19:42:10 2002 +0000 @@ -63,6 +63,7 @@ static GtkWidget * CBDumpSrt; static GtkWidget * CBPostprocess; static GtkWidget * CBCache; +static GtkWidget * CBLoadFullscreen; static GtkWidget * SBCache; static GtkAdjustment * SBCacheadj; @@ -264,6 +265,7 @@ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),index_mode ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPostprocess ),gtkVopPP ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),gtkLoadFullscreen ); gtk_adjustment_set_value( HSPPQualityadj,auto_quality ); { int i; @@ -462,6 +464,7 @@ force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) ); index_mode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ); gtkVopPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); + 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 ); @@ -1808,6 +1811,37 @@ gtk_widget_show( SBCache ); gtk_box_pack_start( GTK_BOX( hbox5 ),SBCache,TRUE,TRUE,0 ); + frame11=gtk_frame_new( MSGTR_PREFERENCES_FRAME_Misc ); + gtk_widget_set_name( frame11,"frame11" ); + gtk_widget_ref( frame11 ); + gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame11",frame11,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_show( frame11 ); + gtk_box_pack_start( GTK_BOX( vbox601 ),frame11,FALSE,FALSE,0 ); + gtk_frame_set_shadow_type( GTK_FRAME( frame11 ),GTK_SHADOW_ETCHED_OUT ); + + frame=gtk_frame_new( NULL ); + gtk_widget_set_name( frame,"frame" ); + gtk_widget_ref( frame ); + gtk_object_set_data_full( GTK_OBJECT( Preferences ),"frame",frame,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_show( frame ); + gtk_container_add( GTK_CONTAINER( frame11 ),frame ); + gtk_container_set_border_width( GTK_CONTAINER( frame ),0 ); + gtk_frame_set_shadow_type( GTK_FRAME( frame ),GTK_SHADOW_NONE ); + + vbox602=gtk_vbox_new( FALSE,0 ); + gtk_widget_set_name( vbox602,"vbox602" ); + gtk_widget_ref( vbox602 ); + gtk_object_set_data_full( GTK_OBJECT( Preferences ),"vbox602",vbox602,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_show( vbox602 ); + gtk_container_add( GTK_CONTAINER( frame ),vbox602 ); + + CBLoadFullscreen=gtk_check_button_new_with_label( MSGTR_PREFERENCES_LoadFullscreen ); + gtk_widget_set_name( CBLoadFullscreen,"CBLoadFullscreen" ); + gtk_widget_ref( CBLoadFullscreen ); + gtk_object_set_data_full( GTK_OBJECT( Preferences ),"CBLoadFullscreen",CBLoadFullscreen,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_show( CBLoadFullscreen ); + gtk_box_pack_start( GTK_BOX( vbox602 ),CBLoadFullscreen,FALSE,FALSE,0 ); + label4=gtk_label_new( "Misc" ); gtk_widget_set_name( label4,"label4" ); gtk_widget_ref( label4 );
--- a/help/help_mp-en.h Sat Sep 28 19:17:34 2002 +0000 +++ b/help/help_mp-en.h Sat Sep 28 19:42:10 2002 +0000 @@ -439,6 +439,7 @@ #define MSGTR_PREFERENCES_FRAME_PostProcess "Postprocessing" #define MSGTR_PREFERENCES_FRAME_CodecDemuxer "Codec & demuxer" #define MSGTR_PREFERENCES_FRAME_Cache "Cache" +#define MSGTR_PREFERENCES_FRAME_Misc "Misc" #define MSGTR_PREFERENCES_OSS_Device "Device:" #define MSGTR_PREFERENCES_OSS_Mixer "Mixer:" #define MSGTR_PREFERENCES_Message "Please remember that you need to restart playback for some options to take effect!" @@ -477,6 +478,7 @@ #define MSGTR_PREFERENCES_FontOSDScale "OSD scale:" #define MSGTR_PREFERENCES_SubtitleOSD "Subtitle & OSD" #define MSGTR_PREFERENCES_Cache "Cache on/off" +#define MSGTR_PREFERENCES_LoadFullscreen "Started in fullscreen" // --- messagebox #define MSGTR_MSGBOX_LABEL_FatalError "Fatal error!"