Diffstat (limited to 'noncore/applets/notesapplet/notes.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index 13f7cf3..b3e72a7 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp | |||
@@ -17,6 +17,4 @@ | |||
17 | 17 | ||
18 | #include <qapplication.h> | 18 | /* OPIE */ |
19 | #include <stdlib.h> | 19 | #include <opie2/odebug.h> |
20 | #include <qstringlist.h> | ||
21 | |||
22 | #include <opie2/otaskbarapplet.h> | 20 | #include <opie2/otaskbarapplet.h> |
@@ -28,5 +26,6 @@ | |||
28 | #include <qpe/config.h> | 26 | #include <qpe/config.h> |
27 | using namespace Opie::Core; | ||
28 | using namespace Opie::Ui; | ||
29 | 29 | ||
30 | // #include <qsocket.h> | 30 | /* QT */ |
31 | // #include <qclipboard.h> | ||
32 | #include <qmultilineedit.h> | 31 | #include <qmultilineedit.h> |
@@ -35,3 +34,3 @@ | |||
35 | #include <qmessagebox.h> | 34 | #include <qmessagebox.h> |
36 | 35 | #include <qapplication.h> | |
37 | #include <qdir.h> | 36 | #include <qdir.h> |
@@ -45,6 +44,9 @@ | |||
45 | #include <qstring.h> | 44 | #include <qstring.h> |
45 | #include <qstringlist.h> | ||
46 | #include <qtimer.h> | 46 | #include <qtimer.h> |
47 | 47 | ||
48 | /* STD */ | ||
49 | #include <stdlib.h> | ||
50 | |||
48 | /* XPM */ | 51 | /* XPM */ |
49 | using namespace Opie::Ui; | ||
50 | static char * notes_xpm[] = { | 52 | static char * notes_xpm[] = { |
@@ -86,5 +88,5 @@ NotesControl::NotesControl( QWidget *, const char * ) | |||
86 | if( !d.exists()) { | 88 | if( !d.exists()) { |
87 | qDebug("make dir"); | 89 | odebug << "make dir" << oendl; |
88 | if(!d.mkdir( QDir::homeDirPath()+"/notes", true)) | 90 | if(!d.mkdir( QDir::homeDirPath()+"/notes", true)) |
89 | qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed"); | 91 | odebug << "<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed" << oendl; |
90 | } | 92 | } |
@@ -167,3 +169,3 @@ void NotesControl::slotDeleteButton() { | |||
167 | QString selectedText = box->currentText(); | 169 | QString selectedText = box->currentText(); |
168 | qDebug("deleting "+selectedText); | 170 | odebug << "deleting "+selectedText << oendl; |
169 | 171 | ||
@@ -178,3 +180,3 @@ void NotesControl::slotDeleteButton() { | |||
178 | if(selectedText == cfg.readEntry( entryName )) { | 180 | if(selectedText == cfg.readEntry( entryName )) { |
179 | qDebug("removing %s, %d", selectedText.latin1(), i); | 181 | odebug << "removing " << selectedText.latin1() << ", " << i << "" << oendl; |
180 | for ( int j = i; j < noOfFiles; j++ ) { | 182 | for ( int j = i; j < noOfFiles; j++ ) { |
@@ -183,3 +185,3 @@ void NotesControl::slotDeleteButton() { | |||
183 | QString temp = cfg.readEntry(entryName2); | 185 | QString temp = cfg.readEntry(entryName2); |
184 | qDebug("move "+temp); | 186 | odebug << "move "+temp << oendl; |
185 | cfg.writeEntry(entryName, temp); | 187 | cfg.writeEntry(entryName, temp); |
@@ -194,6 +196,6 @@ void NotesControl::slotDeleteButton() { | |||
194 | QString fi=QPEApplication::documentDir()+"/text/plain/"+selectedText+".desktop"; | 196 | QString fi=QPEApplication::documentDir()+"/text/plain/"+selectedText+".desktop"; |
195 | qDebug(fi); | 197 | odebug << fi << oendl; |
196 | 198 | ||
197 | QFile f( fi); | 199 | QFile f( fi); |
198 | if( !f.remove()) qDebug(".desktop file not removed"); | 200 | if( !f.remove()) odebug << ".desktop file not removed" << oendl; |
199 | 201 | ||
@@ -285,3 +287,3 @@ void NotesControl::save() { | |||
285 | if( edited) { | 287 | if( edited) { |
286 | // qDebug("is edited"); | 288 | // odebug << "is edited" << oendl; |
287 | QString rt = view->text(); | 289 | QString rt = view->text(); |
@@ -303,3 +305,3 @@ void NotesControl::save() { | |||
303 | docname = "Empty Text"; | 305 | docname = "Empty Text"; |
304 | // qDebug(docname); | 306 | // odebug << docname << oendl; |
305 | 307 | ||
@@ -314,3 +316,3 @@ void NotesControl::save() { | |||
314 | // else | 316 | // else |
315 | // qDebug("oldname equals docname"); | 317 | // odebug << "oldname equals docname" << oendl; |
316 | 318 | ||
@@ -318,3 +320,3 @@ void NotesControl::save() { | |||
318 | if(QFile(doc->linkFile()).exists()) | 320 | if(QFile(doc->linkFile()).exists()) |
319 | qDebug("puppie"); | 321 | odebug << "puppie" << oendl; |
320 | doc->setType("text/plain"); | 322 | doc->setType("text/plain"); |
@@ -329,3 +331,3 @@ void NotesControl::save() { | |||
329 | edited=false; | 331 | edited=false; |
330 | // qDebug("save"); | 332 | // odebug << "save" << oendl; |
331 | if (doPopulate) | 333 | if (doPopulate) |
@@ -341,3 +343,3 @@ void NotesControl::populateBox() { | |||
341 | box->clear(); | 343 | box->clear(); |
342 | // qDebug("populate"); | 344 | // odebug << "populate" << oendl; |
343 | Config cfg("Notes"); | 345 | Config cfg("Notes"); |
@@ -376,3 +378,3 @@ void NotesControl::load() { | |||
376 | void NotesControl::load(const QString & file) { | 378 | void NotesControl::load(const QString & file) { |
377 | qDebug("loading "+file); | 379 | odebug << "loading "+file << oendl; |
378 | QString name = file; | 380 | QString name = file; |
@@ -403,3 +405,3 @@ void NotesControl::loadDoc( const DocLnk &f) { | |||
403 | if ( !fm.loadFile( f, txt ) ) { | 405 | if ( !fm.loadFile( f, txt ) ) { |
404 | qDebug("could not load file "+f.file()); | 406 | odebug << "could not load file "+f.file() << oendl; |
405 | return; | 407 | return; |
@@ -437,3 +439,3 @@ void NotesControl::slotSearch() { | |||
437 | // if(e->key() == Key_C) { //copy | 439 | // if(e->key() == Key_C) { //copy |
438 | // qDebug("copy"); | 440 | // odebug << "copy" << oendl; |
439 | // QClipboard *cb = QApplication::clipboard(); | 441 | // QClipboard *cb = QApplication::clipboard(); |
@@ -484,6 +486,6 @@ void NotesApplet::mousePressEvent( QMouseEvent *) { | |||
484 | if(vc->showMax) { | 486 | if(vc->showMax) { |
485 | qDebug("show max"); | 487 | odebug << "show max" << oendl; |
486 | vc->showMaximized(); | 488 | vc->showMaximized(); |
487 | } else { | 489 | } else { |
488 | qDebug("no show max"); | 490 | odebug << "no show max" << oendl; |
489 | QWidget *wid = QPEApplication::desktop(); | 491 | QWidget *wid = QPEApplication::desktop(); |