Ticket #10485: mythuiutil.diff

File mythuiutil.diff, 3.1 KB (added by Xavier Hervy <xavier.hervy@…>, 14 years ago)
  • mythtv/libs/libmythui/mythuitype.cpp

    diff --git a/mythtv/libs/libmythui/mythuitype.cpp b/mythtv/libs/libmythui/mythuitype.cpp
    index 5341e4b..ecc0739 100644
    a b void MythUIType::ConnectDependants(bool recurse)  
    14061406                (*it)->ConnectDependants(recurse);
    14071407        }
    14081408    }
    1409 }
    1410  No newline at end of file
     1409}
  • mythtv/libs/libmythui/mythuitype.h

    diff --git a/mythtv/libs/libmythui/mythuitype.h b/mythtv/libs/libmythui/mythuitype.h
    index c39630e..e6c6a81 100644
    a b class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase  
    7171
    7272    virtual void Reset(void);
    7373
     74    // Only use for theme debugging
     75    const QString &GetXMLName() const{ return m_xmlName;};
     76    void SetXMLName(QString xmlName){ m_xmlName = xmlName;};
     77
    7478    void AddChild(MythUIType *child);
    7579    MythUIType *GetChild(const QString &name) const;
    7680    MythUIType *GetChildAt(const QPoint &p, bool recursive=true,
    class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase  
    218222    virtual void CreateCopy(MythUIType *parent);
    219223    virtual void Finalize(void);
    220224
     225    QString m_xmlName;
    221226    QList<MythUIType *> m_ChildrenList;
    222227    QMap<QString, QString> m_dependsMap;
    223228
  • mythtv/libs/libmythui/mythuiutils.h

    diff --git a/mythtv/libs/libmythui/mythuiutils.h b/mythtv/libs/libmythui/mythuiutils.h
    index 01f2190..eb6d079 100644
    a b  
    44#include <cstdlib>
    55
    66#include "mythuiexp.h"
     7#include "mythuitype.h"
    78
    89class QString;
    910
    struct MUI_PUBLIC ETPrintError  
    2223template <typename ErrorDispatch = ETPrintWarning>
    2324struct UIUtilDisp
    2425{
    25     template <typename ContainerType, typename UIType>
    26     static bool Assign(ContainerType *container, UIType *&item,
     26    template <typename MythUIType, typename UIType>
     27    static bool Assign(MythUIType *container, UIType *&item,
    2728                       const QString &name, bool *err = NULL)
    2829    {
    2930        if (!container)
    struct UIUtilDisp  
    4142            return false;
    4243
    4344        if (err)
    44             *err |= ErrorDispatch::Child(container->objectName(), name);
     45            *err |= ErrorDispatch::Child(container->GetXMLName(), name);
    4546        else
    46             ErrorDispatch::Child(container->objectName(), name);
     47            ErrorDispatch::Child(container->GetXMLName(), name);
    4748        return true;
    4849    }
    4950};
  • mythtv/libs/libmythui/xmlparsebase.cpp

    diff --git a/mythtv/libs/libmythui/xmlparsebase.cpp b/mythtv/libs/libmythui/xmlparsebase.cpp
    index 6322111..4abcbd3 100644
    a b bool XMLParseBase::LoadWindowFromXML(const QString &xmlfile,  
    685685        if (doLoad(windowname, parent, themefile,
    686686                   onlyLoadWindows, showWarnings))
    687687        {
     688            parent->SetXMLName(windowname);
    688689            return true;
    689690        }
    690691        else
    bool XMLParseBase::CopyWindowFromBase(const QString &windowname,  
    923924    }
    924925
    925926    win->CopyFrom(st);
     927    win->SetXMLName(windowname);
    926928    return true;
    927929}