mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
add DVD and CDRom device entry's, and fix two 10l bug
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8934 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7b00975227
commit
906ad7fdb9
@ -106,6 +106,9 @@ static config_t gui_opts[] =
|
||||
#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 },
|
||||
|
@ -40,6 +40,8 @@ static GtkWidget * CLVDrivers;
|
||||
|
||||
//static GtkWidget * ESubtitleName;
|
||||
GtkWidget * prEFontName;
|
||||
GtkWidget * prEDVDDevice;
|
||||
GtkWidget * prECDRomDevice;
|
||||
static GtkWidget * EVFM;
|
||||
static GtkWidget * EAFM;
|
||||
|
||||
@ -337,6 +339,11 @@ void ShowPreferences( void )
|
||||
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 @@ void prButton( GtkButton * button,gpointer user_data )
|
||||
{ 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 @@ GtkWidget * create_Preferences( void )
|
||||
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 );
|
||||
|
||||
|
@ -238,9 +238,7 @@ void mplMainDraw( void )
|
||||
}
|
||||
|
||||
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 @@ play:
|
||||
#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 @@ play:
|
||||
#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 )
|
||||
{
|
||||
|
@ -571,6 +571,8 @@ static char help_text[]=
|
||||
#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!"
|
||||
|
Loading…
Reference in New Issue
Block a user