summaryrefslogtreecommitdiffstats
path: root/Gui/mplayer
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-01 11:28:18 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-01 11:28:18 +0000
commitacc08a36ec38f27179a4b998eadbd1ac3d86e74e (patch)
treeddd467a446190106d831b927d63def9e1c916ae5 /Gui/mplayer
parent30c502e5ce09bacd892e9d4da25eb8f6ff277f3e (diff)
downloadmpv-acc08a36ec38f27179a4b998eadbd1ac3d86e74e.tar.bz2
mpv-acc08a36ec38f27179a4b998eadbd1ac3d86e74e.tar.xz
rewrite eq interface and add *.rm to fs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7218 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer')
-rw-r--r--Gui/mplayer/gtk/eq.c21
-rw-r--r--Gui/mplayer/gtk/fs.c1
-rw-r--r--Gui/mplayer/gtk/opts.c2
3 files changed, 16 insertions, 8 deletions
diff --git a/Gui/mplayer/gtk/eq.c b/Gui/mplayer/gtk/eq.c
index aa69309ba2..9d460cb401 100644
--- a/Gui/mplayer/gtk/eq.c
+++ b/Gui/mplayer/gtk/eq.c
@@ -66,6 +66,14 @@ static void eqSetBands( int channel )
gtk_adjustment_set_value( A8000adj,0.0f - gtkEquChannels[channel][8] );
gtk_adjustment_set_value( A16000adj,0.0f - gtkEquChannels[channel][9] );
+ if ( guiIntfStruct.sh_video )
+ {
+ get_video_colors( guiIntfStruct.sh_video,"brightness",&vo_gamma_brightness );
+ get_video_colors( guiIntfStruct.sh_video,"contrast",&vo_gamma_contrast );
+ get_video_colors( guiIntfStruct.sh_video,"hue",&vo_gamma_hue );
+ get_video_colors( guiIntfStruct.sh_video,"saturation",&vo_gamma_saturation );
+ }
+
gtk_adjustment_set_value( VContrastadj,(float)vo_gamma_contrast );
gtk_adjustment_set_value( VBrightnessadj,(float)vo_gamma_brightness );
gtk_adjustment_set_value( VHueadj,(float)vo_gamma_hue );
@@ -111,12 +119,7 @@ void ShowEqualizer( void )
eqSetChannelNames();
- VContrastadj->value=(float)vo_gamma_contrast;
- VBrightnessadj->value=(float)vo_gamma_brightness;
- VHueadj->value=(float)vo_gamma_hue;
- VSaturationadj->value=(float)vo_gamma_saturation;
-
- if ( !guiIntfStruct.Playing )
+ if ( !guiIntfStruct.Playing || !guiIntfStruct.sh_video )
{
gtk_widget_set_sensitive( VContrast,FALSE );
gtk_widget_set_sensitive( VBrightness,FALSE );
@@ -215,7 +218,6 @@ static void eqButtonReleased( GtkButton * button,gpointer user_data )
gtkSet( gtkSetBrightness,0.0f,NULL );
gtkSet( gtkSetHue,0.0f,NULL );
gtkSet( gtkSetSaturation,0.0f,NULL );
- vo_gamma_brightness=vo_gamma_contrast=vo_gamma_hue=vo_gamma_saturation=0;
eqSetBands( Channel );
}
break;
@@ -231,6 +233,9 @@ gboolean eqDestroy( GtkWidget * widget,GdkEvent * event,gpointer user_data )
static void eqShow( GtkWidget * widget,gpointer user_data )
{ gtkVEqualizer=(int)user_data; }
+static void eqFocus( GtkWindow * window,GtkWidget * widget,gpointer user_data )
+{ eqSetBands( Channel ); }
+
static void eqSelectChannelsListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data )
{
Channel=row - 1;
@@ -708,6 +713,8 @@ GtkWidget * create_Equalizer( void )
gtk_signal_connect( GTK_OBJECT( Equalizer ),"destroy",GTK_SIGNAL_FUNC( eqDestroy ),NULL );
gtk_signal_connect( GTK_OBJECT( Equalizer ),"show",GTK_SIGNAL_FUNC( eqShow ),(void *)1 );
gtk_signal_connect( GTK_OBJECT( Equalizer ),"hide",GTK_SIGNAL_FUNC( eqShow ),(void *)0 );
+ gtk_signal_connect( GTK_OBJECT( Equalizer ),"focus_in_event",GTK_SIGNAL_FUNC( eqFocus ),(void *)2 );
+
gtk_signal_connect( GTK_OBJECT( ChannelsList ),"select_row",GTK_SIGNAL_FUNC( eqSelectChannelsListRow ),NULL );
gtk_signal_connect( GTK_OBJECT( A3125 ),"motion_notify_event",GTK_SIGNAL_FUNC( eqHScaleMotion ),(void*)0 );
diff --git a/Gui/mplayer/gtk/fs.c b/Gui/mplayer/gtk/fs.c
index 28df7115cd..d12fef07e6 100644
--- a/Gui/mplayer/gtk/fs.c
+++ b/Gui/mplayer/gtk/fs.c
@@ -48,6 +48,7 @@ char * fsVideoFilterNames[][2] =
{ "QT files (*.mov)", "*.mov" },
{ "ASF files (*.asf)", "*.asf" },
{ "VIVO files (*.viv)", "*.viv" },
+ { "RealVideo files (*.rm)", "*.rm" },
{ "Windows Media Video (*.wmv)", "*.wmv" },
{ "MP3 files (*.mp3,mp2)", "*.mp3,*.mp2" },
{ "Wave files (*.wav)", "*.wav" },
diff --git a/Gui/mplayer/gtk/opts.c b/Gui/mplayer/gtk/opts.c
index 6c00668055..44f12f134d 100644
--- a/Gui/mplayer/gtk/opts.c
+++ b/Gui/mplayer/gtk/opts.c
@@ -655,7 +655,7 @@ GtkWidget * create_Preferences( void )
#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 );
+// gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE );
gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences","MPlayer" );
gtk_widget_realize( Preferences );