~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to libs/libmythui/myththemedmenu.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2009-09-29 01:33:23 UTC
  • mto: This revision was merged to the branch mainline in revision 94.
  • Revision ID: james.westby@ubuntu.com-20090929013323-e6d2b5bzpg4t3t3x
Tags: upstream-0.22.0~trunk22101
ImportĀ upstreamĀ versionĀ 0.22.0~trunk22101

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include "myththemedmenu.h"
 
3
 
 
4
// QT headers
1
5
#include <QApplication>
2
6
#include <QDir>
3
7
#include <QKeyEvent>
4
8
#include <QDomDocument>
 
9
#include <QFile>
5
10
 
6
 
#include "myththemedmenu.h"
 
11
// Mythui headers
7
12
#include "mythmainwindow.h"
8
13
#include "mythdialogbox.h"
9
 
 
10
14
#include "mythgesture.h"
11
15
#include "mythuitext.h"
12
16
#include "mythuistatetype.h"
13
17
#include "xmlparsebase.h"
14
18
#include "mythsystem.h"
 
19
#include "mythuihelper.h"
 
20
#include "lcddevice.h"
15
21
 
 
22
// Mythdb headers
16
23
#include "mythverbose.h"
17
 
#include "mythuihelper.h"
18
 
 
19
24
#include "mythdb.h"
20
25
#include "mythdirs.h"
21
 
#include "lcddevice.h"
22
26
 
23
27
MythThemedMenuState::MythThemedMenuState(MythScreenStack *parent,
24
28
                                         const QString &name)
169
173
    if (m_watermarkState)
170
174
    {
171
175
        if (!(m_watermarkState->DisplayState(button.type)))
172
 
            m_watermarkState->DisplayState("DEFAULT");
 
176
            m_watermarkState->Reset();
173
177
    }
174
178
 
175
179
    if (m_descriptionText)
725
729
 */
726
730
QString MythThemedMenu::findMenuFile(const QString &menuname)
727
731
{
728
 
    QString testdir = GetConfDir() + "/" + menuname;
 
732
    QString testdir = GetConfDir() + '/' + menuname;
729
733
    QFile file(testdir);
730
734
    if (file.exists())
731
735
        return testdir;
732
736
    else
733
737
        VERBOSE(VB_FILE+VB_EXTRA, "No menu file " + testdir);
734
738
 
735
 
    testdir = GetMythUI()->GetMenuThemeDir() + "/" + menuname;
 
739
    testdir = GetMythUI()->GetMenuThemeDir() + '/' + menuname;
736
740
    file.setFileName(testdir);
737
741
    if (file.exists())
738
742
        return testdir;
739
743
    else
740
744
        VERBOSE(VB_FILE+VB_EXTRA, "No menu file " + testdir);
741
745
 
742
 
    testdir = GetMythUI()->GetThemeDir() + "/" + menuname;
 
746
    testdir = GetMythUI()->GetThemeDir() + '/' + menuname;
743
747
    file.setFileName(testdir);
744
748
    if (file.exists())
745
749
        return testdir;
760
764
    else
761
765
        VERBOSE(VB_FILE+VB_EXTRA, "No menu file " + testdir);
762
766
 
763
 
    return "";
 
767
    return QString();
764
768
}
765
769
 
766
770
/** \brief Handle a MythTV action for the Menus.