Diffstat (limited to 'noncore/tools/remote/remote.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/remote/remote.cpp | 18 |
1 files changed, 14 insertions, 4 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 | |||
@@ -21,44 +21,54 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
21 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
22 | 22 | ||
23 | /* QT */ | 23 | /* QT */ |
24 | #include <qpushbutton.h> | 24 | #include <qpushbutton.h> |
25 | #include <qtabwidget.h> | 25 | #include <qtabwidget.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qmessagebox.h> | 27 | #include <qmessagebox.h> |
28 | #include <qpaintdevice.h> | 28 | #include <qpaintdevice.h> |
29 | #include <qobject.h> | 29 | #include <qobject.h> |
30 | 30 | ||
31 | /* STD */ | 31 | /* STD */ |
32 | #include <sys/socket.h> | 32 | #include <sys/socket.h> |
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(); |
49 | if(!lh.isLircdRunning()) { | 50 | |
50 | QMessageBox::critical(NULL, QObject::tr("Error"), | 51 | if(lh.checkLircdConfValid(false)) { |
51 | QObject::tr("Unable to start lircd"), | 52 | if(!lh.isLircdRunning()) { |
52 | QMessageBox::Ok, QMessageBox::NoButton); | 53 | QMessageBox::critical(NULL, QObject::tr("Error"), |
54 | QObject::tr("Unable to start lircd"), | ||
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 | } |