author | zecke <zecke> | 2004-11-15 17:09:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-15 17:09:35 (UTC) |
commit | 43773cc47947f88f48aa7a9f64ff58defff70c83 (patch) (unidiff) | |
tree | 3a52b3cd048687183bc3475587f4b89f523ca8c9 | |
parent | 6d7b1a9a5f32a0b69c5ee9cc963e8a43a76327cf (diff) | |
download | opie-43773cc47947f88f48aa7a9f64ff58defff70c83.zip opie-43773cc47947f88f48aa7a9f64ff58defff70c83.tar.gz opie-43773cc47947f88f48aa7a9f64ff58defff70c83.tar.bz2 |
-Opie ZSafe is now quicklaunchable
-And it uses OConfig the right was now (in ~/Settings)
-rw-r--r-- | noncore/apps/zsafe/main.cpp | 96 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.pro | 4 |
2 files changed, 3 insertions, 97 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 2707730..6dfd455 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp | |||
@@ -9,32 +9,11 @@ | |||
9 | 9 | ||
10 | #include "zsafe.h" | 10 | #include "zsafe.h" |
11 | 11 | ||
12 | #ifndef NO_OPIE | ||
13 | /* OPIE */ | 12 | /* OPIE */ |
14 | #include <opie2/odebug.h> | 13 | #include <opie2/odebug.h> |
15 | using namespace Opie::Core; | ||
16 | #endif | ||
17 | 14 | ||
18 | /* QT */ | 15 | /* QT */ |
19 | #ifdef DESKTOP | 16 | #include <opie2/oapplicationfactory.h> |
20 | #include <qapplication.h> | ||
21 | #else | ||
22 | #include <qpe/qpeapplication.h> | ||
23 | #endif | ||
24 | |||
25 | /* STD */ | ||
26 | #include <stdio.h> | ||
27 | #include <signal.h> | ||
28 | |||
29 | ZSafe *zs; | ||
30 | #ifdef DESKTOP | ||
31 | QApplication *appl; | ||
32 | #else | ||
33 | QPEApplication *appl; | ||
34 | #endif | ||
35 | |||
36 | int DeskW; | ||
37 | int DeskH; | ||
38 | 17 | ||
39 | void suspend (int signum) | 18 | void suspend (int signum) |
40 | { | 19 | { |
@@ -47,77 +26,6 @@ void resume (int signum) | |||
47 | zs->resume(signum); | 26 | zs->resume(signum); |
48 | } | 27 | } |
49 | 28 | ||
50 | int main( int argc, char ** argv ) | ||
51 | { | ||
52 | #ifndef Q_WS_WIN | ||
53 | // install signal handler | ||
54 | // signal (SIGSTOP, suspend); | ||
55 | #endif | ||
56 | |||
57 | #ifdef DESKTOP | ||
58 | QApplication a( argc, argv ); | ||
59 | #else | ||
60 | QPEApplication a( argc, argv ); | ||
61 | #endif | ||
62 | appl = &a; | ||
63 | |||
64 | #ifdef DESKTOP | ||
65 | if (argc >= 3) | ||
66 | { | ||
67 | #ifndef Q_WS_WIN | ||
68 | DeskW = atoi(argv[1]); | ||
69 | DeskH = atoi(argv[2]); | ||
70 | #else | ||
71 | int w, h; | ||
72 | sscanf (argv[1], "%d", &w); | ||
73 | sscanf (argv[2], "%d", &h); | ||
74 | DeskW = w; | ||
75 | DeskH = h; | ||
76 | #endif | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | DeskW = 600; | ||
81 | DeskH = 400; | ||
82 | } | ||
83 | #else | ||
84 | DeskW = a.desktop()->width(); | ||
85 | DeskH = a.desktop()->height(); | ||
86 | |||
87 | #ifndef NO_OPIE | ||
88 | owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; | ||
89 | #endif | ||
90 | #ifdef JPATCH_HDE | ||
91 | // nothings | ||
92 | #else | ||
93 | if (DeskW > 240) | ||
94 | { | ||
95 | DeskW -= 20; | ||
96 | DeskH += 25; | ||
97 | #ifndef NO_OPIE | ||
98 | owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; | ||
99 | #endif | ||
100 | } | ||
101 | #endif | ||
102 | |||
103 | #endif | ||
104 | 29 | ||
105 | ZSafe *mw = new ZSafe( 0, 0, QWidget::WDestructiveClose ); | 30 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<ZSafe> ) |
106 | // ZSafe mw; | ||
107 | // zs = &mw; | ||
108 | zs = mw; | ||
109 | 31 | ||
110 | #ifndef Q_WS_WIN | ||
111 | // signal (SIGCONT, resume); | ||
112 | #endif | ||
113 | #ifdef DESKTOP | ||
114 | a.setMainWidget(mw); | ||
115 | mw->show(); | ||
116 | #else | ||
117 | // a.showMainWidget( &mw ); | ||
118 | a.showMainDocumentWidget( mw ); | ||
119 | #endif | ||
120 | int ret = a.exec(); | ||
121 | |||
122 | return ret; | ||
123 | } | ||
diff --git a/noncore/apps/zsafe/zsafe.pro b/noncore/apps/zsafe/zsafe.pro index 236d11e..e53015d 100644 --- a/noncore/apps/zsafe/zsafe.pro +++ b/noncore/apps/zsafe/zsafe.pro | |||
@@ -1,6 +1,4 @@ | |||
1 | TEMPLATE = app | 1 | CONFIG = qt quick-app |
2 | CONFIG = qt warn_on | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h \ | 2 | HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h \ |
5 | scqtfiledlg.h | 3 | scqtfiledlg.h |
6 | SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp \ | 4 | SOURCES = main.cpp zsafe.cpp krc2.cpp category.cpp \ |