Permalink
Browse files

Themed menus: allow Undo/Redo options to always be displayed.

This changes the treatment of the Undo and Redo menu items in the
cutlist editor so that they can always be displayed, even when no undo
or redo action is available.  By default, unavailable undo/redo
actions are hidden via the show="active" attribute.
  • Loading branch information...
stichnot committed May 20, 2013
1 parent b91b19b commit 0e19c388bb2afaf1fe36621bf3979a237b2cdabd
Showing with 12 additions and 16 deletions.
  1. +10 −14 mythtv/libs/libmythtv/tv_play.cpp
  2. +2 −2 mythtv/themes/default/menu_cutlist.xml
@@ -11203,23 +11203,19 @@ bool TV::MenuItemDisplayCutlist(const MenuItemContext &c)
}
else if (actionName == "DIALOG_CUTPOINT_UNDO_0")
{
if (ctx->player->DeleteMapHasUndo())
{
//: %1 is the undo message
QString text = tr("Undo - %1");
addButton(c, osd, active, result, actionName, text, "", false,
ctx->player->DeleteMapGetUndoMessage());
}
active = ctx->player->DeleteMapHasUndo();
//: %1 is the undo message
QString text = tr("Undo - %1");
addButton(c, osd, active, result, actionName, text, "", false,
ctx->player->DeleteMapGetUndoMessage());
}
else if (actionName == "DIALOG_CUTPOINT_REDO_0")
{
if (ctx->player->DeleteMapHasRedo())
{
//: %1 is the redo message
QString text = tr("Redo - %1");
addButton(c, osd, active, result, actionName, text, "", false,
ctx->player->DeleteMapGetRedoMessage());
}
active = ctx->player->DeleteMapHasRedo();
//: %1 is the redo message
QString text = tr("Redo - %1");
addButton(c, osd, active, result, actionName, text, "", false,
ctx->player->DeleteMapGetRedoMessage());
}
else if (actionName == "DIALOG_CUTPOINT_CLEARMAP_0")
{
@@ -20,8 +20,8 @@
<item action="DIALOG_CUTPOINT_DELETE_0"
XXXtext="Join Surrounding Cuts" show="inactive" />
<item action="DIALOG_CUTPOINT_NEWCUT_0" XXXtext="Add New Cut" />
<item action="DIALOG_CUTPOINT_UNDO_0" XXXtext="Undo - %1" />
<item action="DIALOG_CUTPOINT_REDO_0" XXXtext="Redo - %1" />
<item action="DIALOG_CUTPOINT_UNDO_0" XXXtext="Undo - %1" show="active" />
<item action="DIALOG_CUTPOINT_REDO_0" XXXtext="Redo - %1" show="active" />
<menu text="Cut List Options">
<item action="DIALOG_CUTPOINT_CLEARMAP_0" XXXtext="Clear Cuts" />
<item action="DIALOG_CUTPOINT_INVERTMAP_0" XXXtext="Reverse Cuts" />

0 comments on commit 0e19c38

Please sign in to comment.