Mercurial > mplayer.hg
changeset 33743:99562e7c8b27
Cosmetic: Rename remaining part of gtkSet() mplayer().
This is the GUI -> MPlayer part of the interface.
author | ib |
---|---|
date | Thu, 07 Jul 2011 12:02:20 +0000 |
parents | e1539e14d60f |
children | 8497620cefca |
files | gui/interface.c gui/interface.h gui/ui/gtk/equalizer.c gui/ui/gtk/preferences.c gui/ui/main.c |
diffstat | 5 files changed, 45 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.c Thu Jul 07 11:50:32 2011 +0000 +++ b/gui/interface.c Thu Jul 07 12:02:20 2011 +0000 @@ -838,7 +838,7 @@ eq.channel = i; eq.band = j; eq.gain = gtkEquChannels[i][j]; - gtkSet(gtkSetEqualizer, 0, &eq); + mplayer(gtkSetEqualizer, 0, &eq); } } } @@ -942,7 +942,7 @@ return True; } -void *gtkSet(int cmd, float fparam, void *vparam) +void *mplayer(int cmd, float fparam, void *vparam) { equalizer_t *eq = (equalizer_t *)vparam; @@ -995,7 +995,7 @@ #endif // misc - + // NOTE TO MYSELF: This should rather be in app.c. case gtkClearStruct: if ((unsigned int)vparam & guiFilenames) {
--- a/gui/interface.h Thu Jul 07 11:50:32 2011 +0000 +++ b/gui/interface.h Thu Jul 07 12:02:20 2011 +0000 @@ -55,6 +55,7 @@ #define GUI_PLAY 1 #define GUI_PAUSE 2 +// NOTE TO MYSELF: This should rather be in app.h. #define guiDVD 1 #define guiVCD 2 #define guiFilenames 4 @@ -186,7 +187,7 @@ extern float gtkEquChannels[6][10]; void gmp_msg(int mod, int lev, const char *format, ...); -void *gtkSet(int cmd, float fparam, void *vparam); +void *mplayer(int cmd, float fparam, void *vparam); void guiDone(void); void guiExit(enum exit_reason how); int gui(int what, void *arg);
--- a/gui/ui/gtk/equalizer.c Thu Jul 07 11:50:32 2011 +0000 +++ b/gui/ui/gtk/equalizer.c Thu Jul 07 12:02:20 2011 +0000 @@ -201,8 +201,8 @@ { int i; for ( i=0;i<6;i++ ) - { eq.channel=i; gtkSet( gtkSetEqualizer,0,&eq ); } - } else { eq.channel=Channel; gtkSet( gtkSetEqualizer,0,&eq ); } + { eq.channel=i; mplayer( gtkSetEqualizer,0,&eq ); } + } else { eq.channel=Channel; mplayer( gtkSetEqualizer,0,&eq ); } return FALSE; } @@ -212,10 +212,10 @@ switch( (int)user_data ) { - case 1: gtkSet( gtkSetContrast,VContrastadj->value,NULL ); break; - case 2: gtkSet( gtkSetBrightness,VBrightnessadj->value,NULL ); break; - case 3: gtkSet( gtkSetHue,VHueadj->value,NULL ); break; - case 4: gtkSet( gtkSetSaturation,VSaturationadj->value,NULL ); break; + case 1: mplayer( gtkSetContrast,VContrastadj->value,NULL ); break; + case 2: mplayer( gtkSetBrightness,VBrightnessadj->value,NULL ); break; + case 3: mplayer( gtkSetHue,VHueadj->value,NULL ); break; + case 4: mplayer( gtkSetSaturation,VSaturationadj->value,NULL ); break; } return FALSE; @@ -230,16 +230,16 @@ if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) { if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) break; - gtkSet( gtkSetEqualizer,0,NULL ); + mplayer( gtkSetEqualizer,0,NULL ); eqSetBands( Channel ); } else { if ( !guiInfo.Playing ) break; - gtkSet( gtkSetContrast,0.0f,NULL ); - gtkSet( gtkSetBrightness,0.0f,NULL ); - gtkSet( gtkSetHue,0.0f,NULL ); - gtkSet( gtkSetSaturation,0.0f,NULL ); + mplayer( gtkSetContrast,0.0f,NULL ); + mplayer( gtkSetBrightness,0.0f,NULL ); + mplayer( gtkSetHue,0.0f,NULL ); + mplayer( gtkSetSaturation,0.0f,NULL ); eqSetBands( Channel ); } break; @@ -261,7 +261,7 @@ int i,j; equalizer_t eq; for ( i=1;i<FF_ARRAY_ELEMS(gtkEquChannels);i++ ) for ( j=0;j<FF_ARRAY_ELEMS(*gtkEquChannels);j++ ) - { eq.band=j; eq.channel=i; eq.gain=gtkEquChannels[0][j]; gtkSet( gtkSetEqualizer,0,&eq ); } + { eq.band=j; eq.channel=i; eq.gain=gtkEquChannels[0][j]; mplayer( gtkSetEqualizer,0,&eq ); } } }
--- a/gui/ui/gtk/preferences.c Thu Jul 07 11:50:32 2011 +0000 +++ b/gui/ui/gtk/preferences.c Thu Jul 07 12:02:20 2011 +0000 @@ -512,7 +512,7 @@ comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; - if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name ); + if ( lEncoding[i].comment ) mplayer( gtkSetFontEncoding,0,lEncoding[i].name ); break; #endif #ifdef CONFIG_ICONV @@ -520,8 +520,8 @@ comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; - if ( lEncoding[i].comment ) gtkSet( gtkSetSubEncoding,0,lEncoding[i].name ); - else gtkSet( gtkSetSubEncoding,0,NULL ); + if ( lEncoding[i].comment ) mplayer( gtkSetSubEncoding,0,lEncoding[i].name ); + else mplayer( gtkSetSubEncoding,0,NULL ); break; #endif } @@ -545,7 +545,7 @@ gtkAOExtraStereo=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ); gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) ); soft_vol=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ) ); - gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); + mplayer( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); audio_delay=HSAudioDelayadj->value; gaddlist( &audio_driver_list,ao_driver[0] ); @@ -588,16 +588,16 @@ // --- 4. page setdup( &font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); #ifndef CONFIG_FREETYPE - gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL ); + mplayer( gtkSetFontFactor,HSFontFactoradj->value,NULL ); #else - gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL ); - gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); - gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); - gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) gtkSet( gtkSetFontAutoScale,0,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) gtkSet( gtkSetFontAutoScale,1,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) gtkSet( gtkSetFontAutoScale,2,NULL ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) gtkSet( gtkSetFontAutoScale,3,NULL ); + mplayer( gtkSetFontBlur,HSFontBluradj->value,NULL ); + mplayer( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); + mplayer( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); + mplayer( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) mplayer( gtkSetFontAutoScale,0,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) mplayer( gtkSetFontAutoScale,1,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) mplayer( gtkSetFontAutoScale,2,NULL ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) mplayer( gtkSetFontAutoScale,3,NULL ); #endif // -- 5. page @@ -629,7 +629,7 @@ stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) ); gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) ); player_idle_mode=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoIdle ) ); - gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); + mplayer( gtkSetAutoq,HSPPQualityadj->value,NULL ); if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; } else gtkCacheOn=0; @@ -678,13 +678,13 @@ { case 0: // extra stereo coefficient if ( !guiInfo.Playing ) break; - gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); + mplayer( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL ); break; case 1: // audio delay audio_delay=HSAudioDelayadj->value; break; case 2: // panscan - gtkSet( gtkSetPanscan,HSPanscanadj->value,NULL ); + mplayer( gtkSetPanscan,HSPanscanadj->value,NULL ); break; case 3: // sub delay sub_delay=HSSubDelayadj->value; @@ -694,24 +694,24 @@ break; #ifndef CONFIG_FREETYPE case 5: // font factor - gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL ); + mplayer( gtkSetFontFactor,HSFontFactoradj->value,NULL ); break; #else case 6: // font blur - gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL ); + mplayer( gtkSetFontBlur,HSFontBluradj->value,NULL ); break; case 7: // font outline - gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); + mplayer( gtkSetFontOutLine,HSFontOutLineadj->value,NULL ); break; case 8: // text scale - gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); + mplayer( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL ); break; case 9: // osd scale - gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); + mplayer( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL ); break; #endif case 10: // auto quality - gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); + mplayer( gtkSetAutoq,HSPPQualityadj->value,NULL ); break; } return FALSE; @@ -749,7 +749,7 @@ case 5: case 6: case 7: - gtkSet( gtkSetFontAutoScale,(float)((int)user_data - 4 ),NULL ); + mplayer( gtkSetFontAutoScale,(float)((int)user_data - 4 ),NULL ); break; case 8: if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) gtk_widget_set_sensitive( SBCache,TRUE );
--- a/gui/ui/main.c Thu Jul 07 11:50:32 2011 +0000 +++ b/gui/ui/main.c Thu Jul 07 12:02:20 2011 +0000 @@ -139,7 +139,7 @@ case evSetVCDTrack: guiInfo.Track=iparam; case evPlayVCD: - gtkSet( gtkClearStruct,0,(void *)guiALL ); + mplayer( gtkClearStruct,0,(void *)guiALL ); guiInfo.StreamType=STREAMTYPE_VCD; goto play; #endif @@ -149,7 +149,7 @@ guiInfo.DVD.current_chapter=1; guiInfo.DVD.current_angle=1; play_dvd_2: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD) ); + mplayer( gtkClearStruct,0,(void *)(guiALL - guiDVD) ); guiInfo.StreamType=STREAMTYPE_DVD; goto play; #endif @@ -170,11 +170,11 @@ { case STREAMTYPE_STREAM: case STREAMTYPE_FILE: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiFilenames) ); + mplayer( gtkClearStruct,0,(void *)(guiALL - guiFilenames) ); break; #ifdef CONFIG_VCD case STREAMTYPE_VCD: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiVCD - guiFilenames) ); + mplayer( gtkClearStruct,0,(void *)(guiALL - guiVCD - guiFilenames) ); if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE ); uiSetFileName( NULL,cdrom_device,STREAMTYPE_VCD ); if ( guiInfo.Playing != GUI_PAUSE ) @@ -187,7 +187,7 @@ #endif #ifdef CONFIG_DVDREAD case STREAMTYPE_DVD: - gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) ); + mplayer( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) ); if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE ); uiSetFileName( NULL,dvd_device,STREAMTYPE_DVD ); if ( guiInfo.Playing != GUI_PAUSE )