Mercurial > mplayer.hg
changeset 8933:bfe1b826cff1
add DVD and CDRom device entry's, and fix two 10l bug
author | pontscho |
---|---|
date | Sun, 12 Jan 2003 23:38:55 +0000 |
parents | 967a1d1f70c6 |
children | 90195705ae00 |
files | Gui/cfg.c Gui/mplayer/gtk/opts.c Gui/mplayer/mw.c help/help_mp-en.h mplayer.h |
diffstat | 5 files changed, 43 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/cfg.c Sun Jan 12 22:40:51 2003 +0000 +++ b/Gui/cfg.c Sun Jan 12 23:38:55 2003 +0000 @@ -106,6 +106,9 @@ #ifdef HAVE_SDL { "ao_sdl_subdriver",>kAOSDLDriver,CONF_TYPE_STRING,0,0,0,NULL }, #endif + + { "dvd_device",&dvd_device,CONF_TYPE_STRING,0,0,0,NULL }, + { "cdrom_device",&cdrom_device,CONF_TYPE_STRING,0,0,0,NULL }, { "osd_level",&osd_level,CONF_TYPE_INT,CONF_RANGE,0,3,NULL }, { "sub_auto_load",&sub_auto,CONF_TYPE_FLAG,0,0,1,NULL },
--- a/Gui/mplayer/gtk/opts.c Sun Jan 12 22:40:51 2003 +0000 +++ b/Gui/mplayer/gtk/opts.c Sun Jan 12 23:38:55 2003 +0000 @@ -40,6 +40,8 @@ //static GtkWidget * ESubtitleName; GtkWidget * prEFontName; + GtkWidget * prEDVDDevice; + GtkWidget * prECDRomDevice; static GtkWidget * EVFM; static GtkWidget * EAFM; @@ -337,6 +339,11 @@ if ( !gtkAutoSyncOn ) gtk_widget_set_sensitive( SBAutoSync,FALSE ); else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAutoSync ),TRUE ); + if ( dvd_device ) gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),dvd_device ); + else gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),DEFAULT_DVD_DEVICE ); + if ( cdrom_device ) gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),cdrom_device ); + else gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),DEFAULT_CDROM_DEVICE ); + // -- disables #ifndef USE_SUB gtk_widget_set_sensitive( AConfig,FALSE ); @@ -522,6 +529,9 @@ { gaddlist( &audio_fm_list,(char *)mpcodecs_ad_drivers[i]->info->short_name ); break; } } + guiSetFilename( dvd_device,gtk_entry_get_text( GTK_ENTRY( prEDVDDevice ) ) ); + guiSetFilename( cdrom_device,gtk_entry_get_text( GTK_ENTRY( prECDRomDevice ) ) ); + case bCancel: HidePreferences(); break; @@ -1054,6 +1064,29 @@ gtk_widget_show( SBAutoSync ); gtk_box_pack_start( GTK_BOX( hbox5 ),SBAutoSync,TRUE,TRUE,0 ); + AddHSeparator( vbox602 ); + + table1=gtk_table_new( 2,2,FALSE ); + gtk_widget_set_name( table1,"table1" ); + gtk_widget_show( table1 ); + gtk_box_pack_start( GTK_BOX( vbox602 ),table1,FALSE,FALSE,0 ); + + label=AddLabel( MSGTR_PREFERENCES_DVDDevice,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + prEDVDDevice=gtk_entry_new(); + gtk_widget_set_name( prEDVDDevice,"prEDVDDevice" ); + gtk_widget_show( prEDVDDevice ); + gtk_table_attach( GTK_TABLE( table1 ),prEDVDDevice,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + + label=AddLabel( MSGTR_PREFERENCES_CDROMDevice,NULL ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + prECDRomDevice=gtk_entry_new(); + gtk_widget_set_name( prECDRomDevice,"prECDRomDevice" ); + gtk_widget_show( prECDRomDevice ); + gtk_table_attach( GTK_TABLE( table1 ),prECDRomDevice,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + +// AddHSeparator( vbox602 ); + label=AddLabel( MSGTR_PREFERENCES_Misc,NULL ); gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),3 ),label );
--- a/Gui/mplayer/mw.c Sun Jan 12 22:40:51 2003 +0000 +++ b/Gui/mplayer/mw.c Sun Jan 12 23:38:55 2003 +0000 @@ -238,9 +238,7 @@ } extern void exit_player(char* how); -extern char * dvd_device; extern int vcd_track; -extern char * cdrom_device; extern int osd_visible; void mplEventHandling( int msg,float param ) @@ -314,7 +312,7 @@ #ifdef HAVE_VCD case STREAMTYPE_VCD: gtkSet( gtkClearStruct,0,(void *)(guiALL - guiVCD - guiFilenames) ); - if ( !cdrom_device ) cdrom_device=DEFAULT_CDROM_DEVICE; + if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE ); mplSetFileName( NULL,cdrom_device,STREAMTYPE_VCD ); if ( guiIntfStruct.Playing != 2 ) { @@ -330,7 +328,7 @@ #ifdef USE_DVDREAD case STREAMTYPE_DVD: gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) ); - if ( !dvd_device ) dvd_device=DEFAULT_DVD_DEVICE; + if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE ); mplSetFileName( NULL,dvd_device,STREAMTYPE_DVD ); if ( guiIntfStruct.Playing != 2 ) {
--- a/help/help_mp-en.h Sun Jan 12 22:40:51 2003 +0000 +++ b/help/help_mp-en.h Sun Jan 12 23:38:55 2003 +0000 @@ -571,6 +571,8 @@ #define MSGTR_PREFERENCES_XSCREENSAVER "Stop XScreenSaver" #define MSGTR_PREFERENCES_AutoSync "AutoSync on/off" #define MSGTR_PREFERENCES_AutoSyncValue "Autosync: " +#define MSGTR_PREFERENCES_CDROMDevice "CD-Rom device:" +#define MSGTR_PREFERENCES_DVDDevice "DVD device:" // --- messagebox #define MSGTR_MSGBOX_LABEL_FatalError "Fatal error!"
--- a/mplayer.h Sun Jan 12 22:40:51 2003 +0000 +++ b/mplayer.h Sun Jan 12 23:38:55 2003 +0000 @@ -9,6 +9,9 @@ extern char* current_module; extern int vcd_track; +extern char * dvd_device; +extern char * cdrom_device; + extern char ** audio_fm_list; extern char ** video_fm_list; extern char ** video_driver_list;