-rw-r--r-- | noncore/apps/zsafe/config.in | 2 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.cpp | 85 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.pro | 2 |
3 files changed, 85 insertions, 4 deletions
diff --git a/noncore/apps/zsafe/config.in b/noncore/apps/zsafe/config.in index 53956ad..4b1e968 100644 --- a/noncore/apps/zsafe/config.in +++ b/noncore/apps/zsafe/config.in | |||
@@ -3,3 +3,3 @@ config ZSAFE | |||
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE |
5 | 5 | ||
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index bd03031..abf6511 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp | |||
@@ -11,3 +11,4 @@ | |||
11 | ** Compile Flags: | 11 | ** Compile Flags: |
12 | ** Zaurus arm : none | 12 | ** Zaurus arm : -DNO_OPIE |
13 | ** Zaurus Opie arm: none | ||
13 | ** Linux Desktop : -DDESKTOP | 14 | ** Linux Desktop : -DDESKTOP |
@@ -26,4 +27,8 @@ | |||
26 | #ifndef DESKTOP | 27 | #ifndef DESKTOP |
28 | #ifndef NO_OPIE | ||
29 | #include <opie/ofiledialog.h> | ||
30 | #else | ||
27 | #include "scqtfileedit.h" | 31 | #include "scqtfileedit.h" |
28 | #endif | 32 | #endif |
33 | #endif | ||
29 | 34 | ||
@@ -1197,2 +1202,5 @@ bool ZSafe::isCategory(QListViewItem *_item) | |||
1197 | { | 1202 | { |
1203 | if (_item == NULL) | ||
1204 | return FALSE; | ||
1205 | |||
1198 | QString categoryName = _item->text (0); | 1206 | QString categoryName = _item->text (0); |
@@ -1209,2 +1217,13 @@ void ZSafe::removeAsciiFile() | |||
1209 | #ifndef DESKTOP | 1217 | #ifndef DESKTOP |
1218 | #ifndef NO_OPIE | ||
1219 | QMap<QString, QStringList> mimeTypes; | ||
1220 | mimeTypes.insert(tr("All"), QStringList() ); | ||
1221 | mimeTypes.insert(tr("Text"), "text/*" ); | ||
1222 | QString fn = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | ||
1223 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
1224 | QString::null, | ||
1225 | mimeTypes, | ||
1226 | this, | ||
1227 | tr ("Remove text file")); | ||
1228 | #else | ||
1210 | QString fn = ScQtFileEdit::getOpenFileName(this, | 1229 | QString fn = ScQtFileEdit::getOpenFileName(this, |
@@ -1213,2 +1232,3 @@ void ZSafe::removeAsciiFile() | |||
1213 | "*.txt"); | 1232 | "*.txt"); |
1233 | #endif | ||
1214 | #else | 1234 | #else |
@@ -1247,2 +1267,13 @@ void ZSafe::writeAllEntries() | |||
1247 | #ifndef DESKTOP | 1267 | #ifndef DESKTOP |
1268 | #ifndef NO_OPIE | ||
1269 | QMap<QString, QStringList> mimeTypes; | ||
1270 | mimeTypes.insert(tr("All"), QStringList() ); | ||
1271 | mimeTypes.insert(tr("Text"), "text/*" ); | ||
1272 | QString fn = OFileDialog::getSaveFileName( OFileSelector::EXTENDED_ALL, | ||
1273 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
1274 | QString::null, | ||
1275 | mimeTypes, | ||
1276 | this, | ||
1277 | tr ("Export text file")); | ||
1278 | #else | ||
1248 | QString fn = ScQtFileEdit::getSaveAsFileName(this, | 1279 | QString fn = ScQtFileEdit::getSaveAsFileName(this, |
@@ -1251,2 +1282,3 @@ void ZSafe::writeAllEntries() | |||
1251 | "*.txt"); | 1282 | "*.txt"); |
1283 | #endif | ||
1252 | #else | 1284 | #else |
@@ -1330,2 +1362,13 @@ void ZSafe::readAllEntries() | |||
1330 | #ifndef DESKTOP | 1362 | #ifndef DESKTOP |
1363 | #ifndef NO_OPIE | ||
1364 | QMap<QString, QStringList> mimeTypes; | ||
1365 | mimeTypes.insert(tr("All"), QStringList() ); | ||
1366 | mimeTypes.insert(tr("Text"), "text/*" ); | ||
1367 | QString fn = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | ||
1368 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
1369 | QString::null, | ||
1370 | mimeTypes, | ||
1371 | this, | ||
1372 | tr ("Import text file")); | ||
1373 | #else | ||
1331 | QString fn = ScQtFileEdit::getOpenFileName(this, | 1374 | QString fn = ScQtFileEdit::getOpenFileName(this, |
@@ -1334,2 +1377,3 @@ void ZSafe::readAllEntries() | |||
1334 | "*.txt"); | 1377 | "*.txt"); |
1378 | #endif | ||
1335 | #else | 1379 | #else |
@@ -3143,2 +3187,13 @@ void ZSafe::newDocument() | |||
3143 | #ifndef DESKTOP | 3187 | #ifndef DESKTOP |
3188 | #ifndef NO_OPIE | ||
3189 | QMap<QString, QStringList> mimeTypes; | ||
3190 | mimeTypes.insert(tr("All"), QStringList() ); | ||
3191 | mimeTypes.insert(tr("ZSafe"), "zsafe/*" ); | ||
3192 | QString newFile = OFileDialog::getSaveFileName( OFileSelector::EXTENDED_ALL, | ||
3193 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
3194 | QString::null, | ||
3195 | mimeTypes, | ||
3196 | this, | ||
3197 | tr ("Create new ZSafe document")); | ||
3198 | #else | ||
3144 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, | 3199 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, |
@@ -3147,2 +3202,3 @@ void ZSafe::newDocument() | |||
3147 | "*.zsf"); | 3202 | "*.zsf"); |
3203 | #endif | ||
3148 | #else | 3204 | #else |
@@ -3191,3 +3247,3 @@ void ZSafe::newDocument() | |||
3191 | // m_password = ""; | 3247 | // m_password = ""; |
3192 | // selectedItem = NULL; | 3248 | selectedItem = NULL; |
3193 | 3249 | ||
@@ -3219,2 +3275,13 @@ void ZSafe::loadDocument() | |||
3219 | #ifndef DESKTOP | 3275 | #ifndef DESKTOP |
3276 | #ifndef NO_OPIE | ||
3277 | QMap<QString, QStringList> mimeTypes; | ||
3278 | mimeTypes.insert(tr("All"), QStringList() ); | ||
3279 | mimeTypes.insert(tr("ZSafe"), "zsafe/*" ); | ||
3280 | QString newFile = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | ||
3281 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
3282 | QString::null, | ||
3283 | mimeTypes, | ||
3284 | this, | ||
3285 | tr ("Open ZSafe document")); | ||
3286 | #else | ||
3220 | QString newFile = ScQtFileEdit::getOpenFileName(this, | 3287 | QString newFile = ScQtFileEdit::getOpenFileName(this, |
@@ -3223,2 +3290,3 @@ void ZSafe::loadDocument() | |||
3223 | "*.zsf"); | 3290 | "*.zsf"); |
3291 | #endif | ||
3224 | #else | 3292 | #else |
@@ -3285,2 +3353,13 @@ void ZSafe::saveDocumentAs() | |||
3285 | #ifndef DESKTOP | 3353 | #ifndef DESKTOP |
3354 | #ifndef NO_OPIE | ||
3355 | QMap<QString, QStringList> mimeTypes; | ||
3356 | mimeTypes.insert(tr("All"), QStringList() ); | ||
3357 | mimeTypes.insert(tr("ZSafe"), "zsafe/*" ); | ||
3358 | QString newFile = OFileDialog::getSaveFileName( OFileSelector::EXTENDED_ALL, | ||
3359 | QDir::homeDirPath() + "/Documents/application/zsafe", | ||
3360 | QString::null, | ||
3361 | mimeTypes, | ||
3362 | this, | ||
3363 | tr ("Save ZSafe document as..")); | ||
3364 | #else | ||
3286 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, | 3365 | QString newFile = ScQtFileEdit::getSaveAsFileName(this, |
@@ -3289,2 +3368,3 @@ void ZSafe::saveDocumentAs() | |||
3289 | "*.zsf"); | 3368 | "*.zsf"); |
3369 | #endif | ||
3290 | #else | 3370 | #else |
@@ -3306,2 +3386,3 @@ void ZSafe::saveDocumentAs() | |||
3306 | 3386 | ||
3387 | selectedItem = NULL; | ||
3307 | filename = newFile; | 3388 | filename = newFile; |
diff --git a/noncore/apps/zsafe/zsafe.pro b/noncore/apps/zsafe/zsafe.pro index ae4c793..5cb74dd 100644 --- a/noncore/apps/zsafe/zsafe.pro +++ b/noncore/apps/zsafe/zsafe.pro | |||
@@ -16,3 +16,3 @@ INCLUDEPATH += $(OPIEDIR)/noncore/apps/zsafe | |||
16 | DEPENDPATH+= $(OPIEDIR)/include | 16 | DEPENDPATH+= $(OPIEDIR)/include |
17 | LIBS += -Wl,-rpath,$(OPIEDIR)/lib -L$(OPIEDIR)/lib -lqpe | 17 | LIBS += -Wl,-rpath,$(OPIEDIR)/lib -L$(OPIEDIR)/lib -lqpe -lopie |
18 | TARGET = zsafe | 18 | TARGET = zsafe |