[MPlayer-cvslog] r33831 - in trunk/gui: interface.c interface.h ui/gtk/equalizer.c ui/gtk/preferences.c ui/main.c
ib
subversion at mplayerhq.hu
Thu Jul 7 14:02:21 CEST 2011
Author: ib
Date: Thu Jul 7 14:02:20 2011
New Revision: 33831
Log:
Cosmetic: Rename remaining part of gtkSet() mplayer().
This is the GUI -> MPlayer part of the interface.
Modified:
trunk/gui/interface.c
trunk/gui/interface.h
trunk/gui/ui/gtk/equalizer.c
trunk/gui/ui/gtk/preferences.c
trunk/gui/ui/main.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Thu Jul 7 13:50:32 2011 (r33830)
+++ trunk/gui/interface.c Thu Jul 7 14:02:20 2011 (r33831)
@@ -838,7 +838,7 @@ int gui(int what, void *arg)
eq.channel = i;
eq.band = j;
eq.gain = gtkEquChannels[i][j];
- gtkSet(gtkSetEqualizer, 0, &eq);
+ mplayer(gtkSetEqualizer, 0, &eq);
}
}
}
@@ -942,7 +942,7 @@ int gui(int what, void *arg)
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 @@ void *gtkSet(int cmd, float fparam, void
#endif
// misc
-
+ // NOTE TO MYSELF: This should rather be in app.c.
case gtkClearStruct:
if ((unsigned int)vparam & guiFilenames) {
Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h Thu Jul 7 13:50:32 2011 (r33830)
+++ trunk/gui/interface.h Thu Jul 7 14:02:20 2011 (r33831)
@@ -55,6 +55,7 @@ extern int use_gui; // this
#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 char *fsHistory[fsPersistant_MaxP
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);
Modified: trunk/gui/ui/gtk/equalizer.c
==============================================================================
--- trunk/gui/ui/gtk/equalizer.c Thu Jul 7 13:50:32 2011 (r33830)
+++ trunk/gui/ui/gtk/equalizer.c Thu Jul 7 14:02:20 2011 (r33831)
@@ -201,8 +201,8 @@ static gboolean eqHScaleMotion( GtkWidge
{
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 @@ static gboolean eqVScaleMotion( GtkWidge
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 @@ static void eqButtonReleased( GtkButton
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 @@ static void eqSelectChannelsListRow( Gtk
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 ); }
}
}
Modified: trunk/gui/ui/gtk/preferences.c
==============================================================================
--- trunk/gui/ui/gtk/preferences.c Thu Jul 7 13:50:32 2011 (r33830)
+++ trunk/gui/ui/gtk/preferences.c Thu Jul 7 14:02:20 2011 (r33831)
@@ -512,7 +512,7 @@ static void prEntry( GtkContainer * cont
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 @@ static void prEntry( GtkContainer * cont
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 @@ static void prButton( GtkButton * button
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 @@ static void prButton( GtkButton * button
// --- 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 @@ static void prButton( GtkButton * button
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 @@ static gboolean prHScaler( GtkWidget * w
{
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 @@ static gboolean prHScaler( GtkWidget * w
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 @@ static void prToggled( GtkToggleButton *
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 );
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Thu Jul 7 13:50:32 2011 (r33830)
+++ trunk/gui/ui/main.c Thu Jul 7 14:02:20 2011 (r33831)
@@ -139,7 +139,7 @@ void uiEventHandling( int msg,float para
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 @@ void uiEventHandling( int msg,float para
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 @@ play:
{
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 @@ play:
#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 )
More information about the MPlayer-cvslog
mailing list