summaryrefslogtreecommitdiff
path: root/noncore/apps/zsafe/main.cpp
authorllornkcor <llornkcor>2004-07-21 20:44:12 (UTC)
committer llornkcor <llornkcor>2004-07-21 20:44:12 (UTC)
commit51d06a743940249e34a2bcc970b825bad99819d3 (patch) (unidiff)
tree4c8075a3e3b46146da7630998ee52265e83c0939 /noncore/apps/zsafe/main.cpp
parent8d5f46620d92ff1fb9477ada28b6a1aafeed6d16 (diff)
downloadopie-51d06a743940249e34a2bcc970b825bad99819d3.zip
opie-51d06a743940249e34a2bcc970b825bad99819d3.tar.gz
opie-51d06a743940249e34a2bcc970b825bad99819d3.tar.bz2
fixes
Diffstat (limited to 'noncore/apps/zsafe/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/zsafe/main.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp
index c187520..2707730 100644
--- a/noncore/apps/zsafe/main.cpp
+++ b/noncore/apps/zsafe/main.cpp
@@ -46,28 +46,28 @@ void resume (int signum)
46 printf ("Resume signal %d received\n", signum); 46 printf ("Resume signal %d received\n", signum);
47 zs->resume(signum); 47 zs->resume(signum);
48} 48}
49 49
50int main( int argc, char ** argv ) 50int main( int argc, char ** argv )
51{ 51{
52#ifndef WIN32 52#ifndef Q_WS_WIN
53 // install signal handler 53 // install signal handler
54 signal (SIGSTOP, suspend); 54// signal (SIGSTOP, suspend);
55#endif 55#endif
56 56
57#ifdef DESKTOP 57#ifdef DESKTOP
58 QApplication a( argc, argv ); 58 QApplication a( argc, argv );
59#else 59#else
60 QPEApplication a( argc, argv ); 60 QPEApplication a( argc, argv );
61#endif 61#endif
62 appl = &a; 62 appl = &a;
63 63
64#ifdef DESKTOP 64#ifdef DESKTOP
65 if (argc >= 3) 65 if (argc >= 3)
66 { 66 {
67#ifndef WIN32 67#ifndef Q_WS_WIN
68 DeskW = atoi(argv[1]); 68 DeskW = atoi(argv[1]);
69 DeskH = atoi(argv[2]); 69 DeskH = atoi(argv[2]);
70#else 70#else
71 int w, h; 71 int w, h;
72 sscanf (argv[1], "%d", &w); 72 sscanf (argv[1], "%d", &w);
73 sscanf (argv[2], "%d", &h); 73 sscanf (argv[2], "%d", &h);
@@ -81,38 +81,43 @@ int main( int argc, char ** argv )
81 DeskH = 400; 81 DeskH = 400;
82 } 82 }
83#else 83#else
84 DeskW = a.desktop()->width(); 84 DeskW = a.desktop()->width();
85 DeskH = a.desktop()->height(); 85 DeskH = a.desktop()->height();
86 86
87#ifndef NO_OPIE
87 owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; 88 owarn << "Width: " << DeskW << " Height: " << DeskH << oendl;
88 89#endif
89#ifdef JPATCH_HDE 90#ifdef JPATCH_HDE
90 // nothings 91 // nothings
91#else 92#else
92 if (DeskW > 240) 93 if (DeskW > 240)
93 { 94 {
94 DeskW -= 20; 95 DeskW -= 20;
95 DeskH += 25; 96 DeskH += 25;
97#ifndef NO_OPIE
96 owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; 98 owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl;
99#endif
97 } 100 }
98#endif 101#endif
99 102
100#endif 103#endif
101 104
102 ZSafe mw; 105 ZSafe *mw = new ZSafe( 0, 0, QWidget::WDestructiveClose );
103 zs = &mw; 106// ZSafe mw;
104 107// zs = &mw;
105#ifndef WIN32 108 zs = mw;
106 signal (SIGCONT, resume); 109
110#ifndef Q_WS_WIN
111// signal (SIGCONT, resume);
107#endif 112#endif
108#ifdef DESKTOP 113#ifdef DESKTOP
109 a.setMainWidget(&mw); 114 a.setMainWidget(mw);
110 mw.show(); 115 mw->show();
111#else 116#else
112 // a.showMainWidget( &mw ); 117 // a.showMainWidget( &mw );
113 a.showMainDocumentWidget( &mw ); 118 a.showMainDocumentWidget( mw );
114#endif 119#endif
115 int ret = a.exec(); 120 int ret = a.exec();
116 121
117 return ret; 122 return ret;
118} 123}