[MPlayer-cvslog] r36660 - trunk/gui/dialog/preferences.c

ib subversion at mplayerhq.hu
Mon Jan 20 18:09:47 CET 2014


Author: ib
Date: Mon Jan 20 18:09:47 2014
New Revision: 36660

Log:
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.

Modified:
   trunk/gui/dialog/preferences.c

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Mon Jan 20 17:45:13 2014	(r36659)
+++ trunk/gui/dialog/preferences.c	Mon Jan 20 18:09:47 2014	(r36660)
@@ -245,6 +245,8 @@ static void prEntry( GtkEditable * edita
 	 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 @@ void ShowPreferences( void )
     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
 


More information about the MPlayer-cvslog mailing list