Diffstat (limited to 'noncore/tools/remote/remotetab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/remote/remotetab.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/tools/remote/remotetab.cpp b/noncore/tools/remote/remotetab.cpp index 45995fd..c89d8c2 100644 --- a/noncore/tools/remote/remotetab.cpp +++ b/noncore/tools/remote/remotetab.cpp @@ -46,16 +46,24 @@ RemoteTab::RemoteTab(QWidget *parent, const char *name):QWidget(parent,name) // channelGroup->setMaximumHeight(91); layout->addWidget(channelGroup, 0, 0); this->setMaximumWidth(240); } int RemoteTab::sendIR() { + QString curr_remote = topGroup->getRemotesText(); + if(curr_remote != "") + cfg->setGroup(curr_remote); + else { + QMessageBox::warning(this, tr("Error"), tr("Please select or create\na remote layout"), QMessageBox::Ok, QMessageBox::NoButton); + return 0; + } + const QObject *button = sender(); QString string = cfg->readEntry(button->name()); if(string != "") { string+='\n'; LircHandler lh; return lh.sendIR(string.latin1()); } else { @@ -152,9 +160,13 @@ void RemoteTab::remoteSelected(const QString &string) } } } } void RemoteTab::updateRemotesList() { topGroup->updateRemotes(cfg); + + QString curr_remote = topGroup->getRemotesText(); + if(curr_remote != "") + remoteSelected(curr_remote); } |