changeset 36564:d22374047528

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.
author ib
date Mon, 20 Jan 2014 17:09:47 +0000
parents 5e8ada8eae44
children bec86410237f
files gui/dialog/preferences.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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