changeset 36547:324571df137c

Improve the dialog for subtitle encodings selection. Add possibility for UTF-8 subtitles without iconv.
author ib
date Sun, 19 Jan 2014 15:58:54 +0000
parents e2b534a7fa71
children b72ae5f17e3a
files gui/dialog/preferences.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/preferences.c	Sun Jan 19 15:55:45 2014 +0000
+++ b/gui/dialog/preferences.c	Sun Jan 19 15:58:54 2014 +0000
@@ -93,6 +93,7 @@
 static GtkWidget * CBIndex;
 static GtkWidget * CBFlip;
 static GtkWidget * CBNoAutoSub;
+static GtkWidget * CBSubUtf8;
 static GtkWidget * CBSubUnicode;
 static GtkWidget * CBSubOverlap;
 static GtkWidget * CBDumpMPSub;
@@ -285,6 +286,7 @@
 	sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) );
 	gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) );
 	gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) );
+	sub_utf8=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUtf8 ) );
 	sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) );
 #ifdef CONFIG_ASS
 	gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) );
@@ -796,12 +798,14 @@
 #endif
 
   hbox3=gtkAddHBox( NULL,0 );
+  gtk_box_set_spacing( GTK_BOX( hbox3 ), 24 );
   gtk_box_pack_start( GTK_BOX( vbox10 ),hbox3,TRUE,FALSE,0 );
 
   vbox9=gtkAddVBox( vbox8,0 );
 
   CBSubOverlap=gtkAddCheckButton( MSGTR_PREFERENCES_SUB_Overlap,vbox9 );
   CBNoAutoSub=gtkAddCheckButton( MSGTR_PREFERENCES_SUB_AutoLoad,vbox9 );
+  CBSubUtf8=gtkAddCheckButton( MSGTR_PREFERENCES_FontEncoding24,hbox3 );
   CBSubUnicode=gtkAddCheckButton( MSGTR_PREFERENCES_FontEncoding1,hbox3 );
   CBDumpMPSub=gtkAddCheckButton( MSGTR_PREFERENCES_SUB_MPSUB,vbox9 );
   CBDumpSrt=gtkAddCheckButton( MSGTR_PREFERENCES_SUB_SRT,vbox9 );
@@ -1179,6 +1183,7 @@
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ),!sub_auto );
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub );
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUtf8 ),sub_utf8 );
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),sub_unicode );
 #ifdef CONFIG_ASS
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBUseASS ),gtkASS.enabled );