Skip to content

Commit

Permalink
Use notifications instead of popup in recording screens to indicates …
Browse files Browse the repository at this point in the history
…the availability of a recording
  • Loading branch information
jyavenard committed Jul 10, 2013
1 parent a8ec95a commit ed263a6
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions mythtv/programs/mythfrontend/playbackbox.cpp
Expand Up @@ -23,6 +23,7 @@
#include "recordinginfo.h"
#include "recordingrule.h"
#include "mythuihelper.h"
#include "mythuinotificationcenter.h"
#include "storagegroup.h"
#include "mythuibutton.h"
#include "mythlogging.h"
Expand All @@ -47,6 +48,8 @@
#define LOC_WARN QString("PlaybackBox Warning: ")
#define LOC_ERR QString("PlaybackBox Error: ")

static const QString _Location = "Playback Box";

static int comp_programid(const ProgramInfo *a, const ProgramInfo *b)
{
if (a->GetProgramID() == b->GetProgramID())
Expand Down Expand Up @@ -2663,41 +2666,48 @@ void PlaybackBox::ShowAvailabilityPopup(const ProgramInfo &pginfo)
case asAvailable:
if (pginfo.QueryIsInUse(byWho))
{
ShowOkPopup(tr("Recording Available\n") + msg +
tr("This recording is currently in "
"use by:") + "\n" + byWho);
ShowNotification(tr("Recording Available\n"),
_Location, msg +
tr("This recording is currently in "
"use by:") + "\n" + byWho);
}
else
{
ShowOkPopup(tr("Recording Available\n") + msg +
tr("This recording is currently "
"Available"));
ShowNotification(tr("Recording Available\n"),
_Location, msg +
tr("This recording is currently "
"Available"));
}
break;
case asPendingDelete:
ShowOkPopup(tr("Recording Unavailable\n") + msg +
tr("This recording is currently being "
"deleted and is unavailable"));
ShowNotificationError(tr("Recording Unavailable\n"),
_Location, msg +
tr("This recording is currently being "
"deleted and is unavailable"));
break;
case asDeleted:
ShowOkPopup(tr("Recording Unavailable\n") + msg +
tr("This recording has been "
"deleted and is unavailable"));
ShowNotificationError(tr("Recording Unavailable\n"),
_Location, msg +
tr("This recording has been "
"deleted and is unavailable"));
break;
case asFileNotFound:
ShowOkPopup(tr("Recording Unavailable\n") + msg +
tr("The file for this recording can "
"not be found"));
ShowNotificationError(tr("Recording Unavailable\n"),
_Location, msg +
tr("The file for this recording can "
"not be found"));
break;
case asZeroByte:
ShowOkPopup(tr("Recording Unavailable\n") + msg +
tr("The file for this recording is "
"empty."));
ShowNotificationError(tr("Recording Unavailable\n"),
_Location, msg +
tr("The file for this recording is "
"empty."));
break;
case asNotYetAvailable:
ShowOkPopup(tr("Recording Unavailable\n") + msg +
tr("This recording is not yet "
"available."));
ShowNotificationError(tr("Recording Unavailable\n"),
_Location, msg +
tr("This recording is not yet "
"available."));
}
}

Expand Down

0 comments on commit ed263a6

Please sign in to comment.