summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/remotetab.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/tools/remote/remotetab.cpp b/noncore/tools/remote/remotetab.cpp
index c89d8c2..065feac 100644
--- a/noncore/tools/remote/remotetab.cpp
+++ b/noncore/tools/remote/remotetab.cpp
@@ -30,61 +30,65 @@ RemoteTab::RemoteTab(QWidget *parent, const char *name):QWidget(parent,name)
30 30
31 layout->addSpacing(1); 31 layout->addSpacing(1);
32 32
33 dvdGroup = new DVDGroup(this); 33 dvdGroup = new DVDGroup(this);
34 //dvdGroup->setMaximumHeight(68); 34 //dvdGroup->setMaximumHeight(68);
35 layout->addWidget(dvdGroup, 0, 0); 35 layout->addWidget(dvdGroup, 0, 0);
36 36
37 layout->addSpacing(1); 37 layout->addSpacing(1);
38 38
39 vcrGroup = new VCRGroup(this); 39 vcrGroup = new VCRGroup(this);
40 layout->addWidget(vcrGroup, 0, 0); 40 layout->addWidget(vcrGroup, 0, 0);
41 //vcrGroup->setMaximumHeight(45); 41 //vcrGroup->setMaximumHeight(45);
42 42
43 layout->addSpacing(1); 43 layout->addSpacing(1);
44 44
45 channelGroup = new ChannelGroup(this); 45 channelGroup = new ChannelGroup(this);
46 //channelGroup->setMaximumHeight(91); 46 //channelGroup->setMaximumHeight(91);
47 layout->addWidget(channelGroup, 0, 0); 47 layout->addWidget(channelGroup, 0, 0);
48 48
49 this->setMaximumWidth(240); 49 this->setMaximumWidth(240);
50} 50}
51 51
52int RemoteTab::sendIR() 52int RemoteTab::sendIR()
53{ 53{
54 LircHandler lh;
55
56 if(!lh.checkLircdConfValid(false))
57 return 0;
58
54 QString curr_remote = topGroup->getRemotesText(); 59 QString curr_remote = topGroup->getRemotesText();
55 if(curr_remote != "") 60 if(curr_remote != "")
56 cfg->setGroup(curr_remote); 61 cfg->setGroup(curr_remote);
57 else { 62 else {
58 QMessageBox::warning(this, tr("Error"), tr("Please select or create\na remote layout"), QMessageBox::Ok, QMessageBox::NoButton); 63 QMessageBox::warning(this, tr("Error"), tr("Please select or create\na remote layout"), QMessageBox::Ok, QMessageBox::NoButton);
59 return 0; 64 return 0;
60 } 65 }
61 66
62 const QObject *button = sender(); 67 const QObject *button = sender();
63 QString string = cfg->readEntry(button->name()); 68 QString string = cfg->readEntry(button->name());
64 if(string != "") { 69 if(string != "") {
65 string+='\n'; 70 string+='\n';
66 LircHandler lh;
67 return lh.sendIR(string.latin1()); 71 return lh.sendIR(string.latin1());
68 } 72 }
69 else { 73 else {
70 QMessageBox::warning(this, tr("Error"), tr("This button has not\nbeen configured"), QMessageBox::Ok, QMessageBox::NoButton); 74 QMessageBox::warning(this, tr("Error"), tr("This button has not\nbeen configured"), QMessageBox::Ok, QMessageBox::NoButton);
71 return 0; 75 return 0;
72 } 76 }
73} 77}
74 78
75void RemoteTab::setConfig(Config *newCfg) 79void RemoteTab::setConfig(Config *newCfg)
76{ 80{
77 cfg = newCfg; 81 cfg = newCfg;
78 cfg->setGroup("Remotes"); 82 cfg->setGroup("Remotes");
79 topGroup->updateRemotes(cfg); 83 topGroup->updateRemotes(cfg);
80 84
81 QString curr_remote = topGroup->getRemotesText(); 85 QString curr_remote = topGroup->getRemotesText();
82 if(curr_remote != "") 86 if(curr_remote != "")
83 remoteSelected(curr_remote); 87 remoteSelected(curr_remote);
84} 88}
85 89
86void RemoteTab::remoteSelected(const QString &string) 90void RemoteTab::remoteSelected(const QString &string)
87{ 91{
88 printf("1%s\n", string.latin1() ); 92 printf("1%s\n", string.latin1() );
89 cfg->setGroup(string); 93 cfg->setGroup(string);
90 const QObject *obj; 94 const QObject *obj;