Ticket #2606: osd.aspect.patch

File osd.aspect.patch, 2.4 KB (added by anonymous, 19 years ago)
  • mythtv/libs/libmythtv/osdlistbtntype.h

    diff -u -r --exclude-from diff.exclude release.11597.1020c/mythtv/libs/libmythtv/osdlistbtntype.h release.11597.1020d/mythtv/libs/libmythtv/osdlistbtntype.h
    old new  
    5151                   const QString  &action = "",   int            check = -1,
    5252                   OSDTypeImage   *image  = NULL, QString        group = "") :
    5353        GenericTree(name), m_image(image),     m_action(action),
    54         m_group(group),    m_checkable(check), m_parentButton(NULL)
     54        m_group(group),    m_checkable(check), m_parentButton(NULL),
     55        m_parent(parent)
    5556    {
    5657        m_group = (m_group.isEmpty()) ? action : m_group;
    5758        setSelectable(!action.isEmpty());
     
    6263    QString getAction(void)    const { return m_action;    }
    6364    QString getGroup(void)     const { return m_group;     }
    6465    int     getCheckable(void) const { return m_checkable; }
     66    void    setChecked(int checked)  { m_checkable = checked; };
     67    OSDGenericTree *getParent(void)  { return m_parent; }
    6568
    6669    OSDTypeImage       *getImage(void)        { return m_image;        }
    6770    OSDListBtnTypeItem *getParentButton(void) { return m_parentButton; }
     
    7578    QString             m_group;
    7679    int                 m_checkable;
    7780    OSDListBtnTypeItem *m_parentButton;
     81    OSDGenericTree     *m_parent;
    7882};
    7983
    8084// Will _not_ delete the GenericTree that it's given.
  • mythtv/libs/libmythtv/tv_play.cpp

    diff -u -r --exclude-from diff.exclude release.11597.1020c/mythtv/libs/libmythtv/tv_play.cpp release.11597.1020d/mythtv/libs/libmythtv/tv_play.cpp
    old new  
    60456045    }
    60466046    else if (action.left(12) == "TOGGLEASPECT")
    60476047    {
     6048        OSDGenericTree *parent = item->getParent();
     6049        QPtrList<GenericTree> *itemlist = parent->getAllChildren();
     6050        QPtrListIterator<GenericTree> it(*itemlist);
     6051
     6052        OSDGenericTree     *child   = (OSDGenericTree*) it.current();
     6053        for (;(child = (OSDGenericTree*) it.current()); ++it)
     6054        {
     6055            child->setChecked(0);
     6056        }
     6057
     6058        item->setChecked(1);
    60486059        ToggleLetterbox(action.right(1).toInt());
    60496060        hidetree = false;
    60506061    }