aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gui/mplayer
diff options
context:
space:
mode:
authorGravatar pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-04 19:23:58 +0000
committerGravatar pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-04 19:23:58 +0000
commit0cfdf68bfbace49b8e1cd0954542da86bc0aa0f6 (patch)
tree0800301bcfcb1bc07bdc38c791aced32a6052772 /Gui/mplayer
parentb049fdd4f759b5713a266bd380e96e8a80a571b2 (diff)
- fix mixer handling
- some change in menu - fix evLoadPlay bug - etc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6904 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer')
-rw-r--r--Gui/mplayer/gtk/about.c2
-rw-r--r--Gui/mplayer/gtk/eq.c3
-rw-r--r--Gui/mplayer/gtk/fs.c4
-rw-r--r--Gui/mplayer/gtk/mb.c3
-rw-r--r--Gui/mplayer/gtk/menu.c12
-rw-r--r--Gui/mplayer/gtk/opts.c25
-rw-r--r--Gui/mplayer/gtk/pl.c4
-rw-r--r--Gui/mplayer/gtk/sb.c3
-rw-r--r--Gui/mplayer/gtk/url.c4
-rw-r--r--Gui/mplayer/mw.h1
-rw-r--r--Gui/mplayer/play.c2
-rw-r--r--Gui/mplayer/widgets.c15
-rw-r--r--Gui/mplayer/widgets.h5
13 files changed, 40 insertions, 43 deletions
diff --git a/Gui/mplayer/gtk/about.c b/Gui/mplayer/gtk/about.c
index f6f97a974b..78a6bf59a2 100644
--- a/Gui/mplayer/gtk/about.c
+++ b/Gui/mplayer/gtk/about.c
@@ -15,7 +15,6 @@ void ShowAboutBox( void )
if ( gtkVAboutBox ) gtkActive( AboutBox );
else AboutBox=create_About();
gtk_widget_show( AboutBox );
- gtkIncVisible();
}
void ab_AboutBox_show( GtkButton * button,gpointer user_data )
@@ -25,7 +24,6 @@ void ab_Ok_released( GtkButton * button,gpointer user_data )
{
gtkVAboutBox=(int)user_data;
gtk_widget_destroy( AboutBox );
- gtkDecVisible();
}
GtkWidget * create_About( void )
diff --git a/Gui/mplayer/gtk/eq.c b/Gui/mplayer/gtk/eq.c
index 0b1183d602..3b3d1775e4 100644
--- a/Gui/mplayer/gtk/eq.c
+++ b/Gui/mplayer/gtk/eq.c
@@ -142,13 +142,12 @@ void ShowEqualizer( void )
if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) gtk_widget_show( Config );
gtk_widget_show( Equalizer );
- gtkIncVisible();
}
void HideEqualizer( void )
{
if ( !gtkVEqualizer ) return;
- gtkVEqualizer=0; gtkDecVisible();
+ gtkVEqualizer=0;
gtk_widget_hide( Equalizer );
gtk_widget_destroy( Equalizer );
if ( gtkVEquConfig ) HideEquConfig();
diff --git a/Gui/mplayer/gtk/fs.c b/Gui/mplayer/gtk/fs.c
index ae85c4a3fb..d57b8f18c0 100644
--- a/Gui/mplayer/gtk/fs.c
+++ b/Gui/mplayer/gtk/fs.c
@@ -286,7 +286,7 @@ void ShowFileSelect( int type,int modal )
gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal );
- gtk_widget_show( fsFileSelect ); gtkIncVisible();
+ gtk_widget_show( fsFileSelect );
}
void HideFileSelect( void )
@@ -294,7 +294,7 @@ void HideFileSelect( void )
if ( !gtkVFileSelect ) return;
gtk_widget_hide( fsFileSelect );
gtk_widget_destroy( fsFileSelect );
- gtkVFileSelect=0; gtkDecVisible();
+ gtkVFileSelect=0;
}
void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data )
diff --git a/Gui/mplayer/gtk/mb.c b/Gui/mplayer/gtk/mb.c
index 569efae6a4..3be3e1136c 100644
--- a/Gui/mplayer/gtk/mb.c
+++ b/Gui/mplayer/gtk/mb.c
@@ -19,11 +19,10 @@ void ShowMessageBox( char * msg )
if ( gtkVMessageBox ) { gtk_widget_hide( MessageBox ); gtk_widget_destroy( MessageBox ); }
MessageBox=create_MessageBox( 0 );
if ( strlen( msg ) < 20 ) gtk_widget_set_usize( MessageBox,196,-1 );
- gtkIncVisible();
}
static void on_Ok_released( GtkButton * button,gpointer user_data )
-{ gtkVMessageBox=0; gtk_widget_hide( MessageBox ); gtk_widget_destroy( MessageBox ); gtkDecVisible(); }
+{ gtkVMessageBox=0; gtk_widget_hide( MessageBox ); gtk_widget_destroy( MessageBox ); }
static void on_MessageBox_show( GtkButton * button,gpointer user_data )
{ gtkVMessageBox=(int)user_data; }
diff --git a/Gui/mplayer/gtk/menu.c b/Gui/mplayer/gtk/menu.c
index 5bd878b561..8d1db72f2d 100644
--- a/Gui/mplayer/gtk/menu.c
+++ b/Gui/mplayer/gtk/menu.c
@@ -294,10 +294,10 @@ GtkWidget * create_PopUpMenu( void )
// AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec );
// AddMenuItem( SubMenu,"Back 1 min", evBackward1min );
// AddMenuItem( SubMenu,"Fwd 1 min", evForward1min );
- SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size );
- AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize );
- AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize );
- AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen );
+// SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size );
+// AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize );
+// AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize );
+// AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen );
#ifdef HAVE_VCD
VCDSubMenu=AddSubMenu( Menu,MSGTR_MENU_VCD );
AddMenuItem( VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD );
@@ -394,6 +394,10 @@ GtkWidget * create_PopUpMenu( void )
AddMenuItem( Menu,MSGTR_MENU_Preferences, evPreferences );
AddMenuItem( Menu,MSGTR_Equalizer, evEqualizer );
AddSeparator( Menu );
+ AddMenuItem( Menu,MSGTR_MENU_NormalSize" ", evNormalSize );
+ AddMenuItem( Menu,MSGTR_MENU_DoubleSize, evDoubleSize );
+ AddMenuItem( Menu,MSGTR_MENU_FullScreen, evFullScreen );
+ AddSeparator( Menu );
AddMenuItem( Menu,MSGTR_MENU_Exit, evExit );
return Menu;
diff --git a/Gui/mplayer/gtk/opts.c b/Gui/mplayer/gtk/opts.c
index 357c965de1..63c4f6f698 100644
--- a/Gui/mplayer/gtk/opts.c
+++ b/Gui/mplayer/gtk/opts.c
@@ -117,12 +117,12 @@ void ShowPreferences( void )
int i = 0;
char * tmp[3]; tmp[2]="";
old_audio_driver=0;
+ if ( audio_driver && !gtkAODriver ) gtkAODriver=gstrdup( audio_driver );
while ( audio_out_drivers[i] )
{
const ao_info_t *info = audio_out_drivers[i++]->info;
if ( !strcmp( info->short_name,"plugin" ) ) continue;
- if ( gtkAODriver )
- if ( !strcmp( gtkAODriver,info->short_name ) ) old_audio_driver=i - 1;
+ if ( !strcmp( gtkAODriver,info->short_name ) ) old_audio_driver=i - 1;
tmp[0]=(char *)info->short_name; tmp[1]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLADrivers ),tmp );
}
gtk_clist_select_row( GTK_CLIST( CLADrivers ),old_audio_driver,0 );
@@ -143,12 +143,21 @@ void ShowPreferences( void )
int i = 0, c = 0;
char * tmp[3]; tmp[2]="";
old_video_driver=0;
+ if ( video_driver && !gtkVODriver )
+ {
+ while ( video_out_drivers[i] )
+ if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
+ {
+ const vo_info_t *info = video_out_drivers[i - 1]->get_info();
+ if ( !gstrcmp( video_driver,info->short_name ) ) gtkVODriver=gstrdup( video_driver );
+ }
+ }
+ i=0;
while ( video_out_drivers[i] )
if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
{
const vo_info_t *info = video_out_drivers[i - 1]->get_info();
- if ( gtkVODriver )
- if ( !strcmp( gtkVODriver,info->short_name ) ) old_video_driver=c; c++;
+ if ( !gstrcmp( gtkVODriver,info->short_name ) ) old_video_driver=c; c++;
tmp[0]=(char *)info->short_name; tmp[1]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLVDrivers ),tmp );
}
gtk_clist_select_row( GTK_CLIST( CLVDrivers ),old_video_driver,0 );
@@ -228,7 +237,7 @@ void ShowPreferences( void )
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 );
- gtkVPreferences=1; gtkIncVisible();
+ gtkVPreferences=1;
gtk_widget_show( Preferences );
gtkSetLayer( Preferences );
gtkMessageBox( GTK_MB_WARNING,MSGTR_PREFERENCES_Message );
@@ -237,7 +246,7 @@ void ShowPreferences( void )
void HidePreferences( void )
{
if ( !gtkVPreferences ) return;
- gtkVPreferences=0; gtkDecVisible();
+ gtkVPreferences=0;
gtk_widget_hide( Preferences ); gtk_widget_destroy( Preferences );
HideOSSConfig();
}
@@ -1465,7 +1474,7 @@ void ShowOSSConfig( void )
gtk_widget_show( OSSConfig );
gtkSetLayer( OSSConfig );
- gtkVOSSConfig=1; gtkIncVisible();
+ gtkVOSSConfig=1;
}
void HideOSSConfig( void )
@@ -1473,7 +1482,7 @@ void HideOSSConfig( void )
if ( !gtkVOSSConfig ) return;
gtk_widget_hide( OSSConfig );
gtk_widget_destroy( OSSConfig );
- gtkVOSSConfig=0; gtkDecVisible();
+ gtkVOSSConfig=0;
}
static void ossDestroy( GtkObject * object,gpointer user_data )
diff --git a/Gui/mplayer/gtk/pl.c b/Gui/mplayer/gtk/pl.c
index f68352f32f..1855019674 100644
--- a/Gui/mplayer/gtk/pl.c
+++ b/Gui/mplayer/gtk/pl.c
@@ -169,7 +169,7 @@ void ShowPlayList( void )
}
gtk_clist_thaw( GTK_CLIST( CLSelected ) );
- gtk_widget_show( PlayList ); gtkIncVisible();
+ gtk_widget_show( PlayList );
}
void HidePlayList( void )
@@ -180,7 +180,7 @@ void HidePlayList( void )
if ( CLFileSelected ) free( CLFileSelected ); CLFileSelected=NULL;
if ( old_path ) free( old_path ); old_path=strdup( current_path );
gtk_widget_hide( PlayList );
- gtk_widget_destroy( PlayList ); gtkDecVisible();
+ gtk_widget_destroy( PlayList );
}
static void plDestroy( GtkObject * object,gpointer user_data )
diff --git a/Gui/mplayer/gtk/sb.c b/Gui/mplayer/gtk/sb.c
index 4a90386920..c9647fd503 100644
--- a/Gui/mplayer/gtk/sb.c
+++ b/Gui/mplayer/gtk/sb.c
@@ -29,13 +29,12 @@ void ShowSkinBrowser( void )
{
if ( gtkVSkinBrowser ) gtkActive( SkinBrowser );
else SkinBrowser=create_SkinBrowser();
- gtkIncVisible();
}
void HideSkinBrowser( void )
{
if ( !gtkVSkinBrowser ) return;
- gtkVSkinBrowser=0; gtkDecVisible();
+ gtkVSkinBrowser=0;
gtk_widget_destroy( SkinBrowser );
}
diff --git a/Gui/mplayer/gtk/url.c b/Gui/mplayer/gtk/url.c
index fcfd0d6e6d..7b35e4d893 100644
--- a/Gui/mplayer/gtk/url.c
+++ b/Gui/mplayer/gtk/url.c
@@ -34,7 +34,7 @@ void ShowURLDialogBox( void )
}
gtk_widget_show( URL );
- gtkVURLDialogBox=1; gtkIncVisible();
+ gtkVURLDialogBox=1;
}
void HideURLDialogBox( void )
@@ -42,7 +42,7 @@ void HideURLDialogBox( void )
if ( !gtkVURLDialogBox ) return;
gtk_widget_hide( URL );
gtk_widget_destroy( URL );
- gtkVURLDialogBox=0; gtkDecVisible();
+ gtkVURLDialogBox=0;
}
static gboolean on_URL_destroy_event( GtkWidget * widget,GdkEvent * event,gpointer user_data )
diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h
index 72220ecded..b82437a71d 100644
--- a/Gui/mplayer/mw.h
+++ b/Gui/mplayer/mw.h
@@ -263,7 +263,6 @@ play_dvd_2:
case evPlaySwitchToPause:
play:
- mplMainAutoPlay=0;
if ( ( msg == evPlaySwitchToPause )&&( guiIntfStruct.Playing == 2 ) ) goto NoPause;
vcd_track=0;
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
index d51328132e..d0b88fc1cf 100644
--- a/Gui/mplayer/play.c
+++ b/Gui/mplayer/play.c
@@ -102,6 +102,8 @@ void mplEnd( void )
}
else
{
+ if ( mplMainAutoPlay ) { mplMainAutoPlay=0; return; }
+
guiIntfStruct.TimeSec=0;
guiIntfStruct.Position=0;
guiIntfStruct.AudioType=0;
diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c
index bad3a27609..aea04e6481 100644
--- a/Gui/mplayer/widgets.c
+++ b/Gui/mplayer/widgets.c
@@ -38,7 +38,6 @@ GtkWidget * ErrorPixmap;
int gtkPopupMenu = 0;
int gtkPopupMenuParam = 0;
int gtkInited = 0;
-int gtkVisible = 0;
#include "gtk/sb.h"
#include "gtk/pl.h"
@@ -117,8 +116,7 @@ void gtkSetDefaultToCList( GtkWidget * list,char * item )
void gtkEventHandling( void )
{
int i;
- if ( gtkVisible > 0 )
- for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 );
+ for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 );
}
// --- funcs
@@ -185,7 +183,7 @@ void gtkShow( int type,char * param )
}
else
{
- gtk_widget_destroy( SkinBrowser ); gtkDecVisible();
+ gtk_widget_destroy( SkinBrowser );
gtkMessageBox( GTK_MB_ERROR,"Skin dirs not found ... Please install skins." );
}
break;
@@ -219,13 +217,12 @@ void gtkShow( int type,char * param )
case evShowPopUpMenu:
gtkPopupMenu=evNone;
gtkPopupMenuParam=0;
- if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); gtkDecVisible(); }
+ if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); }
PopUpMenu=create_PopUpMenu();
gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 );
- gtkIncVisible();
break;
case evHidePopUpMenu:
- if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); /*gtkVisible--;*/ PopUpMenu=NULL; }
+ if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); PopUpMenu=NULL; }
break;
case evPlayNetwork:
ShowURLDialogBox();
@@ -233,7 +230,3 @@ void gtkShow( int type,char * param )
break;
}
}
-
-void gtkIncVisible( void ) { gtkVisible++; }
-void gtkDecVisible( void ) { if ( gtkVisible > 0 ) gtkVisible--; }
-
diff --git a/Gui/mplayer/widgets.h b/Gui/mplayer/widgets.h
index d14ea77e69..fa11836e94 100644
--- a/Gui/mplayer/widgets.h
+++ b/Gui/mplayer/widgets.h
@@ -41,8 +41,6 @@ extern GdkBitmap * gtkIconMask;
extern Pixmap guiIcon;
extern Pixmap guiIconMask;
-extern int gtkVisible;
-
extern void widgetsCreate( void );
extern void gtkInit( void );
@@ -61,7 +59,4 @@ extern void gtkMessageBox( int type,gchar * str );
extern void gtkSetLayer( GtkWidget * wdg );
extern void gtkActive( GtkWidget * wdg );
-extern void gtkIncVisible( void );
-extern void gtkDecVisible( void );
-
#endif