summaryrefslogtreecommitdiff
path: root/noncore/apps/zsafe/main.cpp
Unidiff
Diffstat (limited to 'noncore/apps/zsafe/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/zsafe/main.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp
index 4fe319b..5f48f77 100644
--- a/noncore/apps/zsafe/main.cpp
+++ b/noncore/apps/zsafe/main.cpp
@@ -5,17 +5,25 @@
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
12/* OPIE */
13#include <opie2/odebug.h>
14using namespace Opie::Core;
15
16/* QT */
11#ifdef DESKTOP 17#ifdef DESKTOP
12#include <qapplication.h> 18#include <qapplication.h>
13#else 19#else
14#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
15#endif 21#endif
22
23/* STD */
16#include <stdio.h> 24#include <stdio.h>
17#include <signal.h> 25#include <signal.h>
18 26
19ZSafe *zs; 27ZSafe *zs;
20#ifdef DESKTOP 28#ifdef DESKTOP
21QApplication *appl; 29QApplication *appl;
@@ -55,41 +63,38 @@ int main( int argc, char ** argv )
55 if (argc >= 3) 63 if (argc >= 3)
56 { 64 {
57#ifndef WIN32 65#ifndef WIN32
58 DeskW = atoi(argv[1]); 66 DeskW = atoi(argv[1]);
59 DeskH = atoi(argv[2]); 67 DeskH = atoi(argv[2]);
60#else 68#else
61 int w, h; 69 int w, h;
62 sscanf (argv[1], "%d", &w); 70 sscanf (argv[1], "%d", &w);
63 sscanf (argv[2], "%d", &h); 71 sscanf (argv[2], "%d", &h);
64 DeskW = w; 72 DeskW = w;
65 DeskH = h; 73 DeskH = h;
66#endif 74#endif
67 } 75 }
68 else 76 else
69 { 77 {
70 DeskW = 600; 78 DeskW = 600;
71 DeskH = 400; 79 DeskH = 400;
72 } 80 }
73#else 81#else
74 DeskW = a.desktop()->width(); 82 DeskW = a.desktop()->width();
75 DeskH = a.desktop()->height(); 83 DeskH = a.desktop()->height();
76 84
77 char buf[128]; 85 owarn << "Width: " << DeskW << " Height: " << DeskH << oendl;
78 sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH);
79 qWarning (buf);
80 86
81#ifdef JPATCH_HDE 87#ifdef JPATCH_HDE
82 // nothings 88 // nothings
83#else 89#else
84 if (DeskW > 240) 90 if (DeskW > 240)
85 { 91 {
86 DeskW -= 20; 92 DeskW -= 20;
87 DeskH += 25; 93 DeskH += 25;
88 sprintf (buf, "Changed width: %d Height: %d\n", DeskW, DeskH); 94 owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl;
89 qWarning (buf);
90 } 95 }
91#endif 96#endif
92 97
93#endif 98#endif
94 99
95 ZSafe mw; 100 ZSafe mw;