Mercurial > mplayer.hg
diff gui/mplayer/gtk/opts.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 8df85ad26746 |
children | 016e5fc1dead |
line wrap: on
line diff
--- a/gui/mplayer/gtk/opts.c Tue May 12 19:25:35 2009 +0000 +++ b/gui/mplayer/gtk/opts.c Wed May 13 02:58:57 2009 +0000 @@ -138,7 +138,7 @@ #endif #if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV) -static struct +static struct { char * name; char * comment; @@ -167,12 +167,12 @@ { "shift-jis", MSGTR_PREFERENCES_FontEncoding18 }, { "cp949", MSGTR_PREFERENCES_FontEncoding19 }, { "cp874", MSGTR_PREFERENCES_FontEncoding20 }, - { NULL,NULL } + { NULL,NULL } }; char * lCEncoding = NULL; char * lSEncoding = NULL; #endif - + static int old_audio_driver = 0; static char * ao_driver[3]; static char * vo_driver[3]; @@ -199,7 +199,7 @@ if ( Preferences ) gtkActive( Preferences ); else Preferences=create_Preferences(); -// -- 1. page +// -- 1. page gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ),gtkEnableAudioEqualizer ); #if 0 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSurround ),gtkAOSurround ); @@ -259,13 +259,13 @@ { int i = 0, c = 0; char * tmp[3]; tmp[2]=""; - old_video_driver=0; + old_video_driver=0; if ( CLVDrivers ) gtk_clist_clear( GTK_CLIST( CLVDrivers ) ); while ( video_out_drivers[i] ) if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) - { + { if ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) ) old_video_driver=c; c++; - tmp[0]=(char *)video_out_drivers[i - 1]->info->short_name; tmp[1]=(char *)video_out_drivers[i - 1]->info->name; + tmp[0]=(char *)video_out_drivers[i - 1]->info->short_name; tmp[1]=(char *)video_out_drivers[i - 1]->info->name; gtk_clist_append( GTK_CLIST( CLVDrivers ),tmp ); } gtk_clist_select_row( GTK_CLIST( CLVDrivers ),old_video_driver,0 ); @@ -275,7 +275,7 @@ if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE ); #endif } - + gtk_adjustment_set_value( HSFPSadj,force_fps ); // -- 3. page @@ -316,7 +316,7 @@ if ( sub_cp ) { int i; - for ( i=0;lEncoding[i].name;i++ ) + for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( sub_cp,lEncoding[i].name ) ) break; if ( lEncoding[i].name ) lSEncoding=lEncoding[i].comment; gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lSEncoding ); @@ -336,7 +336,7 @@ if ( subtitle_font_encoding ) { int i; - for ( i=0;lEncoding[i].name;i++ ) + for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( subtitle_font_encoding,lEncoding[i].name ) ) break; if ( lEncoding[i].name ) lCEncoding=lEncoding[i].comment; gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lCEncoding ); @@ -409,7 +409,7 @@ gtk_adjustment_set_value( SBCacheadj,(float)gtkCacheSize ); if ( !gtkCacheOn ) gtk_widget_set_sensitive( SBCache,FALSE ); else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),TRUE ); - + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAutoSync ),0 ); gtk_adjustment_set_value( SBAutoSyncadj,(float)gtkAutoSync ); if ( !gtkAutoSyncOn ) gtk_widget_set_sensitive( SBAutoSync,FALSE ); @@ -464,7 +464,7 @@ gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); #endif gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); - + gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 ); gtk_signal_connect( GTK_OBJECT( CLVDrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)1 ); @@ -472,7 +472,7 @@ gtkSetLayer( Preferences ); { static int visible = 1; - if ( visible ) + if ( visible ) { gtkMessageBox( GTK_MB_WARNING,MSGTR_PREFERENCES_Message ); visible=0; @@ -494,7 +494,7 @@ #if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ) -{ +{ const char * comment; int i; @@ -556,7 +556,7 @@ if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1; force_fps=HSFPSadj->value; - + // -- 3. page suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) ); sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ); @@ -576,7 +576,7 @@ 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; if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ) ) ) osd_level=3; - + // --- 4. page guiSetFilename( font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); @@ -602,7 +602,7 @@ int i; const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); for( i=0;mpcodecs_vd_drivers[i];i++ ) - if ( !gstrcmp( tmp,(char *)mpcodecs_vd_drivers[i]->info->name ) ) + if ( !gstrcmp( tmp,(char *)mpcodecs_vd_drivers[i]->info->name ) ) { gaddlist( &video_fm_list,(char *)mpcodecs_vd_drivers[i]->info->short_name ); break; } } @@ -615,7 +615,7 @@ } // --- 6. page - gtkVfPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); + gtkVfPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) ); gui_save_pos=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ) ); gtkShowVideoWindow=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ); @@ -625,7 +625,7 @@ if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; } else gtkCacheOn=0; - + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) { gtkAutoSync=(int)SBAutoSyncadj->value; gtkAutoSyncOn=1; } else gtkAutoSyncOn=0; @@ -715,14 +715,14 @@ switch ( (int)user_data ) { case 0: // extra stereo coefficient - if ( guiIntfStruct.Playing ) + if ( guiIntfStruct.Playing ) gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) ); break; // case 1: // normalize // case 2: // equalizer // if ( guiIntfStruct.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." ); // break; - case 3: + case 3: if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) gtk_widget_set_sensitive( CBLoadFullscreen,TRUE ); else { @@ -774,8 +774,8 @@ { switch ( (int)user_data ) { - case 0: // audio driver - gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); + case 0: // audio driver + gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); gtk_widget_set_sensitive( AConfig,FALSE ); if ( !strncmp( ao_driver[0],"oss",3 ) || !strncmp( ao_driver[0],"alsa",4 ) || @@ -787,14 +787,14 @@ gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, MSGTR_PREFERENCES_ArtsBroken); #endif break; - case 1: // video driver - gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); + case 1: // video driver + gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); gtk_widget_set_sensitive( VConfig,FALSE ); #ifdef CONFIG_DXR3 if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE ); #endif break; - } + } } GtkWidget * create_Preferences( void ) @@ -849,7 +849,7 @@ gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER ); // gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE ); gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences","MPlayer" ); - + gtk_widget_realize( Preferences ); gtkAddIcon( Preferences ); @@ -888,7 +888,7 @@ AConfig=AddButton( MSGTR_ConfigDriver, AddHButtonBox( vbox2 ) ); - vbox3=AddVBox( + vbox3=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox1,0 ),1 ),0 ); gtk_widget_set_usize( vbox3,250,-2 ); @@ -921,7 +921,7 @@ hbox2=AddVBox( notebook1,0 ); - vbox4=AddVBox( + vbox4=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,1 ),1 ),0 ); @@ -946,7 +946,7 @@ hbuttonbox3=AddHButtonBox( vbox4 ); VConfig=AddButton( MSGTR_ConfigDriver,hbuttonbox3 ); - vbox5=AddVBox( + vbox5=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,0 ),1 ),0 ); gtk_widget_set_usize( vbox5,250,-2 ); @@ -986,7 +986,7 @@ vbox6=AddVBox( notebook1,0 ); - vbox600=AddVBox( + vbox600=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_OSD_Level,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 ); @@ -995,7 +995,7 @@ RBOSDIndicator=AddRadioButton( MSGTR_PREFERENCES_OSDProgress,&OSD_group,vbox600 ); RBOSDTPTT=AddRadioButton( MSGTR_PREFERENCES_OSDTimerPercentageTotalTime,&OSD_group,vbox600 ); - vbox7=AddVBox( + vbox7=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Subtitle,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 ); @@ -1025,7 +1025,7 @@ gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); label=AddLabel( MSGTR_PREFERENCES_SUB_POS,NULL ); - gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); @@ -1103,7 +1103,7 @@ // --- 4. page - vbox603=AddVBox( + vbox603=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Font,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); @@ -1136,7 +1136,7 @@ label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); - + CBFontEncoding=gtk_combo_new(); gtk_widget_set_name( CBFontEncoding,"CBFontEncoding" ); gtk_widget_show( CBFontEncoding ); @@ -1189,7 +1189,7 @@ vbox601=AddVBox( notebook1,0 ); - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_CodecDemuxer,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); @@ -1228,10 +1228,10 @@ gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),4 ),label ); vbox601=AddVBox( notebook1,0 ); - + // --- 6. page - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_PostProcess,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); @@ -1245,12 +1245,12 @@ else HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0,0,0 ) ); HSPPQuality=AddHScaler( HSPPQualityadj,hbox5,0 ); - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Cache,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); CBCache=AddCheckButton( MSGTR_PREFERENCES_Cache,vbox602 ); - + hbox5=AddHBox( vbox602,1 ); AddLabel( MSGTR_PREFERENCES_CacheSize,hbox5 ); @@ -1260,7 +1260,7 @@ gtk_widget_show( SBCache ); gtk_box_pack_start( GTK_BOX( hbox5 ),SBCache,TRUE,TRUE,0 ); - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Misc,GTK_SHADOW_ETCHED_OUT,vbox601,1 ),1 ),0 ); @@ -1315,12 +1315,12 @@ gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); BOk=AddButton( MSGTR_Ok,hbuttonbox1 ); BCancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); - + gtk_widget_add_accelerator( BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); gtk_widget_add_accelerator( BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); gtk_signal_connect( GTK_OBJECT( Preferences ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&Preferences ); - + gtk_signal_connect( GTK_OBJECT( AConfig ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bAConfig ); gtk_signal_connect( GTK_OBJECT( BOk ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bOk ); gtk_signal_connect( GTK_OBJECT( BCancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bCancel ); @@ -1470,7 +1470,7 @@ } #endif -// Gets text string from a gtk entry, interpreting +// Gets text string from a gtk entry, interpreting // MSGTR_PREFERENCES_DriverDefault as null string. const char *getGtkEntryText(GtkWidget *from) { const char *tmp = gtk_entry_get_text(GTK_ENTRY(from)); @@ -1480,7 +1480,7 @@ return tmp; } -// Sets text string of a gtk entry, interpreting +// Sets text string of a gtk entry, interpreting // null string as MSGTR_PREFERENCES_DriverDefault. void setGtkEntryText(GtkWidget *dest, char *to) { if (!to) { @@ -1535,7 +1535,7 @@ void HideAudioConfig( void ) { if (!AudioConfig) return; gtk_widget_hide(AudioConfig); - gtk_widget_destroy(AudioConfig); + gtk_widget_destroy(AudioConfig); AudioConfig=NULL; } @@ -1820,7 +1820,7 @@ gtk_widget_add_accelerator( dxr3BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); gtk_signal_connect( GTK_OBJECT( DXR3Config ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&DXR3Config ); - + gtk_signal_connect( GTK_OBJECT( dxr3BOk ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)0 ); gtk_signal_connect( GTK_OBJECT( dxr3BCancel ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)1 );