[mythtv] [PATCH] MythNews - More space for article
Oscar Carlsson
oscar.carlsson at home.se
Wed Aug 18 09:07:17 EDT 2004
Patch makes the "Updated" text only appear when you see the summary of
the feed, not the articles.
This makes it possible to display a bit more text, I'm now able to read
six lines.
Also removed MultiLine from the title, I think there's enough room for
the title anyway.
/Oscar
-------------- next part --------------
Index: mythnews/news-ui.xml
===================================================================
RCS file: /var/lib/mythcvs/mythnews/mythnews/news-ui.xml,v
retrieving revision 1.7
diff -u -r1.7 news-ui.xml
--- mythnews/news-ui.xml 8 May 2004 20:16:51 -0000 1.7
+++ mythnews/news-ui.xml 18 Aug 2004 13:00:39 -0000
@@ -74,15 +74,14 @@
<area>0,340,800,260</area>
-
<textarea name="title" draworder="1">
- <area>20,10,760,70</area>
+ <area>20,10,760,35</area>
<font>title</font>
- <multiline>yes</multiline>
+ <multiline>no</multiline>
</textarea>
<textarea name="description" draworder="1">
- <area>20,75,760,100</area>
+ <area>20,40,760,200</area>
<font>desc</font>
<multiline>yes</multiline>
</textarea>
@@ -93,7 +92,7 @@
</image>
<textarea name="updated" align="right" draworder="1">
- <area>650,160,120,100</area>
+ <area>580,160,200,100</area>
<font>updated</font>
<multiline>yes</multiline>
</textarea>
@@ -128,11 +127,11 @@
<showscrollarrows>yes</showscrollarrows>
</listbtnarea>
- <textarea name="context_switch" draworder="0">
- <area>0,510,760,50</area>
- <font>desc</font>
- <multiline>yes</multiline>
- </textarea>
+ <textarea name="context_switch" draworder="0">
+ <area>0,510,760,50</area>
+ <font>desc</font>
+ <multiline>yes</multiline>
+ </textarea>
</container>
Index: mythnews/mythnews.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythnews/mythnews/mythnews.cpp,v
retrieving revision 1.14
diff -u -r1.14 mythnews.cpp
--- mythnews/mythnews.cpp 24 Jul 2004 23:11:23 -0000 1.14
+++ mythnews/mythnews.cpp 18 Aug 2004 13:00:39 -0000
@@ -262,11 +262,11 @@
UIListBtnTypeItem *siteUIItem = m_UISites->GetItemCurrent();
if (siteUIItem && siteUIItem->getData())
site = (NewsSite*) siteUIItem->getData();
-
+
UIListBtnTypeItem *articleUIItem = m_UIArticles->GetItemCurrent();
if (articleUIItem && articleUIItem->getData())
article = (NewsArticle*) articleUIItem->getData();
-
+
if (m_InColumn == 1) {
if (article)
@@ -280,6 +280,11 @@
(UITextType *)container->GetType("description");
if (ttype)
ttype->SetText(article->description());
+
+ ttype =
+ (UITextType *)container->GetType("updated");
+ if (ttype)
+ ttype->SetText("");
}
}
else {
@@ -295,24 +300,20 @@
(UITextType *)container->GetType("description");
if (ttype)
ttype->SetText(site->description());
- }
- }
-
- UITextType *ttype =
- (UITextType *)container->GetType("updated");
- if (ttype) {
- if (site)
- {
- QString text(tr("Updated") + "\n");
- QDateTime updated(site->lastUpdated());
- if (updated.toTime_t() != 0) {
- text += site->lastUpdated().toString(dateFormat) + "\n";
- text += site->lastUpdated().toString(timeFormat);
+ ttype =
+ (UITextType *)container->GetType("updated");
+ if (ttype) {
+ QString text(tr("Updated") + "\n");
+ QDateTime updated(site->lastUpdated());
+ if (updated.toTime_t() != 0) {
+ text += site->lastUpdated().toString(dateFormat) + "\n";
+ text += site->lastUpdated().toString(timeFormat);
+ }
+ else
+ text += tr("Unknown");
+ ttype->SetText(text);
}
- else
- text += tr("Unknown");
- ttype->SetText(text);
}
}
More information about the mythtv-dev
mailing list