diff --git a/mythtv/libs/libmythui/mythscreentype.cpp b/mythtv/libs/libmythui/mythscreentype.cpp
index 8dd78ec..062bddb 100644
a
|
b
|
MythScreenType::MythScreenType(MythUIType *parent, const QString &name, |
68 | 68 | m_IsLoading = false; |
69 | 69 | m_IsLoaded = false; |
70 | 70 | m_IsInitialized = false; |
| 71 | m_textAreaTitle = NULL; |
| 72 | m_windowTitle = ""; |
| 73 | m_altTextAreaName = ""; |
71 | 74 | |
72 | 75 | m_Area = GetMythMainWindow()->GetUIScreenRect(); |
73 | 76 | |
… |
… |
void MythScreenType::SetDeleting(bool deleting) |
271 | 274 | |
272 | 275 | bool MythScreenType::Create(void) |
273 | 276 | { |
| 277 | // Load the standard text area for the title of the window |
| 278 | UIUtilW::Assign(this, m_textAreaTitle, "windowtitle"); |
| 279 | if (!m_textAreaTitle && !m_altTextAreaName.isEmpty()) |
| 280 | { |
| 281 | // Load the Alternative text area for the title of the window |
| 282 | UIUtilW::Assign(this, m_textAreaTitle, m_altTextAreaName); |
| 283 | // display a warning if the theme is still using the alternative title name |
| 284 | if (m_textAreaTitle) |
| 285 | LOG(VB_GUI, LOG_WARNING, "Warning, this theme is not implementing the normalise windowTitle text area"); |
| 286 | } |
| 287 | if (m_textAreaTitle) m_textAreaTitle->SetText(m_windowTitle); |
274 | 288 | return true; |
275 | 289 | } |
276 | 290 | |
… |
… |
void MythScreenType::SetTextFromMap(QHash<QString, QString> &infoMap) |
420 | 434 | DoSetTextFromMap((MythUIType*) this, infoMap); |
421 | 435 | } |
422 | 436 | |
| 437 | /** |
| 438 | * \brief set the name of the window |
| 439 | * The title will be display in the "windowtitle" textarea. |
| 440 | * The only purpose of the method is to standardize the name of the text area |
| 441 | * so themer can take advantage of groups to define once for all the look and |
| 442 | * feel of the window title bar. |
| 443 | */ |
| 444 | void MythScreenType::SetWindowTitle(const QString & title) |
| 445 | { |
| 446 | m_windowTitle = title; |
| 447 | if (m_textAreaTitle)m_textAreaTitle->SetText(m_windowTitle); |
| 448 | } |
| 449 | |
| 450 | const QString &MythScreenType::GetWindowTitle()const |
| 451 | { |
| 452 | return m_windowTitle; |
| 453 | } |
| 454 | |
| 455 | |
| 456 | /* |
| 457 | * set the ame of the alternative textarea to be used instead of "windowtitle" |
| 458 | * The only purpose of the method is to provide compatibility and gibe time to |
| 459 | * the themer to update there theme |
| 460 | * Should be remove in a couple of release, let's say 0.27 |
| 461 | */ |
| 462 | void MythScreenType::SetAlternateTitleTextAreaName(const QString & altTextArea) |
| 463 | { |
| 464 | m_altTextAreaName=altTextArea; |
| 465 | } |
| 466 | |
423 | 467 | static void DoResetMap(MythUIType *UItype, QHash<QString, QString> &infoMap) |
424 | 468 | { |
425 | 469 | if (infoMap.isEmpty()) |
diff --git a/mythtv/libs/libmythui/mythscreentype.h b/mythtv/libs/libmythui/mythscreentype.h
index b83b39b..b3d6aca 100644
a
|
b
|
class MUI_PUBLIC MythScreenType : public MythUIType |
77 | 77 | void SetTextFromMap(InfoMap &infoMap); |
78 | 78 | void ResetMap(InfoMap &infoMap); |
79 | 79 | |
| 80 | void SetWindowTitle(const QString &); |
| 81 | const QString &GetWindowTitle() const; |
| 82 | |
| 83 | void SetAlternateTitleTextAreaName(const QString &); |
| 84 | |
80 | 85 | virtual MythPainter *GetPainter(void); |
81 | 86 | |
82 | 87 | public slots: |
… |
… |
class MUI_PUBLIC MythScreenType : public MythUIType |
111 | 116 | bool m_IsLoading; |
112 | 117 | bool m_IsLoaded; |
113 | 118 | bool m_IsInitialized; |
| 119 | MythUIText *m_textAreaTitle; |
| 120 | QString m_windowTitle; |
| 121 | QString m_altTextAreaName; |
114 | 122 | |
115 | 123 | MythUIType *m_CurrentFocusWidget; |
116 | 124 | //TODO We are currently dependant on the internal sorting of QMap for |
diff --git a/mythtv/programs/mythfrontend/proglist.cpp b/mythtv/programs/mythfrontend/proglist.cpp
index ddda2af..cc19d63 100644
a
|
b
|
ProgLister::ProgLister(MythScreenStack *parent, ProgListType pltype, |
55 | 55 | m_reverseSort(false), |
56 | 56 | m_useGenres(false), |
57 | 57 | |
58 | | m_schedText(NULL), |
59 | 58 | m_curviewText(NULL), |
60 | 59 | m_positionText(NULL), |
61 | 60 | m_progList(NULL), |
… |
… |
ProgLister::ProgLister( |
104 | 103 | m_reverseSort(true), |
105 | 104 | m_useGenres(false), |
106 | 105 | |
107 | | m_schedText(NULL), |
108 | 106 | m_curviewText(NULL), |
109 | 107 | m_positionText(NULL), |
110 | 108 | m_progList(NULL), |
… |
… |
bool ProgLister::Create() |
123 | 121 | if (!LoadWindowFromXML("schedule-ui.xml", "programlist", this)) |
124 | 122 | return false; |
125 | 123 | |
| 124 | //insure that non converted theme still work |
| 125 | SetAlternateTitleTextAreaName("sched"); |
| 126 | |
| 127 | if (!ScheduleCommon::Create()) |
| 128 | return false; |
| 129 | |
126 | 130 | bool err = false; |
127 | 131 | UIUtilW::Assign(this, m_curviewText, "curview", &err); |
128 | 132 | UIUtilE::Assign(this, m_progList, "proglist", &err); |
129 | | UIUtilW::Assign(this, m_schedText, "sched", &err); |
130 | 133 | UIUtilW::Assign(this, m_messageText, "msg", &err); |
131 | 134 | UIUtilW::Assign(this, m_positionText, "position", &err); |
132 | 135 | |
… |
… |
bool ProgLister::Create() |
167 | 170 | default: value = tr("Unknown Search"); break; |
168 | 171 | } |
169 | 172 | |
170 | | if (m_schedText) |
171 | | m_schedText->SetText(value); |
| 173 | SetWindowTitle(value); |
172 | 174 | |
173 | 175 | gCoreContext->addListener(this); |
174 | 176 | |
diff --git a/mythtv/programs/mythfrontend/proglist.h b/mythtv/programs/mythfrontend/proglist.h
index 1fc9020..e0be3b9 100644
a
|
b
|
class ProgLister : public ScheduleCommon |
126 | 126 | bool m_reverseSort; |
127 | 127 | bool m_useGenres; |
128 | 128 | |
129 | | MythUIText *m_schedText; |
130 | 129 | MythUIText *m_curviewText; |
131 | 130 | MythUIText *m_positionText; |
132 | 131 | MythUIButtonList *m_progList; |