author | chicken <chicken> | 2004-03-01 20:00:34 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 20:00:34 (UTC) |
commit | 6bab4a28785c4ab5b0f0707c8c8db953e399cac8 (patch) (unidiff) | |
tree | 126dd6c09cc82b3d41ea70410803daac5cde5b60 /noncore/apps/zsafe/main.cpp | |
parent | 4ffae5ecb25f6d640c69f53f02755b6ec58d4c98 (diff) | |
download | opie-6bab4a28785c4ab5b0f0707c8c8db953e399cac8.zip opie-6bab4a28785c4ab5b0f0707c8c8db953e399cac8.tar.gz opie-6bab4a28785c4ab5b0f0707c8c8db953e399cac8.tar.bz2 |
fix includes
-rw-r--r-- | noncore/apps/zsafe/main.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 7ff549b..4fe319b 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp | |||
@@ -1,82 +1,81 @@ | |||
1 | /* | 1 | /* |
2 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> | 2 | ** Author: Carsten Schneider <CarstenSchneider@t-online.de> |
3 | ** | 3 | ** |
4 | ** $Id$ | 4 | ** $Id$ |
5 | ** | 5 | ** |
6 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html | 6 | ** Homepage: http://home.t-online.de/home/CarstenSchneider/zsafe/index.html |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
10 | #include "zsafe.h" | 10 | #include "zsafe.h" |
11 | #ifdef DESKTOP | 11 | #ifdef DESKTOP |
12 | #include <qapplication.h> | 12 | #include <qapplication.h> |
13 | #else | 13 | #else |
14 | #include <qpe/qpeapplication.h> | 14 | #include <qpe/qpeapplication.h> |
15 | #endif | 15 | #endif |
16 | #include <stdio.h> | 16 | #include <stdio.h> |
17 | #include <signal.h> | 17 | #include <signal.h> |
18 | #include "qsettings.h" | ||
19 | 18 | ||
20 | ZSafe *zs; | 19 | ZSafe *zs; |
21 | #ifdef DESKTOP | 20 | #ifdef DESKTOP |
22 | QApplication *appl; | 21 | QApplication *appl; |
23 | #else | 22 | #else |
24 | QPEApplication *appl; | 23 | QPEApplication *appl; |
25 | #endif | 24 | #endif |
26 | 25 | ||
27 | int DeskW; | 26 | int DeskW; |
28 | int DeskH; | 27 | int DeskH; |
29 | 28 | ||
30 | void suspend (int signum) | 29 | void suspend (int signum) |
31 | { | 30 | { |
32 | printf ("Suspend signal %d received\n", signum); | 31 | printf ("Suspend signal %d received\n", signum); |
33 | } | 32 | } |
34 | 33 | ||
35 | void resume (int signum) | 34 | void resume (int signum) |
36 | { | 35 | { |
37 | printf ("Resume signal %d received\n", signum); | 36 | printf ("Resume signal %d received\n", signum); |
38 | zs->resume(signum); | 37 | zs->resume(signum); |
39 | } | 38 | } |
40 | 39 | ||
41 | int main( int argc, char ** argv ) | 40 | int main( int argc, char ** argv ) |
42 | { | 41 | { |
43 | #ifndef WIN32 | 42 | #ifndef WIN32 |
44 | // install signal handler | 43 | // install signal handler |
45 | signal (SIGSTOP, suspend); | 44 | signal (SIGSTOP, suspend); |
46 | #endif | 45 | #endif |
47 | 46 | ||
48 | #ifdef DESKTOP | 47 | #ifdef DESKTOP |
49 | QApplication a( argc, argv ); | 48 | QApplication a( argc, argv ); |
50 | #else | 49 | #else |
51 | QPEApplication a( argc, argv ); | 50 | QPEApplication a( argc, argv ); |
52 | #endif | 51 | #endif |
53 | appl = &a; | 52 | appl = &a; |
54 | 53 | ||
55 | #ifdef DESKTOP | 54 | #ifdef DESKTOP |
56 | if (argc >= 3) | 55 | if (argc >= 3) |
57 | { | 56 | { |
58 | #ifndef WIN32 | 57 | #ifndef WIN32 |
59 | DeskW = atoi(argv[1]); | 58 | DeskW = atoi(argv[1]); |
60 | DeskH = atoi(argv[2]); | 59 | DeskH = atoi(argv[2]); |
61 | #else | 60 | #else |
62 | int w, h; | 61 | int w, h; |
63 | sscanf (argv[1], "%d", &w); | 62 | sscanf (argv[1], "%d", &w); |
64 | sscanf (argv[2], "%d", &h); | 63 | sscanf (argv[2], "%d", &h); |
65 | DeskW = w; | 64 | DeskW = w; |
66 | DeskH = h; | 65 | DeskH = h; |
67 | #endif | 66 | #endif |
68 | } | 67 | } |
69 | else | 68 | else |
70 | { | 69 | { |
71 | DeskW = 600; | 70 | DeskW = 600; |
72 | DeskH = 400; | 71 | DeskH = 400; |
73 | } | 72 | } |
74 | #else | 73 | #else |
75 | DeskW = a.desktop()->width(); | 74 | DeskW = a.desktop()->width(); |
76 | DeskH = a.desktop()->height(); | 75 | DeskH = a.desktop()->height(); |
77 | 76 | ||
78 | char buf[128]; | 77 | char buf[128]; |
79 | sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH); | 78 | sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH); |
80 | qWarning (buf); | 79 | qWarning (buf); |
81 | 80 | ||
82 | #ifdef JPATCH_HDE | 81 | #ifdef JPATCH_HDE |