Mercurial > mplayer.hg
comparison gui/dialog/preferences.c @ 36584:5fec70008532
Rephrase positively.
It's is easier to understand that way.
author | ib |
---|---|
date | Tue, 21 Jan 2014 15:25:26 +0000 |
parents | a1a82a21b30c |
children | 4e5366f99306 |
comparison
equal
deleted
inserted
replaced
36583:322ffa4a22d2 | 36584:5fec70008532 |
---|---|
137 static GtkWidget * HSFPS; | 137 static GtkWidget * HSFPS; |
138 | 138 |
139 static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj; | 139 static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj; |
140 static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSPPQualityadj, * HSFPSadj; | 140 static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSPPQualityadj, * HSFPSadj; |
141 | 141 |
142 #ifndef CONFIG_FREETYPE | 142 #ifdef CONFIG_FREETYPE |
143 static GtkWidget * HSFontFactor; | |
144 static GtkAdjustment * HSFontFactoradj; | |
145 #else | |
146 static GtkWidget * HSFontBlur, * HSFontOutLine, * HSFontTextScale, * HSFontOSDScale; | 143 static GtkWidget * HSFontBlur, * HSFontOutLine, * HSFontTextScale, * HSFontOSDScale; |
147 static GtkAdjustment * HSFontBluradj, * HSFontOutLineadj, * HSFontTextScaleadj, * HSFontOSDScaleadj; | 144 static GtkAdjustment * HSFontBluradj, * HSFontOutLineadj, * HSFontTextScaleadj, * HSFontOSDScaleadj; |
148 static GtkWidget * CBFontEncoding, * EFontEncoding; | 145 static GtkWidget * CBFontEncoding, * EFontEncoding; |
149 static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal; | 146 static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal; |
150 //static GtkWidget * AutoScale; | 147 //static GtkWidget * AutoScale; |
148 #else | |
149 static GtkWidget * HSFontFactor; | |
150 static GtkAdjustment * HSFontFactoradj; | |
151 #endif | 151 #endif |
152 | 152 |
153 #ifdef CONFIG_ICONV | 153 #ifdef CONFIG_ICONV |
154 static GtkWidget * CBSubEncoding, * ESubEncoding; | 154 static GtkWidget * CBSubEncoding, * ESubEncoding; |
155 #endif | 155 #endif |
325 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ) ) ) osd_level=3; | 325 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ) ) ) osd_level=3; |
326 | 326 |
327 | 327 |
328 /* 4th page */ | 328 /* 4th page */ |
329 setdup( &font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); | 329 setdup( &font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); |
330 #ifndef CONFIG_FREETYPE | 330 #ifdef CONFIG_FREETYPE |
331 mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); | |
332 #else | |
333 mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); | 331 mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); |
334 mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); | 332 mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); |
335 mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); | 333 mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); |
336 mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); | 334 mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); |
337 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,0,0 ); | 335 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,0,0 ); |
338 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,1,0 ); | 336 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,1,0 ); |
339 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,2,0 ); | 337 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,2,0 ); |
340 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,3,0 ); | 338 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,3,0 ); |
339 #else | |
340 mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); | |
341 #endif | 341 #endif |
342 | 342 |
343 /* -- 5th page */ | 343 /* -- 5th page */ |
344 force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) ); | 344 force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) ); |
345 index_mode=-1; | 345 index_mode=-1; |
438 sub_delay=HSSubDelayadj->value; | 438 sub_delay=HSSubDelayadj->value; |
439 break; | 439 break; |
440 case 4: // sub position | 440 case 4: // sub position |
441 sub_pos=(int)HSSubPositionadj->value; | 441 sub_pos=(int)HSSubPositionadj->value; |
442 break; | 442 break; |
443 #ifndef CONFIG_FREETYPE | 443 #ifdef CONFIG_FREETYPE |
444 case 5: // font factor | |
445 mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); | |
446 break; | |
447 #else | |
448 case 6: // font blur | 444 case 6: // font blur |
449 mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); | 445 mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); |
450 break; | 446 break; |
451 case 7: // font outline | 447 case 7: // font outline |
452 mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); | 448 mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); |
454 case 8: // text scale | 450 case 8: // text scale |
455 mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); | 451 mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); |
456 break; | 452 break; |
457 case 9: // osd scale | 453 case 9: // osd scale |
458 mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); | 454 mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); |
455 break; | |
456 #else | |
457 case 5: // font factor | |
458 mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); | |
459 break; | 459 break; |
460 #endif | 460 #endif |
461 case 10: // auto quality | 461 case 10: // auto quality |
462 mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); | 462 mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); |
463 break; | 463 break; |
880 gtk_box_pack_start( GTK_BOX( hbox6 ),prEFontName,TRUE,TRUE,0 ); | 880 gtk_box_pack_start( GTK_BOX( hbox6 ),prEFontName,TRUE,TRUE,0 ); |
881 hbuttonbox5=gtkAddHButtonBox( hbox6 ); | 881 hbuttonbox5=gtkAddHButtonBox( hbox6 ); |
882 gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 ); | 882 gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 ); |
883 BLoadFont=gtkAddButton( MSGTR_Browse,hbuttonbox5 ); | 883 BLoadFont=gtkAddButton( MSGTR_Browse,hbuttonbox5 ); |
884 | 884 |
885 #ifndef CONFIG_FREETYPE | 885 #ifdef CONFIG_FREETYPE |
886 hbox7=gtkAddHBox( vbox603,1 ); | |
887 gtkAddLabel( MSGTR_PREFERENCES_FontFactor,hbox7 ); | |
888 HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) ); | |
889 HSFontFactor=gtkAddHScale( HSFontFactoradj,hbox7,2 ); | |
890 #else | |
891 | 886 |
892 RBFontNoAutoScale=gtkAddRadioButton( MSGTR_PREFERENCES_FontNoAutoScale,&Font_group,vbox603 ); | 887 RBFontNoAutoScale=gtkAddRadioButton( MSGTR_PREFERENCES_FontNoAutoScale,&Font_group,vbox603 ); |
893 RBFontAutoScaleHeight=gtkAddRadioButton( MSGTR_PREFERENCES_FontPropHeight,&Font_group,vbox603 ); | 888 RBFontAutoScaleHeight=gtkAddRadioButton( MSGTR_PREFERENCES_FontPropHeight,&Font_group,vbox603 ); |
894 RBFontAutoScaleWidth=gtkAddRadioButton( MSGTR_PREFERENCES_FontPropWidth,&Font_group,vbox603 ); | 889 RBFontAutoScaleWidth=gtkAddRadioButton( MSGTR_PREFERENCES_FontPropWidth,&Font_group,vbox603 ); |
895 RBFontAutoScaleDiagonal=gtkAddRadioButton( MSGTR_PREFERENCES_FontPropDiagonal,&Font_group,vbox603 ); | 890 RBFontAutoScaleDiagonal=gtkAddRadioButton( MSGTR_PREFERENCES_FontPropDiagonal,&Font_group,vbox603 ); |
940 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | 935 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); |
941 | 936 |
942 HSFontOSDScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) ); | 937 HSFontOSDScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) ); |
943 HSFontOSDScale=gtkAddHScale( HSFontOSDScaleadj,NULL,2 ); | 938 HSFontOSDScale=gtkAddHScale( HSFontOSDScaleadj,NULL,2 ); |
944 gtk_table_attach( GTK_TABLE( table1 ),HSFontOSDScale,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); | 939 gtk_table_attach( GTK_TABLE( table1 ),HSFontOSDScale,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); |
940 #else | |
941 hbox7=gtkAddHBox( vbox603,1 ); | |
942 gtkAddLabel( MSGTR_PREFERENCES_FontFactor,hbox7 ); | |
943 HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) ); | |
944 HSFontFactor=gtkAddHScale( HSFontFactoradj,hbox7,2 ); | |
945 #endif | 945 #endif |
946 | 946 |
947 label=gtkAddLabel( MSGTR_PREFERENCES_FRAME_Font,NULL ); | 947 label=gtkAddLabel( MSGTR_PREFERENCES_FRAME_Font,NULL ); |
948 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),3 ),label ); | 948 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),3 ),label ); |
949 | 949 |
1265 #endif | 1265 #endif |
1266 | 1266 |
1267 /* 4th page */ | 1267 /* 4th page */ |
1268 /* font ... */ | 1268 /* font ... */ |
1269 if ( font_name ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name ); | 1269 if ( font_name ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name ); |
1270 #ifndef CONFIG_FREETYPE | 1270 #ifdef CONFIG_FREETYPE |
1271 gtk_adjustment_set_value( HSFontFactoradj,font_factor ); | |
1272 #else | |
1273 gtk_adjustment_set_value( HSFontBluradj,subtitle_font_radius / 8.0 * 100.0); // transform 0..8 to 0..100 | 1271 gtk_adjustment_set_value( HSFontBluradj,subtitle_font_radius / 8.0 * 100.0); // transform 0..8 to 0..100 |
1274 gtk_adjustment_set_value( HSFontOutLineadj,subtitle_font_thickness / 8.0 * 100.0); // transform 0..8 to 0..100 | 1272 gtk_adjustment_set_value( HSFontOutLineadj,subtitle_font_thickness / 8.0 * 100.0); // transform 0..8 to 0..100 |
1275 gtk_adjustment_set_value( HSFontTextScaleadj,text_font_scale_factor ); | 1273 gtk_adjustment_set_value( HSFontTextScaleadj,text_font_scale_factor ); |
1276 gtk_adjustment_set_value( HSFontOSDScaleadj,osd_font_scale_factor ); | 1274 gtk_adjustment_set_value( HSFontOSDScaleadj,osd_font_scale_factor ); |
1277 { | 1275 { |
1286 case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ),TRUE ); break; | 1284 case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ),TRUE ); break; |
1287 case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ),TRUE ); break; | 1285 case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ),TRUE ); break; |
1288 case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ),TRUE ); break; | 1286 case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ),TRUE ); break; |
1289 case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ),TRUE ); break; | 1287 case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ),TRUE ); break; |
1290 } | 1288 } |
1289 #else | |
1290 gtk_adjustment_set_value( HSFontFactoradj,font_factor ); | |
1291 #endif | 1291 #endif |
1292 | 1292 |
1293 /* 5th page */ | 1293 /* 5th page */ |
1294 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni ); | 1294 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni ); |
1295 if ( index_mode == 1 ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),1 ); | 1295 if ( index_mode == 1 ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),1 ); |
1389 gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 ); | 1389 gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 ); |
1390 gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 ); | 1390 gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 ); |
1391 gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 ); | 1391 gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 ); |
1392 gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 ); | 1392 gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 ); |
1393 gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 ); | 1393 gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 ); |
1394 #ifndef CONFIG_FREETYPE | 1394 #ifdef CONFIG_FREETYPE |
1395 gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 ); | |
1396 #else | |
1397 gtk_signal_connect( GTK_OBJECT( HSFontBlur ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)6 ); | 1395 gtk_signal_connect( GTK_OBJECT( HSFontBlur ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)6 ); |
1398 gtk_signal_connect( GTK_OBJECT( HSFontOutLine ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)7 ); | 1396 gtk_signal_connect( GTK_OBJECT( HSFontOutLine ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)7 ); |
1399 gtk_signal_connect( GTK_OBJECT( HSFontTextScale ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)8 ); | 1397 gtk_signal_connect( GTK_OBJECT( HSFontTextScale ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)8 ); |
1400 gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 ); | 1398 gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 ); |
1401 gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 ); | 1399 gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 ); |
1400 #else | |
1401 gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 ); | |
1402 #endif | 1402 #endif |
1403 #ifdef CONFIG_ICONV | 1403 #ifdef CONFIG_ICONV |
1404 gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); | 1404 gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); |
1405 #endif | 1405 #endif |
1406 gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); | 1406 gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion-notify-event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); |