Mercurial > mplayer.hg
changeset 36565:bec86410237f
Improve the dialog for subtitle encodings.
Disable the check button for option 'sub_unicode'
in case option 'sub_utf8' is active.
author | ib |
---|---|
date | Mon, 20 Jan 2014 17:29:21 +0000 |
parents | d22374047528 |
children | a1a82a21b30c |
files | gui/dialog/preferences.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/preferences.c Mon Jan 20 17:09:47 2014 +0000 +++ b/gui/dialog/preferences.c Mon Jan 20 17:29:21 2014 +0000 @@ -246,7 +246,7 @@ mplayer( MPLAYER_SET_SUB_ENCODING,0,(char *)comment ); } gtk_widget_set_sensitive( CBSubUtf8,(comment == NULL) ); - gtk_widget_set_sensitive( CBSubUnicode,(comment == NULL) ); + gtk_widget_set_sensitive( CBSubUnicode,((comment == NULL) && !gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(CBSubUtf8) )) ); break; #endif } @@ -260,6 +260,13 @@ #define bLSubtitle 4 #define bLFont 5 +static void button_toggled( GtkToggleButton *button, gpointer user_data ) +{ + (void) user_data; + + gtk_widget_set_sensitive( CBSubUnicode,!gtk_toggle_button_get_active(button) ); +} + static void prButton( GtkButton * button, gpointer user_data ) { (void) button; @@ -1075,6 +1082,7 @@ #endif gtk_signal_connect( GTK_OBJECT( BLoadFont ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bLFont ); + gtk_signal_connect( GTK_OBJECT( CBSubUtf8 ),"toggled",GTK_SIGNAL_FUNC( button_toggled ),NULL ); #if 0 gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( on_CBNormalize_toggled ),NULL ); gtk_signal_connect( GTK_OBJECT( CBSoftwareMixer ),"toggled",GTK_SIGNAL_FUNC( on_CBSoftwareMixer_toggled ),NULL );