[mythtv] MythUI miscellany

Nigel Pearson nigel at ind.tansu.com.au
Wed Aug 13 23:56:50 UTC 2008


1) MythConfirmationDialog always has focus on the
Cancel button, even when that button isn't shown,
which is causing Enter/Return to do nothing.
Looks like AddFocusableChildrenToList() doesn't
take visibility into consideration.
I will patch this soon.


2) A screen stack may contain several children,
but PopScreen() will only remove the top one.
Any chance of something like:

void MythScreenStack::PopScreen(MythScreenType *screen)
or
void MythScreenStack::DeleteScreen(MythScreenType *screen)


3) Most of the MythPopupBox::showOkPopup() calls in
libmyth/{backendselect,mythcontext,mythmediamonitor}.cpp
are informational, and do not need slots/events.
I think we need:

MythConfirmPopup(const QString &msg);

to prevent 80 repetitions of:

     MythConfirmationDialog  *OK;
     MythScreenStack         *popStack;

     popStack = gContext->GetMainWindow()->GetStack("popup stack");
     OK       = new MythConfirmationDialog(tr("No devices to eject")),
     if (OK->Create())
         popStack->AddScreen(OK);

with its corresponding memory leaks.


4) Constructor methods have inconsistent arg. order:

MythDialogBox (const QString &text,
                MythScreenStack *parent...
MythConfirmationDialog (MythScreenStack *parent...
MythUIBusyDialog(const QString &message,
                  MythScreenStack *parent...
MythUIProgressDialog(const QString &message,
                      MythScreenStack *parent...
MythScreenType(MythScreenStack *parent...
MythThemedMenu(const QString &cdir, const QString &menufile,
                MythScreenStack *parent...


Not a big deal, but it would be easier to remember
if they all had parent first?



--
Nigel Pearson, nigel at ind.tansu.com.au|Well, I own the hotel
Telstra Net. Eng., Sydney, Australia | and I also live in it.
Office: 9202 3900    Fax:  9261 3912 |My life is very much
Mobile: 0408 664435  Home: 9792 6998 |  like Monopoly



More information about the mythtv-dev mailing list