summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gui/cfg.c1
-rw-r--r--Gui/mplayer/gtk/opts.c5
-rw-r--r--help/help_mp-en.h1
-rw-r--r--mplayer.h1
4 files changed, 8 insertions, 0 deletions
diff --git a/Gui/cfg.c b/Gui/cfg.c
index 025f6de107..407c7628d5 100644
--- a/Gui/cfg.c
+++ b/Gui/cfg.c
@@ -113,6 +113,7 @@ static config_t gui_opts[] =
{ "sub_auto_load",&sub_auto,CONF_TYPE_FLAG,0,0,1,NULL },
{ "sub_unicode",&sub_unicode,CONF_TYPE_FLAG,0,0,1,NULL },
{ "sub_pos",&sub_pos,CONF_TYPE_INT,CONF_RANGE,0,200,NULL },
+ { "sub_overlap",&suboverlap_enabled,CONF_TYPE_FLAG,0,0,0,NULL },
{ "font_factor",&font_factor,CONF_TYPE_FLOAT,CONF_RANGE,0.0,10.0,NULL },
{ "font_name",&font_name,CONF_TYPE_STRING,0,0,0,NULL },
#ifdef HAVE_FREETYPE
diff --git a/Gui/mplayer/gtk/opts.c b/Gui/mplayer/gtk/opts.c
index e278100edc..d0a1107a79 100644
--- a/Gui/mplayer/gtk/opts.c
+++ b/Gui/mplayer/gtk/opts.c
@@ -60,6 +60,7 @@ static GtkWidget * CBIndex;
static GtkWidget * CBFlip;
static GtkWidget * CBNoAutoSub;
static GtkWidget * CBSubUnicode;
+static GtkWidget * CBSubOverlap;
static GtkWidget * CBDumpMPSub;
static GtkWidget * CBDumpSrt;
static GtkWidget * CBPostprocess;
@@ -245,6 +246,7 @@ void ShowPreferences( void )
}
// -- 3. page
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubOverlap ),suboverlap_enabled );
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 );
@@ -340,6 +342,7 @@ void ShowPreferences( void )
#ifndef USE_SUB
gtk_widget_set_sensitive( AConfig,FALSE );
gtk_widget_set_sensitive( CBNoAutoSub,FALSE );
+ gtk_widget_set_sensitive( CBSubOverlap,FALSE );
gtk_widget_set_sensitive( CBSubUnicode,FALSE );
gtk_widget_set_sensitive( CBDumpMPSub,FALSE );
gtk_widget_set_sensitive( CBDumpSrt,FALSE );
@@ -463,6 +466,7 @@ void prButton( GtkButton * button,gpointer user_data )
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1;
// -- 3. page
+ suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) );
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 ) );
@@ -872,6 +876,7 @@ GtkWidget * create_Preferences( void )
vbox9=AddVBox( vbox8,0 );
+ CBSubOverlap=AddCheckButton( MSGTR_PREFERENCES_SUB_Overlap,vbox9 );
CBNoAutoSub=AddCheckButton( MSGTR_PREFERENCES_SUB_AutoLoad,vbox9 );
CBSubUnicode=AddCheckButton( MSGTR_PREFERENCES_SUB_Unicode,vbox9 );
CBDumpMPSub=AddCheckButton( MSGTR_PREFERENCES_SUB_MPSUB,vbox9 );
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index a20d864075..0abfe617a3 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -442,6 +442,7 @@ static char help_text[]=
#define MSGTR_PREFERENCES_SUB_Unicode "Unicode subtitle"
#define MSGTR_PREFERENCES_SUB_MPSUB "Convert the given subtitle to MPlayer's subtitle format"
#define MSGTR_PREFERENCES_SUB_SRT "Convert the given subtitle to the time based SubViewer (SRT) format"
+#define MSGTR_PREFERENCES_SUB_Overlap "Toggle subtitle overlapping"
#define MSGTR_PREFERENCES_Font "Font:"
#define MSGTR_PREFERENCES_FontFactor "Font factor:"
#define MSGTR_PREFERENCES_PostProcess "Enable postprocessing"
diff --git a/mplayer.h b/mplayer.h
index eef50a24c1..f58cf95148 100644
--- a/mplayer.h
+++ b/mplayer.h
@@ -32,6 +32,7 @@ extern int sub_pos;
extern int sub_unicode;
extern subtitle* subtitles;
extern subtitle* vo_sub;
+extern int suboverlap_enabled;
extern char * filename;