summaryrefslogtreecommitdiff
path: root/noncore/tools/remote/remotetab.cpp
Side-by-side diff
Diffstat (limited to 'noncore/tools/remote/remotetab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/remotetab.cpp12
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
@@ -48,12 +48,20 @@ RemoteTab::RemoteTab(QWidget *parent, const char *name):QWidget(parent,name)
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());
@@ -154,7 +162,11 @@ void RemoteTab::remoteSelected(const QString &string)
}
}
void RemoteTab::updateRemotesList()
{
topGroup->updateRemotes(cfg);
+
+ QString curr_remote = topGroup->getRemotesText();
+ if(curr_remote != "")
+ remoteSelected(curr_remote);
}