Skip to content

Commit

Permalink
TV: Convert some jump actions to defines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Kendall committed May 4, 2011
1 parent ac6c20f commit 76bdd34
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions mythtv/libs/libmythtv/tv_actions.h
Expand Up @@ -14,6 +14,10 @@
#define ACTION_CHANNELDOWN "CHANNELDOWN"
#define ACTION_SEEKRWND "SEEKRWND"
#define ACTION_SEEKFFWD "SEEKFFWD"
#define ACTION_JUMPFFWD "JUMPFFWD"
#define ACTION_JUMPRWND "JUMPRWND"
#define ACTION_JUMPBKMRK "JUMPBKMRK"
#define ACTION_JUMPSTART "JUMPSTART"

#define ACTION_TOGGLESTUDIOLEVELS "TOGGLESTUDIOLEVELS"
#define ACTION_TOGGLEUPMIX "TOGGLEUPMIX"
Expand Down
20 changes: 10 additions & 10 deletions mythtv/libs/libmythtv/tv_play.cpp
Expand Up @@ -505,11 +505,11 @@ void TV::InitKeys(void)
"Switch to the next favorite channel"), "/");
REG_KEY("TV Playback", "PREVCHAN", QT_TRANSLATE_NOOP("MythControls",
"Switch to the previous channel"), "H");
REG_KEY("TV Playback", "JUMPFFWD", QT_TRANSLATE_NOOP("MythControls",
REG_KEY("TV Playback", ACTION_JUMPFFWD, QT_TRANSLATE_NOOP("MythControls",
"Jump ahead"), "PgDown");
REG_KEY("TV Playback", "JUMPRWND", QT_TRANSLATE_NOOP("MythControls",
REG_KEY("TV Playback", ACTION_JUMPRWND, QT_TRANSLATE_NOOP("MythControls",
"Jump back"), "PgUp");
REG_KEY("TV Playback", "JUMPBKMRK", QT_TRANSLATE_NOOP("MythControls",
REG_KEY("TV Playback", ACTION_JUMPBKMRK, QT_TRANSLATE_NOOP("MythControls",
"Jump to bookmark"), "K");
REG_KEY("TV Playback", "FFWDSTICKY", QT_TRANSLATE_NOOP("MythControls",
"Fast Forward (Sticky) or Forward one frame while paused"), ">,.");
Expand All @@ -527,7 +527,7 @@ void TV::InitKeys(void)
"Skip Commercial"), "Z,End");
REG_KEY("TV Playback", "SKIPCOMMBACK", QT_TRANSLATE_NOOP("MythControls",
"Skip Commercial (Reverse)"), "Q,Home");
REG_KEY("TV Playback", "JUMPSTART", QT_TRANSLATE_NOOP("MythControls",
REG_KEY("TV Playback", ACTION_JUMPSTART, QT_TRANSLATE_NOOP("MythControls",
"Jump to the start of the recording."), "Ctrl+B");
REG_KEY("TV Playback", "TOGGLEBROWSE", QT_TRANSLATE_NOOP("MythControls",
"Toggle channel browse mode"), "O");
Expand Down Expand Up @@ -3572,9 +3572,9 @@ bool TV::ManualZoomHandleAction(PlayerContext *actx, const QStringList &actions)
}
else if (has_action(ACTION_SELECT, actions))
SetManualZoom(actx, false, tr("Zoom Committed"));
else if (has_action("JUMPFFWD", actions))
else if (has_action(ACTION_JUMPFFWD, actions))
actx->player->Zoom(kZoomIn);
else if (has_action("JUMPRWND", actions))
else if (has_action(ACTION_JUMPRWND, actions))
actx->player->Zoom(kZoomOut);
else
{
Expand Down Expand Up @@ -3759,7 +3759,7 @@ bool TV::ActiveHandleAction(PlayerContext *ctx,
}
}
}
else if (has_action("JUMPRWND", actions))
else if (has_action(ACTION_JUMPRWND, actions))
{
if (isDVD)
DVDJumpBack(ctx);
Expand All @@ -3768,7 +3768,7 @@ bool TV::ActiveHandleAction(PlayerContext *ctx,
else
DoSeek(ctx, -ctx->jumptime * 60, tr("Jump Back"));
}
else if (has_action("JUMPFFWD", actions))
else if (has_action(ACTION_JUMPFFWD, actions))
{
if (isDVD)
DVDJumpForward(ctx);
Expand All @@ -3777,7 +3777,7 @@ bool TV::ActiveHandleAction(PlayerContext *ctx,
else
DoSeek(ctx, ctx->jumptime * 60, tr("Jump Ahead"));
}
else if (has_action("JUMPBKMRK", actions))
else if (has_action(ACTION_JUMPBKMRK, actions))
{
ctx->LockDeletePlayer(__FILE__, __LINE__);
long long bookmark = ctx->player->GetBookmark();
Expand All @@ -3789,7 +3789,7 @@ bool TV::ActiveHandleAction(PlayerContext *ctx,
if (bookmark > rate)
DoSeek(ctx, seekloc, tr("Jump to Bookmark"));
}
else if (has_action("JUMPSTART",actions))
else if (has_action(ACTION_JUMPSTART,actions))
{
long long seekloc = +1;
ctx->LockDeletePlayer(__FILE__, __LINE__);
Expand Down

0 comments on commit 76bdd34

Please sign in to comment.