Permalink
Browse files

Tidy up MythConfirmationDialog::ShowOkPopup()

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information...
1 parent ca27332 commit 2699d8650c783c8a22fcfe017c9295855916e370 Lawrence Rust committed with stuartm Jul 6, 2012
Showing with 12 additions and 16 deletions.
  1. +12 −16 mythtv/libs/libmythui/mythdialogbox.cpp
View
28 mythtv/libs/libmythui/mythdialogbox.cpp
@@ -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);

0 comments on commit 2699d86

Please sign in to comment.