comparison gui/mplayer/gtk/opts.c @ 27341:e7c989f7a7c9

Start unifying names of internal preprocessor directives. Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable.
author diego
date Wed, 30 Jul 2008 12:01:30 +0000
parents b0a7b35b78d2
children 5fe6a8adf569
comparison
equal deleted inserted replaced
27340:33274ce3cce0 27341:e7c989f7a7c9
131 static GtkWidget * CBFontEncoding, * EFontEncoding; 131 static GtkWidget * CBFontEncoding, * EFontEncoding;
132 static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal; 132 static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal;
133 //static GtkWidget * AutoScale; 133 //static GtkWidget * AutoScale;
134 #endif 134 #endif
135 135
136 #ifdef USE_ICONV 136 #ifdef CONFIG_ICONV
137 static GtkWidget * CBSubEncoding, * ESubEncoding; 137 static GtkWidget * CBSubEncoding, * ESubEncoding;
138 #endif 138 #endif
139 139
140 #if defined( HAVE_FREETYPE ) || defined( USE_ICONV ) 140 #if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV)
141 static struct 141 static struct
142 { 142 {
143 char * name; 143 char * name;
144 char * comment; 144 char * comment;
145 } lEncoding[] = 145 } lEncoding[] =
186 void HideAudioConfig(); 186 void HideAudioConfig();
187 187
188 static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ); 188 static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data );
189 static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ); 189 static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
190 static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ); 190 static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
191 #if defined( HAVE_FREETYPE ) || defined( USE_ICONV ) 191 #if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV)
192 static void prEntry( GtkContainer * container,gpointer user_data ); 192 static void prEntry( GtkContainer * container,gpointer user_data );
193 #endif 193 #endif
194 194
195 extern int stop_xscreensaver; 195 extern int stop_xscreensaver;
196 196
282 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubOverlap ),suboverlap_enabled ); 282 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubOverlap ),suboverlap_enabled );
283 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ),!sub_auto ); 283 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ),!sub_auto );
284 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub ); 284 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub );
285 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt ); 285 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt );
286 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),sub_unicode ); 286 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),sub_unicode );
287 #ifdef USE_ASS 287 #ifdef CONFIG_ASS
288 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBUseASS ),gtkASS.enabled ); 288 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBUseASS ),gtkASS.enabled );
289 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ),gtkASS.use_margins ); 289 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ),gtkASS.use_margins );
290 gtk_spin_button_set_value( (GtkSpinButton *)SBASSTopMargin,(gdouble)gtkASS.top_margin ); 290 gtk_spin_button_set_value( (GtkSpinButton *)SBASSTopMargin,(gdouble)gtkASS.top_margin );
291 gtk_spin_button_set_value( (GtkSpinButton *)SBASSBottomMargin,(gdouble)gtkASS.bottom_margin ); 291 gtk_spin_button_set_value( (GtkSpinButton *)SBASSBottomMargin,(gdouble)gtkASS.bottom_margin );
292 292
310 } 310 }
311 #if 0 311 #if 0
312 if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename ); 312 if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename );
313 #endif 313 #endif
314 314
315 #ifdef USE_ICONV 315 #ifdef CONFIG_ICONV
316 if ( sub_cp ) 316 if ( sub_cp )
317 { 317 {
318 int i; 318 int i;
319 for ( i=0;lEncoding[i].name;i++ ) 319 for ( i=0;lEncoding[i].name;i++ )
320 if ( !gstrcmp( sub_cp,lEncoding[i].name ) ) break; 320 if ( !gstrcmp( sub_cp,lEncoding[i].name ) ) break;
419 else gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),DEFAULT_DVD_DEVICE ); 419 else gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),DEFAULT_DVD_DEVICE );
420 if ( cdrom_device ) gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),cdrom_device ); 420 if ( cdrom_device ) gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),cdrom_device );
421 else gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),DEFAULT_CDROM_DEVICE ); 421 else gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),DEFAULT_CDROM_DEVICE );
422 422
423 // -- disables 423 // -- disables
424 #ifndef USE_ASS 424 #ifndef CONFIG_ASS
425 gtk_widget_set_sensitive( CBUseASS,FALSE ); 425 gtk_widget_set_sensitive( CBUseASS,FALSE );
426 gtk_widget_set_sensitive( CBASSUseMargins,FALSE ); 426 gtk_widget_set_sensitive( CBASSUseMargins,FALSE );
427 gtk_widget_set_sensitive( SBASSTopMargin,FALSE ); 427 gtk_widget_set_sensitive( SBASSTopMargin,FALSE );
428 gtk_widget_set_sensitive( SBASSBottomMargin,FALSE ); 428 gtk_widget_set_sensitive( SBASSBottomMargin,FALSE );
429 #endif 429 #endif
440 gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)6 ); 440 gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)6 );
441 gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleDiagonal ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)7 ); 441 gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleDiagonal ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)7 );
442 #endif 442 #endif
443 gtk_signal_connect( GTK_OBJECT( CBCache ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)8); 443 gtk_signal_connect( GTK_OBJECT( CBCache ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)8);
444 gtk_signal_connect( GTK_OBJECT( CBAutoSync ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)9); 444 gtk_signal_connect( GTK_OBJECT( CBAutoSync ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)9);
445 #ifdef USE_ASS 445 #ifdef CONFIG_ASS
446 gtk_signal_connect( GTK_OBJECT( CBUseASS ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)10); 446 gtk_signal_connect( GTK_OBJECT( CBUseASS ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)10);
447 #endif 447 #endif
448 448
449 gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 ); 449 gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 );
450 gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 ); 450 gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 );
458 gtk_signal_connect( GTK_OBJECT( HSFontOutLine ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)7 ); 458 gtk_signal_connect( GTK_OBJECT( HSFontOutLine ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)7 );
459 gtk_signal_connect( GTK_OBJECT( HSFontTextScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)8 ); 459 gtk_signal_connect( GTK_OBJECT( HSFontTextScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)8 );
460 gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 ); 460 gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 );
461 gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 ); 461 gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 );
462 #endif 462 #endif
463 #ifdef USE_ICONV 463 #ifdef CONFIG_ICONV
464 gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); 464 gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 );
465 #endif 465 #endif
466 gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); 466 gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 );
467 467
468 gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 ); 468 gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 );
490 #ifdef HAVE_DXR3 490 #ifdef HAVE_DXR3
491 HideDXR3Config(); 491 HideDXR3Config();
492 #endif 492 #endif
493 } 493 }
494 494
495 #if defined( HAVE_FREETYPE ) || defined( USE_ICONV ) 495 #if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV)
496 static void prEntry( GtkContainer * container,gpointer user_data ) 496 static void prEntry( GtkContainer * container,gpointer user_data )
497 { 497 {
498 const char * comment; 498 const char * comment;
499 int i; 499 int i;
500 500
506 for ( i=0;lEncoding[i].name;i++ ) 506 for ( i=0;lEncoding[i].name;i++ )
507 if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; 507 if ( !gstrcmp( lEncoding[i].comment,comment ) ) break;
508 if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name ); 508 if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name );
509 break; 509 break;
510 #endif 510 #endif
511 #ifdef USE_ICONV 511 #ifdef CONFIG_ICONV
512 case 1: // sub encoding 512 case 1: // sub encoding
513 comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); 513 comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) );
514 for ( i=0;lEncoding[i].name;i++ ) 514 for ( i=0;lEncoding[i].name;i++ )
515 if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; 515 if ( !gstrcmp( lEncoding[i].comment,comment ) ) break;
516 if ( lEncoding[i].comment ) gtkSet( gtkSetSubEncoding,0,lEncoding[i].name ); 516 if ( lEncoding[i].comment ) gtkSet( gtkSetSubEncoding,0,lEncoding[i].name );
561 suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) ); 561 suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) );
562 sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ); 562 sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) );
563 gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) ); 563 gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) );
564 gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) ); 564 gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) );
565 sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) ); 565 sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) );
566 #ifdef USE_ASS 566 #ifdef CONFIG_ASS
567 gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ); 567 gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) );
568 gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) ); 568 gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) );
569 gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) ); 569 gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) );
570 gtkASS.bottom_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSBottomMargin ) ); 570 gtkASS.bottom_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSBottomMargin ) );
571 #endif 571 #endif
749 break; 749 break;
750 case 9: 750 case 9:
751 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE ); 751 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE );
752 else gtk_widget_set_sensitive( SBAutoSync,FALSE ); 752 else gtk_widget_set_sensitive( SBAutoSync,FALSE );
753 break; 753 break;
754 #ifdef USE_ASS 754 #ifdef CONFIG_ASS
755 case 10: 755 case 10:
756 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) ) 756 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) )
757 { 757 {
758 gtk_widget_set_sensitive( CBASSUseMargins,TRUE ); 758 gtk_widget_set_sensitive( CBASSUseMargins,TRUE );
759 gtk_widget_set_sensitive( SBASSTopMargin,TRUE ); 759 gtk_widget_set_sensitive( SBASSTopMargin,TRUE );
1028 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); 1028 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
1029 1029
1030 label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL ); 1030 label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL );
1031 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); 1031 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
1032 1032
1033 #ifdef USE_ICONV 1033 #ifdef CONFIG_ICONV
1034 label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL ); 1034 label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL );
1035 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); 1035 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
1036 #endif 1036 #endif
1037 1037
1038 HSSubDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10.0,10,0.01,0,0 ) ); 1038 HSSubDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10.0,10,0.01,0,0 ) );
1049 gtk_widget_show( HSSubFPS ); 1049 gtk_widget_show( HSSubFPS );
1050 gtk_widget_set_usize( HSSubFPS,60,-1 ); 1050 gtk_widget_set_usize( HSSubFPS,60,-1 );
1051 gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE ); 1051 gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE );
1052 gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); 1052 gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
1053 1053
1054 #ifdef USE_ICONV 1054 #ifdef CONFIG_ICONV
1055 CBSubEncoding=gtk_combo_new(); 1055 CBSubEncoding=gtk_combo_new();
1056 gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" ); 1056 gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" );
1057 gtk_widget_show( CBSubEncoding ); 1057 gtk_widget_show( CBSubEncoding );
1058 gtk_table_attach( GTK_TABLE( table1 ),CBSubEncoding,1,2,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); 1058 gtk_table_attach( GTK_TABLE( table1 ),CBSubEncoding,1,2,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
1059 CBSubEncoding_items=g_list_append( CBSubEncoding_items,MSGTR_PREFERENCES_None ); 1059 CBSubEncoding_items=g_list_append( CBSubEncoding_items,MSGTR_PREFERENCES_None );
1371 gtk_window_add_accel_group( GTK_WINDOW( Preferences ),accel_group ); 1371 gtk_window_add_accel_group( GTK_WINDOW( Preferences ),accel_group );
1372 1372
1373 return Preferences; 1373 return Preferences;
1374 } 1374 }
1375 1375
1376 #ifdef USE_OSS_AUDIO 1376 #ifdef CONFIG_OSS_AUDIO
1377 GList *appendOSSDevices(GList *l) { 1377 GList *appendOSSDevices(GList *l) {
1378 // careful! the current implementation allows only string constants! 1378 // careful! the current implementation allows only string constants!
1379 l = g_list_append(l, (gpointer)"/dev/dsp"); 1379 l = g_list_append(l, (gpointer)"/dev/dsp");
1380 if (gtkAOOSSDevice && strncmp(gtkAOOSSDevice, "/dev/sound", 10) == 0) { 1380 if (gtkAOOSSDevice && strncmp(gtkAOOSSDevice, "/dev/sound", 10) == 0) {
1381 l = g_list_append(l, (gpointer)"/dev/sound/dsp0"); 1381 l = g_list_append(l, (gpointer)"/dev/sound/dsp0");
1460 l = g_list_append(l, (gpointer)"nas"); 1460 l = g_list_append(l, (gpointer)"nas");
1461 return l; 1461 return l;
1462 } 1462 }
1463 #endif 1463 #endif
1464 1464
1465 #ifdef USE_ESD 1465 #ifdef CONFIG_ESD
1466 GList *appendESDDevices(GList *l) { 1466 GList *appendESDDevices(GList *l) {
1467 l = g_list_append(l, (gpointer)"Enter Remote IP"); 1467 l = g_list_append(l, (gpointer)"Enter Remote IP");
1468 l = g_list_append(l, (gpointer)"Use Software Mixer"); 1468 l = g_list_append(l, (gpointer)"Use Software Mixer");
1469 return l; 1469 return l;
1470 } 1470 }
1501 1501
1502 void ShowAudioConfig() { 1502 void ShowAudioConfig() {
1503 if (AudioConfig) gtkActive(AudioConfig); 1503 if (AudioConfig) gtkActive(AudioConfig);
1504 else AudioConfig = create_AudioConfig(); 1504 else AudioConfig = create_AudioConfig();
1505 1505
1506 #ifdef USE_OSS_AUDIO 1506 #ifdef CONFIG_OSS_AUDIO
1507 if (strncmp(ao_driver[0], "oss", 3) == 0) { 1507 if (strncmp(ao_driver[0], "oss", 3) == 0) {
1508 setGtkEntryText(CEAudioDevice, gtkAOOSSDevice); 1508 setGtkEntryText(CEAudioDevice, gtkAOOSSDevice);
1509 setGtkEntryText(CEAudioMixer, gtkAOOSSMixer); 1509 setGtkEntryText(CEAudioMixer, gtkAOOSSMixer);
1510 setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel); 1510 setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel);
1511 } 1511 }
1520 #ifdef HAVE_SDL 1520 #ifdef HAVE_SDL
1521 if (strncmp(ao_driver[0], "sdl", 3) == 0) { 1521 if (strncmp(ao_driver[0], "sdl", 3) == 0) {
1522 setGtkEntryText(CEAudioDevice, gtkAOSDLDriver); 1522 setGtkEntryText(CEAudioDevice, gtkAOSDLDriver);
1523 } 1523 }
1524 #endif 1524 #endif
1525 #ifdef USE_ESD 1525 #ifdef CONFIG_ESD
1526 if (strncmp(ao_driver[0], "esd", 3) == 0) { 1526 if (strncmp(ao_driver[0], "esd", 3) == 0) {
1527 setGtkEntryText(CEAudioDevice, gtkAOESDDevice); 1527 setGtkEntryText(CEAudioDevice, gtkAOESDDevice);
1528 } 1528 }
1529 #endif 1529 #endif
1530 1530
1540 } 1540 }
1541 1541
1542 static void audioButton(GtkButton *button, gpointer user_data) { 1542 static void audioButton(GtkButton *button, gpointer user_data) {
1543 switch( (int)user_data ) { 1543 switch( (int)user_data ) {
1544 case 1: 1544 case 1:
1545 #ifdef USE_OSS_AUDIO 1545 #ifdef CONFIG_OSS_AUDIO
1546 if (strncmp(ao_driver[0], "oss", 3) == 0) { 1546 if (strncmp(ao_driver[0], "oss", 3) == 0) {
1547 gfree(&gtkAOOSSDevice); 1547 gfree(&gtkAOOSSDevice);
1548 gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice)); 1548 gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice));
1549 gfree(&gtkAOOSSMixer); 1549 gfree(&gtkAOOSSMixer);
1550 gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixer)); 1550 gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixer));
1566 if (strncmp(ao_driver[0], "sdl", 3) == 0) { 1566 if (strncmp(ao_driver[0], "sdl", 3) == 0) {
1567 gfree(&gtkAOSDLDriver); 1567 gfree(&gtkAOSDLDriver);
1568 gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice)); 1568 gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice));
1569 } 1569 }
1570 #endif 1570 #endif
1571 #ifdef USE_ESD 1571 #ifdef CONFIG_ESD
1572 if (strncmp(ao_driver[0], "esd", 3) == 0) { 1572 if (strncmp(ao_driver[0], "esd", 3) == 0) {
1573 gfree(&gtkAOESDDevice); 1573 gfree(&gtkAOESDDevice);
1574 gtkAOESDDevice = gstrdup(getGtkEntryText(CEAudioDevice)); 1574 gtkAOESDDevice = gstrdup(getGtkEntryText(CEAudioDevice));
1575 } 1575 }
1576 #endif 1576 #endif
1610 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); 1610 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
1611 1611
1612 CBAudioDevice = AddComboBox(NULL); 1612 CBAudioDevice = AddComboBox(NULL);
1613 gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); 1613 gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
1614 items = g_list_append(items,(gpointer)MSGTR_PREFERENCES_DriverDefault); 1614 items = g_list_append(items,(gpointer)MSGTR_PREFERENCES_DriverDefault);
1615 #ifdef USE_OSS_AUDIO 1615 #ifdef CONFIG_OSS_AUDIO
1616 if (strncmp(ao_driver[0], "oss", 3) == 0) 1616 if (strncmp(ao_driver[0], "oss", 3) == 0)
1617 items = appendOSSDevices(items); 1617 items = appendOSSDevices(items);
1618 #endif 1618 #endif
1619 #if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) 1619 #if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
1620 if (strncmp(ao_driver[0], "alsa", 4) == 0) 1620 if (strncmp(ao_driver[0], "alsa", 4) == 0)
1622 #endif 1622 #endif
1623 #ifdef HAVE_SDL 1623 #ifdef HAVE_SDL
1624 if (strncmp(ao_driver[0], "sdl", 3) == 0) 1624 if (strncmp(ao_driver[0], "sdl", 3) == 0)
1625 items = appendSDLDevices(items); 1625 items = appendSDLDevices(items);
1626 #endif 1626 #endif
1627 #ifdef USE_ESD 1627 #ifdef CONFIG_ESD
1628 if (strncmp(ao_driver[0], "esd", 3) == 0) 1628 if (strncmp(ao_driver[0], "esd", 3) == 0)
1629 items = appendESDDevices(items); 1629 items = appendESDDevices(items);
1630 #endif 1630 #endif
1631 gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioDevice), items); 1631 gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioDevice), items);
1632 g_list_free(items); 1632 g_list_free(items);
1640 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); 1640 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
1641 1641
1642 CBAudioMixer = AddComboBox(NULL); 1642 CBAudioMixer = AddComboBox(NULL);
1643 gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); 1643 gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
1644 items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault); 1644 items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
1645 #ifdef USE_OSS_AUDIO 1645 #ifdef CONFIG_OSS_AUDIO
1646 if (strncmp(ao_driver[0], "oss", 3) == 0) 1646 if (strncmp(ao_driver[0], "oss", 3) == 0)
1647 items = appendOSSMixers(items); 1647 items = appendOSSMixers(items);
1648 #endif 1648 #endif
1649 #if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) 1649 #if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
1650 if (strncmp(ao_driver[0], "alsa", 4) == 0) 1650 if (strncmp(ao_driver[0], "alsa", 4) == 0)
1662 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); 1662 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
1663 1663
1664 CBAudioMixerChannel = AddComboBox(NULL); 1664 CBAudioMixerChannel = AddComboBox(NULL);
1665 gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); 1665 gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
1666 items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault); 1666 items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
1667 #ifdef USE_OSS_AUDIO 1667 #ifdef CONFIG_OSS_AUDIO
1668 if (strncmp(ao_driver[0], "oss", 3) == 0) 1668 if (strncmp(ao_driver[0], "oss", 3) == 0)
1669 items = appendOSSMixerChannels(items); 1669 items = appendOSSMixerChannels(items);
1670 #endif 1670 #endif
1671 #if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X) 1671 #if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
1672 if (strncmp(ao_driver[0], "alsa", 4) == 0) 1672 if (strncmp(ao_driver[0], "alsa", 4) == 0)
1705 1705
1706 static GtkWidget * DXR3Config; 1706 static GtkWidget * DXR3Config;
1707 static GtkWidget * CBDevice; 1707 static GtkWidget * CBDevice;
1708 static GtkWidget * CEDXR3Device; 1708 static GtkWidget * CEDXR3Device;
1709 static GtkWidget * RBVNone; 1709 static GtkWidget * RBVNone;
1710 #ifdef USE_LIBAVCODEC 1710 #ifdef CONFIG_LIBAVCODEC
1711 static GtkWidget * RBVLavc; 1711 static GtkWidget * RBVLavc;
1712 #endif 1712 #endif
1713 static GtkWidget * dxr3BOk; 1713 static GtkWidget * dxr3BOk;
1714 static GtkWidget * dxr3BCancel; 1714 static GtkWidget * dxr3BCancel;
1715 1715
1721 else DXR3Config=create_DXR3Config(); 1721 else DXR3Config=create_DXR3Config();
1722 1722
1723 gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),gtkDXR3Device ); 1723 gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),gtkDXR3Device );
1724 1724
1725 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVNone ),TRUE ); 1725 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVNone ),TRUE );
1726 #ifdef USE_LIBAVCODEC 1726 #ifdef CONFIG_LIBAVCODEC
1727 if ( gtkVfLAVC ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVLavc ),TRUE ); 1727 if ( gtkVfLAVC ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVLavc ),TRUE );
1728 #endif 1728 #endif
1729 1729
1730 gtk_widget_show( DXR3Config ); 1730 gtk_widget_show( DXR3Config );
1731 gtkSetLayer( DXR3Config ); 1731 gtkSetLayer( DXR3Config );
1743 { 1743 {
1744 switch ( (int)user_data ) 1744 switch ( (int)user_data )
1745 { 1745 {
1746 case 0: // Ok 1746 case 0: // Ok
1747 gfree( (void **)&gtkDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) ); 1747 gfree( (void **)&gtkDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) );
1748 #ifdef USE_LIBAVCODEC 1748 #ifdef CONFIG_LIBAVCODEC
1749 gtkVfLAVC=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBVLavc ) ); 1749 gtkVfLAVC=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBVLavc ) );
1750 #endif 1750 #endif
1751 case 1: // Cancel 1751 case 1: // Cancel
1752 HideDXR3Config(); 1752 HideDXR3Config();
1753 break; 1753 break;
1798 CEDXR3Device=GTK_COMBO( CBDevice )->entry; 1798 CEDXR3Device=GTK_COMBO( CBDevice )->entry;
1799 gtk_widget_set_name( CEDXR3Device,"CEDXR3Device" ); 1799 gtk_widget_set_name( CEDXR3Device,"CEDXR3Device" );
1800 gtk_widget_show( CEDXR3Device ); 1800 gtk_widget_show( CEDXR3Device );
1801 gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),"/dev/em8300" ); 1801 gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),"/dev/em8300" );
1802 1802
1803 #ifdef USE_LIBAVCODEC 1803 #ifdef CONFIG_LIBAVCODEC
1804 AddHSeparator( vbox2 ); 1804 AddHSeparator( vbox2 );
1805 vbox3=AddVBox( vbox2,0 ); 1805 vbox3=AddVBox( vbox2,0 );
1806 AddLabel( MSGTR_PREFERENCES_DXR3_VENC,vbox3 ); 1806 AddLabel( MSGTR_PREFERENCES_DXR3_VENC,vbox3 );
1807 RBVNone=AddRadioButton( MSGTR_PREFERENCES_None,&VEncoder_group,vbox3 ); 1807 RBVNone=AddRadioButton( MSGTR_PREFERENCES_None,&VEncoder_group,vbox3 );
1808 RBVLavc=AddRadioButton( MSGTR_PREFERENCES_DXR3_LAVC,&VEncoder_group,vbox3 ); 1808 RBVLavc=AddRadioButton( MSGTR_PREFERENCES_DXR3_LAVC,&VEncoder_group,vbox3 );