Commit 16a61233 authored by Lyndon Brown's avatar Lyndon Brown Committed by Jean-Baptiste Kempf
Browse files

spu(audiobargraph_v,logo,marq,rss): fix missing choice list entry

the default value (`-1`) did not correspond to any choice list entry,
thus causing buggy behaviour wrt. saving preferences. (which is very
noticeable in a new preferences interface i have built).

this adds the `-1` choice list entry for 'absolute' to fix that.

---

i questioned whether adding such an entry was correct in terms of it
possibly being redundant alongside top-left + offsets. i noted that
there is a specific code path for absolute mode involving marking the
spu as positioned absolutely. i am not certain whether or not this is
actually redundant for these plugins, and thus did not implement the
alternative solution of ripping out those absolute mode bits and
changing the default to `5` (top-left).

my understanding, from spending time researching git history and the
current codebase (without a great understanding of the spu code yet
though) is that the absolute property comes into play when there are
multiple spus, being to do with prevention of overlaps. absolute mode
forces position, whilst non-absolute allows moving spus to fix
overlap.
parent c15e2691
......@@ -51,7 +51,7 @@
#define POS_TEXT N_("Bargraph position")
#define POS_LONGTEXT N_(\
"Enforce the bargraph position on the video " \
"(0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
"also use combinations of these values, eg 6 = top-right).")
#define BARWIDTH_TEXT N_("Bar width in pixel")
#define BARWIDTH_LONGTEXT N_("Width in pixel of each bar in the BarGraph to be displayed." )
......@@ -60,9 +60,10 @@
#define CFG_PREFIX "audiobargraph_v-"
static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
static int OpenSub (filter_t *);
......
......@@ -67,16 +67,17 @@
#define POS_TEXT N_("Logo position")
#define POS_LONGTEXT N_( \
"Enforce the logo position on the video " \
"(0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
"also use combinations of these values, eg 6 = top-right).")
#define LOGO_HELP N_("Use a local picture as logo on the video")
#define CFG_PREFIX "logo-"
static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
static int OpenSub ( filter_t * );
......
......@@ -120,13 +120,14 @@ typedef struct
#define POS_TEXT N_("Marquee position")
#define POS_LONGTEXT N_( \
"You can enforce the marquee position on the video " \
"(0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
"also use combinations of these values, eg 6 = top-right).")
static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
#define CFG_PREFIX "marq-"
......
......@@ -159,7 +159,7 @@ typedef struct
#define POS_TEXT N_("Text position")
#define POS_LONGTEXT N_( \
"You can enforce the text position on the video " \
"(0=center, 1=left, 2=right, 4=top, 8=bottom; you can " \
"(-1=absolute, 0=center, 1=left, 2=right, 4=top, 8=bottom; you can " \
"also use combinations of these values, eg 6 = top-right).")
#define TITLE_TEXT N_("Title display mode")
......@@ -167,10 +167,11 @@ typedef struct
#define RSS_HELP N_("Display a RSS or ATOM Feed on your video")
static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const int pi_pos_values[] = { -1, 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
{ N_("Absolute"),
N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
enum title_modes {
default_title=-1,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment