Ticket #741: patch.txt

File patch.txt, 2.4 KB (added by jochen, 20 years ago)

patch, Version 1

Line 
1Index: libmythtv/tv_play.cpp
2===================================================================
3--- libmythtv/tv_play.cpp (Revision 8095)
4+++ libmythtv/tv_play.cpp (Arbeitskopie)
5@@ -3402,8 +3402,26 @@
6 return;
7
8 QString name = tvchain->GetInputName(-1);
9- QString msg = QString ("%1: %2")
10+
11+ MSqlQuery query(MSqlQuery::InitCon());
12+ QString thequery = QString("SELECT displayname FROM capturecard WHERE cardid = \"%1\"; ")
13+ .arg(activerecorder->GetRecorderNumber());
14+ query.exec(thequery);
15+ QString DisplayName;
16+ QString msg;
17+
18+ if (query.isActive() && query.size() > 0)
19+ {
20+ query.next();
21+ DisplayName = query.value(0).toString();
22+ }
23+
24+ if ( DisplayName == "")
25+ msg = QString ("%1: %2")
26 .arg(activerecorder->GetRecorderNumber()).arg(name);
27+ else
28+ msg = QString ("%1")
29+ .arg(DisplayName);
30
31 if (GetOSD())
32 GetOSD()->SetSettingsText(msg, 3);
33Index: libmythtv/videosource.h
34===================================================================
35--- libmythtv/videosource.h (Revision 8095)
36+++ libmythtv/videosource.h (Arbeitskopie)
37@@ -16,6 +16,7 @@
38
39 class SignalTimeout;
40 class ChannelTimeout;
41+class CaptureCardDisplayName;
42 class UseEIT;
43
44 typedef QMap<int,QString> InputNames;
45Index: libmythtv/videosource.cpp
46===================================================================
47--- libmythtv/videosource.cpp (Revision 8095)
48+++ libmythtv/videosource.cpp (Arbeitskopie)
49@@ -1095,6 +1095,19 @@
50 };
51 };
52
53+class CaptureCardDisplayName: public LineEditSetting, public CCSetting
54+{
55+ public:
56+ CaptureCardDisplayName(const CaptureCard& parent)
57+ : CCSetting(parent, "displayname")
58+ {
59+ setLabel(QObject::tr("Display Name"));
60+ setHelpText(QObject::tr(
61+ "This Name is shown for Example when changeing "
62+ "the input in LiveTV via C or Y. "));
63+ };
64+};
65+
66 class AudioRateLimit: public ComboBoxSetting, public CCSetting
67 {
68 public:
69@@ -1470,9 +1483,12 @@
70
71 CardType* cardtype = new CardType(parent);
72 addChild(cardtype);
73+ addChild(new CaptureCardDisplayName(parent));
74+
75 setTrigger(cardtype);
76 setSaveAll(false);
77-
78+
79+
80 addTarget("V4L", new V4LConfigurationGroup(parent));
81 addTarget("DVB", new DVBConfigurationGroup(parent));
82 addTarget("HDTV", new pcHDTVConfigurationGroup(parent));