summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-07-10 02:46:51 (UTC)
committer llornkcor <llornkcor>2004-07-10 02:46:51 (UTC)
commitaa85f7f987521c9f01acf3d8b737c5a60175de46 (patch) (unidiff)
tree1d2fe1f44d31f599947ed657d867b696790fe523
parent9a51654b784192af0b02536e308f62bf5a5ae57c (diff)
downloadopie-aa85f7f987521c9f01acf3d8b737c5a60175de46.zip
opie-aa85f7f987521c9f01acf3d8b737c5a60175de46.tar.gz
opie-aa85f7f987521c9f01acf3d8b737c5a60175de46.tar.bz2
NO_OPIE define added
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/zsafe/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp
index 5f48f77..c187520 100644
--- a/noncore/apps/zsafe/main.cpp
+++ b/noncore/apps/zsafe/main.cpp
@@ -1,110 +1,112 @@
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 11
12#ifndef NO_OPIE
12/* OPIE */ 13/* OPIE */
13#include <opie2/odebug.h> 14#include <opie2/odebug.h>
14using namespace Opie::Core; 15using namespace Opie::Core;
16#endif
15 17
16/* QT */ 18/* QT */
17#ifdef DESKTOP 19#ifdef DESKTOP
18#include <qapplication.h> 20#include <qapplication.h>
19#else 21#else
20#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
21#endif 23#endif
22 24
23/* STD */ 25/* STD */
24#include <stdio.h> 26#include <stdio.h>
25#include <signal.h> 27#include <signal.h>
26 28
27ZSafe *zs; 29ZSafe *zs;
28#ifdef DESKTOP 30#ifdef DESKTOP
29QApplication *appl; 31QApplication *appl;
30#else 32#else
31QPEApplication *appl; 33QPEApplication *appl;
32#endif 34#endif
33 35
34int DeskW; 36int DeskW;
35int DeskH; 37int DeskH;
36 38
37void suspend (int signum) 39void suspend (int signum)
38{ 40{
39 printf ("Suspend signal %d received\n", signum); 41 printf ("Suspend signal %d received\n", signum);
40} 42}
41 43
42void resume (int signum) 44void resume (int signum)
43{ 45{
44 printf ("Resume signal %d received\n", signum); 46 printf ("Resume signal %d received\n", signum);
45 zs->resume(signum); 47 zs->resume(signum);
46} 48}
47 49
48int main( int argc, char ** argv ) 50int main( int argc, char ** argv )
49{ 51{
50#ifndef WIN32 52#ifndef WIN32
51 // install signal handler 53 // install signal handler
52 signal (SIGSTOP, suspend); 54 signal (SIGSTOP, suspend);
53#endif 55#endif
54 56
55#ifdef DESKTOP 57#ifdef DESKTOP
56 QApplication a( argc, argv ); 58 QApplication a( argc, argv );
57#else 59#else
58 QPEApplication a( argc, argv ); 60 QPEApplication a( argc, argv );
59#endif 61#endif
60 appl = &a; 62 appl = &a;
61 63
62#ifdef DESKTOP 64#ifdef DESKTOP
63 if (argc >= 3) 65 if (argc >= 3)
64 { 66 {
65#ifndef WIN32 67#ifndef WIN32
66 DeskW = atoi(argv[1]); 68 DeskW = atoi(argv[1]);
67 DeskH = atoi(argv[2]); 69 DeskH = atoi(argv[2]);
68#else 70#else
69 int w, h; 71 int w, h;
70 sscanf (argv[1], "%d", &w); 72 sscanf (argv[1], "%d", &w);
71 sscanf (argv[2], "%d", &h); 73 sscanf (argv[2], "%d", &h);
72 DeskW = w; 74 DeskW = w;
73 DeskH = h; 75 DeskH = h;
74#endif 76#endif
75 } 77 }
76 else 78 else
77 { 79 {
78 DeskW = 600; 80 DeskW = 600;
79 DeskH = 400; 81 DeskH = 400;
80 } 82 }
81#else 83#else
82 DeskW = a.desktop()->width(); 84 DeskW = a.desktop()->width();
83 DeskH = a.desktop()->height(); 85 DeskH = a.desktop()->height();
84 86
85 owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; 87 owarn << "Width: " << DeskW << " Height: " << DeskH << oendl;
86 88
87#ifdef JPATCH_HDE 89#ifdef JPATCH_HDE
88 // nothings 90 // nothings
89#else 91#else
90 if (DeskW > 240) 92 if (DeskW > 240)
91 { 93 {
92 DeskW -= 20; 94 DeskW -= 20;
93 DeskH += 25; 95 DeskH += 25;
94 owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; 96 owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl;
95 } 97 }
96#endif 98#endif
97 99
98#endif 100#endif
99 101
100 ZSafe mw; 102 ZSafe mw;
101 zs = &mw; 103 zs = &mw;
102 104
103#ifndef WIN32 105#ifndef WIN32
104 signal (SIGCONT, resume); 106 signal (SIGCONT, resume);
105#endif 107#endif
106#ifdef DESKTOP 108#ifdef DESKTOP
107 a.setMainWidget(&mw); 109 a.setMainWidget(&mw);
108 mw.show(); 110 mw.show();
109#else 111#else
110 // a.showMainWidget( &mw ); 112 // a.showMainWidget( &mw );