Skip to content

Commit

Permalink
Clean up jump point clearing for reset keys.
Browse files Browse the repository at this point in the history
Let MythMainWindow clear all the jump points for us before we re-init
them.
  • Loading branch information
sphery committed Aug 2, 2011
1 parent 098d27e commit 5178c38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
8 changes: 8 additions & 0 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -1763,6 +1763,14 @@ void MythMainWindow::RegisterJump(const QString &destination,
BindJump(destination, keybind);
}

void MythMainWindow::ClearAllJumps()
{
QList<QString> destinations = d->destinationMap.keys();
QList<QString>::Iterator it;
for (it = destinations.begin(); it != destinations.end(); ++it)
ClearJump(*it);
}

void MythMainWindow::JumpTo(const QString& destination, bool pop)
{
if (d->destinationMap.count(destination) > 0 && d->exitmenucallback == NULL)
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythui/mythmainwindow.h
Expand Up @@ -66,6 +66,7 @@ class MUI_PUBLIC MythMainWindow : public QWidget
void RegisterJump(const QString &destination, const QString &description,
const QString &key, void (*callback)(void),
bool exittomain = true, QString localAction = "");
void ClearAllJumps();

void RegisterMediaPlugin(const QString &name, const QString &desc,
MediaPlayCallback fn);
Expand Down
25 changes: 1 addition & 24 deletions mythtv/programs/mythfrontend/main.cpp
Expand Up @@ -1318,30 +1318,7 @@ static void InitJumpPoints(void)
static void ReloadJumpPoints(void)
{
MythMainWindow *mainWindow = GetMythMainWindow();
mainWindow->ClearJump("Reload Theme");
mainWindow->ClearJump("Main Menu");
mainWindow->ClearJump("Program Guide");
mainWindow->ClearJump("Program Finder");
//mainWindow->ClearJump("Search Listings");
mainWindow->ClearJump("Manage Recordings / Fix Conflicts");
mainWindow->ClearJump("Program Recording Priorities");
mainWindow->ClearJump("Manage Recording Rules");
mainWindow->ClearJump("Channel Recording Priorities");
mainWindow->ClearJump("TV Recording Playback");
mainWindow->ClearJump("TV Recording Deletion");
mainWindow->ClearJump("Live TV");
mainWindow->ClearJump("Live TV In Guide");
mainWindow->ClearJump("Status Screen");
mainWindow->ClearJump("Previously Recorded");
mainWindow->ClearJump("Video Default");
mainWindow->ClearJump("Video Manager");
mainWindow->ClearJump("Video Browser");
mainWindow->ClearJump("Video Listings");
mainWindow->ClearJump("Video Gallery");
mainWindow->ClearJump("Play Disc");
mainWindow->ClearJump("Toggle Show Widget Borders");
mainWindow->ClearJump("Toggle Show Widget Names");
mainWindow->ClearJump("Reset All Keys");
mainWindow->ClearAllJumps();
InitJumpPoints();
}

Expand Down

0 comments on commit 5178c38

Please sign in to comment.