Diffstat (limited to 'noncore/tools/remote/remote.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/tools/remote/remote.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/noncore/tools/remote/remote.cpp b/noncore/tools/remote/remote.cpp index 5b756cb..03d70c4 100644 --- a/noncore/tools/remote/remote.cpp +++ b/noncore/tools/remote/remote.cpp | |||
@@ -33,32 +33,42 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
33 | #include <sys/types.h> | 33 | #include <sys/types.h> |
34 | #include <sys/un.h> | 34 | #include <sys/un.h> |
35 | #include <unistd.h> | 35 | #include <unistd.h> |
36 | #include <stdio.h> | 36 | #include <stdio.h> |
37 | #include <signal.h> | 37 | #include <signal.h> |
38 | 38 | ||
39 | 39 | ||
40 | int main( int argc, char **argv ) | 40 | int main( int argc, char **argv ) |
41 | { | 41 | { |
42 | QPEApplication a( argc, argv ); | 42 | QPEApplication a( argc, argv ); |
43 | 43 | ||
44 | LircHandler lh; | 44 | LircHandler lh; |
45 | bool disablelirc = false; | ||
45 | 46 | ||
46 | lh.disableIrDA(); | 47 | lh.disableIrDA(); |
47 | lh.setupModules(); | 48 | lh.setupModules(); |
48 | lh.startLircd(); | 49 | lh.startLircd(); |
50 | |||
51 | if(lh.checkLircdConfValid(false)) { | ||
49 | if(!lh.isLircdRunning()) { | 52 | if(!lh.isLircdRunning()) { |
50 | QMessageBox::critical(NULL, QObject::tr("Error"), | 53 | QMessageBox::critical(NULL, QObject::tr("Error"), |
51 | QObject::tr("Unable to start lircd"), | 54 | QObject::tr("Unable to start lircd"), |
52 | QMessageBox::Ok, QMessageBox::NoButton); | 55 | QMessageBox::Ok, QMessageBox::NoButton); |
56 | disablelirc = true; | ||
57 | } | ||
58 | } | ||
59 | else { | ||
60 | disablelirc = true; | ||
53 | } | 61 | } |
54 | 62 | ||
55 | MainView w; | 63 | MainView w; |
64 | if(!disablelirc) | ||
65 | w.updateLearnTab(); | ||
56 | a.setMainWidget( &w ); | 66 | a.setMainWidget( &w ); |
57 | QPEApplication::showWidget( &w ); | 67 | QPEApplication::showWidget( &w ); |
58 | int result = a.exec(); | 68 | int result = a.exec(); |
59 | 69 | ||
60 | lh.stopLircd(); | 70 | lh.stopLircd(); |
61 | lh.cleanupModules(); | 71 | lh.cleanupModules(); |
62 | 72 | ||
63 | return result; | 73 | return result; |
64 | } | 74 | } |