# HG changeset patch # User ib # Date 1390237787 0 # Node ID d22374047528d2f64b95b4c79e1289504acbb0b9 # Parent 5e8ada8eae44e4971d87cafc0f903e9d36d0dd13 Improve the dialog for subtitle encodings with iconv. Disable the check buttons for options 'sub_utf8' and 'sub_unicode' in case option 'sub_cp' is active. diff -r 5e8ada8eae44 -r d22374047528 gui/dialog/preferences.c --- a/gui/dialog/preferences.c Mon Jan 20 16:45:13 2014 +0000 +++ b/gui/dialog/preferences.c Mon Jan 20 17:09:47 2014 +0000 @@ -245,6 +245,8 @@ if ( strcmp( comment,MSGTR_PREFERENCES_DefaultEnc ) == 0 ) comment=NULL; mplayer( MPLAYER_SET_SUB_ENCODING,0,(char *)comment ); } + gtk_widget_set_sensitive( CBSubUtf8,(comment == NULL) ); + gtk_widget_set_sensitive( CBSubUnicode,(comment == NULL) ); break; #endif } @@ -1243,6 +1245,8 @@ if ( !strcasecmp( sub_cp,lEncoding[i].name ) ) break; if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lEncoding[i].comment ); else gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),sub_cp ); + gtk_widget_set_sensitive( CBSubUtf8,FALSE ); + gtk_widget_set_sensitive( CBSubUnicode,FALSE ); } #endif