Skip to content

Commit

Permalink
Tidy up MythConfirmationDialog::ShowOkPopup()
Browse files Browse the repository at this point in the history
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information
Lawrence Rust authored and stuartm committed Jul 6, 2012
1 parent ca27332 commit 2699d86
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions mythtv/libs/libmythui/mythdialogbox.cpp
Expand Up @@ -575,25 +575,21 @@ MythConfirmationDialog *ShowOkPopup(const QString &message, QObject *parent,
MythConfirmationDialog *pop;
MythScreenStack *stk = NULL;

MythMainWindow *win = GetMythMainWindow();

if (!stk)
if (win)
stk = win->GetStack("popup stack");
else
{
MythMainWindow *win = GetMythMainWindow();

if (win)
stk = win->GetStack("popup stack");
else
{
LOG(VB_GENERAL, LOG_ERR, LOC + "no main window?");
return NULL;
}
LOG(VB_GENERAL, LOG_ERR, LOC + "no main window?");
return NULL;
}

if (!stk)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "no popup stack? "
"Is there a MythThemeBase?");
return NULL;
}
if (!stk)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "no popup stack? "
"Is there a MythThemeBase?");
return NULL;
}

pop = new MythConfirmationDialog(stk, message, showCancel);
Expand Down

0 comments on commit 2699d86

Please sign in to comment.