Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6118 closed defect (fixed)

Mythwelcome / myth context creates multiple identical popups

Reported by: otto at kolsi dot fi Owned by: Isaac Richards
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: yes

Description

If MythWelcome? is used in remote frontend and backend is not available, there's a new MythUI dialog explaining that master backend cannot be connected. If backend is longer time off-line, there will be multiple of these dialogs when there really should be only one.

At one point when doing some testing/debugging with backend, there were > 150 of these dialogs in remote frontend that all had to be accepted to get to MythWelcome? itself.

Change History (7)

comment:1 Changed 11 years ago by Nigel

If no-one beats be to it, something like this should prevent it:

Index: mythdialogbox.cpp
===================================================================
--- mythdialogbox.cpp   (revision 19600)
+++ mythdialogbox.cpp   (working copy)
@@ -278,9 +278,9 @@
 void ShowOkPopup(const QString &message, QObject *parent,
                  const char *slot, bool showCancel)
 {
-    QString                  LOC = "ShowOkPopup('" + message + "') - ";
-    MythConfirmationDialog  *pop;
-    static MythScreenStack  *stk = NULL;
+    QString                         LOC = "ShowOkPopup('" + message + "') - ";
+    static MythConfirmationDialog  *pop = NULL;
+    static MythScreenStack         *stk = NULL;
 
 
     if (!stk)
@@ -303,6 +303,10 @@
         }
     }
 
+    // Prevent multiple popups from being all stacked
+    if (pop)
+        stk->PopScreen(pop);
+
     pop = new MythConfirmationDialog(stk, message, showCancel);
     if (pop->Create())
     {

comment:2 Changed 11 years ago by Nigel

Resolution: fixed
Status: newclosed

(In [19660]) Prevent multiple popups. Closes #6118

comment:3 Changed 11 years ago by stuartm

Milestone: unknown0.22
Resolution: fixed
Status: closednew

Reverts [19660]. I don't think this is the correct fix, discarding confirmation dialogs is going to lead to tears as important errors, prompts and the like just disappear as though they never existed. Mythwelcome should be keeping track of the popups it opens if we don't want the same message shown a hundred times.

comment:4 Changed 11 years ago by paulh

Resolution: fixed
Status: newclosed

(In [19728]) Make sure we only show one 'connection has gone away' popup and if the connection is restored while the popup is on screen automatically close it. Fixes #6118

comment:5 Changed 11 years ago by paulh

(In [19730]) Missed a couple of files in [19728]. Refs #6118.

comment:6 Changed 11 years ago by anonymous

if i press i in the recordings screen multiple times there are also multiple identical popups

comment:7 Changed 11 years ago by stuartm

Ticket locked: set
Note: See TracTickets for help on using tickets.