diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-01 16:42:02 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-01 16:42:02 +0000 |
commit | 300a1416e572db7a51902127a512b62fd08374ed (patch) | |
tree | 42cf0af2950d9f4737890c632a62448070fab775 /Gui/mplayer | |
parent | d4408eac05ace7f78c0536e37184177a400bd952 (diff) | |
download | mpv-300a1416e572db7a51902127a512b62fd08374ed.tar.bz2 mpv-300a1416e572db7a51902127a512b62fd08374ed.tar.xz |
- rewrite Jan Spitalnik's patch
- fix some nice 10l
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9203 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer')
-rw-r--r-- | Gui/mplayer/gtk/fs.c | 1 | ||||
-rw-r--r-- | Gui/mplayer/gtk/menu.c | 14 | ||||
-rw-r--r-- | Gui/mplayer/gtk/opts.c | 23 | ||||
-rw-r--r-- | Gui/mplayer/mw.c | 13 | ||||
-rw-r--r-- | Gui/mplayer/play.c | 31 |
5 files changed, 43 insertions, 39 deletions
diff --git a/Gui/mplayer/gtk/fs.c b/Gui/mplayer/gtk/fs.c index 60cbdab4a7..e4b6e6f041 100644 --- a/Gui/mplayer/gtk/fs.c +++ b/Gui/mplayer/gtk/fs.c @@ -514,6 +514,7 @@ void fs_Ok_released( GtkButton * button,gpointer user_data ) } if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() ); if ( mplMainAutoPlay ) { mplMainAutoPlay=0; mplEventHandling( evPlay,0 ); } + else guiGetEvent( guiCEvent,guiSetStop ); } void fs_Cancel_released( GtkButton * button,gpointer user_data ) diff --git a/Gui/mplayer/gtk/menu.c b/Gui/mplayer/gtk/menu.c index a8c6347140..0f4c33ba8a 100644 --- a/Gui/mplayer/gtk/menu.c +++ b/Gui/mplayer/gtk/menu.c @@ -286,6 +286,7 @@ GtkWidget * create_PopUpMenu( void ) GtkWidget * Menu = NULL; GtkWidget * SubMenu = NULL; GtkWidget * MenuItem = NULL; + GtkWidget * N, * D, * F; Menu=gtk_menu_new(); @@ -478,9 +479,16 @@ GtkWidget * create_PopUpMenu( void ) ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight * 2 ) ) b2=1; else b1=1; } else b1=!appMPlayer.subWindow.isFullScreen; - AddMenuCheckItem( Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize ); - AddMenuCheckItem( Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize ); - AddMenuCheckItem( Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen ); + N=AddMenuCheckItem( Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize ); + D=AddMenuCheckItem( Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize ); + F=AddMenuCheckItem( Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen ); + } + + if ( !gtkShowVideoWindow && !guiIntfStruct.Playing ) + { + gtk_widget_set_sensitive( N,FALSE ); + gtk_widget_set_sensitive( D,FALSE ); + gtk_widget_set_sensitive( F,FALSE ); } AddSeparator( Menu ); diff --git a/Gui/mplayer/gtk/opts.c b/Gui/mplayer/gtk/opts.c index 60f58d4f78..682c888bf5 100644 --- a/Gui/mplayer/gtk/opts.c +++ b/Gui/mplayer/gtk/opts.c @@ -57,6 +57,7 @@ static GtkWidget * CBDR; static GtkWidget * CBFramedrop; static GtkWidget * CBHFramedrop; //static GtkWidget * CBFullScreen; +static GtkWidget * CBShowVideoWindow; static GtkWidget * CBNonInterlaved; static GtkWidget * CBIndex; static GtkWidget * CBFlip; @@ -351,6 +352,12 @@ void ShowPreferences( void ) // --- 6. page gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPostprocess ),gtkVopPP ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),gtkLoadFullscreen ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ),gtkShowVideoWindow ); + if ( !gtkShowVideoWindow ) + { + gtk_widget_set_sensitive( CBLoadFullscreen,FALSE ); + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),0 ); + } gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ),stop_xscreensaver ); gtk_adjustment_set_value( HSPPQualityadj,auto_quality ); @@ -406,6 +413,7 @@ void ShowPreferences( void ) gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)0 ); gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 ); gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)2 ); + gtk_signal_connect( GTK_OBJECT( CBShowVideoWindow ),"toggled",GTK_SIGNAL_FUNC( prToggled ), (void*)3 ); #ifdef HAVE_FREETYPE gtk_signal_connect( GTK_OBJECT( RBFontNoAutoScale ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)4 ); gtk_signal_connect( GTK_OBJECT( BRFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)5 ); @@ -583,6 +591,7 @@ void prButton( GtkButton * button,gpointer user_data ) // --- 6. page gtkVopPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) ); + gtkShowVideoWindow=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ); stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) ); gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) ); gtkSet( gtkSetAutoq,HSPPQualityadj->value,NULL ); @@ -684,6 +693,19 @@ static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ) // case 2: // equalizer // if ( guiIntfStruct.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." ); // break; + case 3: + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) gtk_widget_set_sensitive( CBLoadFullscreen,TRUE ); + else + { + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),0 ); + gtk_widget_set_sensitive( CBLoadFullscreen,FALSE ); + } + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) + { + wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + gtkActive( Preferences ); + } else wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + break; case 4: case 5: case 6: @@ -1171,6 +1193,7 @@ GtkWidget * create_Preferences( void ) AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Misc,GTK_SHADOW_ETCHED_OUT,vbox601,1 ),1 ),0 ); + CBShowVideoWindow=AddCheckButton( MSGTR_PREFERENCES_ShowVideoWindow,vbox602 ); CBLoadFullscreen=AddCheckButton( MSGTR_PREFERENCES_LoadFullscreen,vbox602 ); CBStopXScreenSaver=AddCheckButton( MSGTR_PREFERENCES_XSCREENSAVER,vbox602 ); CBPlayBar=AddCheckButton( MSGTR_PREFERENCES_PlayBar,vbox602 ); diff --git a/Gui/mplayer/mw.c b/Gui/mplayer/mw.c index 108570507e..a23a5c41ad 100644 --- a/Gui/mplayer/mw.c +++ b/Gui/mplayer/mw.c @@ -277,6 +277,7 @@ set_volume: } break; case evDoubleSize: + btnSet( evFullScreen,btnReleased ); if ( guiIntfStruct.Playing ) { appMPlayer.subWindow.isFullScreen=True; @@ -288,6 +289,7 @@ set_volume: } break; case evNormalSize: + btnSet( evFullScreen,btnReleased ); if ( guiIntfStruct.Playing ) { appMPlayer.subWindow.isFullScreen=True; @@ -299,15 +301,10 @@ set_volume: break; } else if ( !appMPlayer.subWindow.isFullScreen ) break; case evFullScreen: - for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ ) - { - if ( appMPlayer.Items[j].msg == evFullScreen ) - { - appMPlayer.Items[j].tmp=!appMPlayer.Items[j].tmp; - appMPlayer.Items[j].pressed=appMPlayer.Items[j].tmp; - } - } + if ( !guiIntfStruct.Playing && !gtkShowVideoWindow ) break; mplFullScreen(); + if ( appMPlayer.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed ); + else btnSet( evFullScreen,btnReleased ); break; case evSetAspect: diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c index 79d85e2333..f7ad980432 100644 --- a/Gui/mplayer/play.c +++ b/Gui/mplayer/play.c @@ -37,30 +37,7 @@ static int mplGotoTheNext = 1; void mplFullScreen( void ) { if ( guiIntfStruct.NoWindow && guiIntfStruct.Playing ) return; -#if 0 - static int sx,sy; -// if ( !guiIntfStruct.Playing ) - { - wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); - if ( appMPlayer.subWindow.isFullScreen ) - { - wsResizeWindow( &appMPlayer.subWindow,sx,sy ); - wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y ); - wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations ); - appMPlayer.subWindow.isFullScreen=0; - } - else - { - sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height; - wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY ); - wsMoveWindow( &appMPlayer.subWindow,True,0,0 ); - wsWindowDecoration( &appMPlayer.subWindow,0 ); - appMPlayer.subWindow.isFullScreen=1; - } - vo_fs=appMPlayer.subWindow.isFullScreen; - wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); - }// else { vo_x11_fullscreen(); appMPlayer.subWindow.isFullScreen=vo_fs; } -#else + if ( ( guiIntfStruct.Playing )&&( appMPlayer.subWindow.isFullScreen ) ) { appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight; @@ -77,13 +54,11 @@ void mplFullScreen( void ) default: appMPlayer.subWindow.OldY=appMPlayer.sub.y; break; } } - wsFullScreen( &appMPlayer.subWindow ); - vo_fs=appMPlayer.subWindow.isFullScreen; + if ( guiIntfStruct.Playing || gtkShowVideoWindow ) wsFullScreen( &appMPlayer.subWindow ); + fullscreen=vo_fs=appMPlayer.subWindow.isFullScreen; wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen ); wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen ); -#endif - fullscreen=appMPlayer.subWindow.isFullScreen; if ( guiIntfStruct.Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B ); } |