-rw-r--r-- | noncore/applets/notesapplet/config.in | 2 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 54 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notesapplet.pro | 18 |
3 files changed, 38 insertions, 36 deletions
diff --git a/noncore/applets/notesapplet/config.in b/noncore/applets/notesapplet/config.in index 27a8187..c92c1d5 100644 --- a/noncore/applets/notesapplet/config.in +++ b/noncore/applets/notesapplet/config.in @@ -3,2 +3,2 @@ default "y" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE 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 @@ -#include <qapplication.h> -#include <stdlib.h> -#include <qstringlist.h> - +/* OPIE */ +#include <opie2/odebug.h> #include <opie2/otaskbarapplet.h> @@ -28,5 +26,6 @@ #include <qpe/config.h> +using namespace Opie::Core; +using namespace Opie::Ui; -// #include <qsocket.h> -// #include <qclipboard.h> +/* QT */ #include <qmultilineedit.h> @@ -35,3 +34,3 @@ #include <qmessagebox.h> - +#include <qapplication.h> #include <qdir.h> @@ -45,6 +44,9 @@ #include <qstring.h> +#include <qstringlist.h> #include <qtimer.h> +/* STD */ +#include <stdlib.h> + /* XPM */ -using namespace Opie::Ui; static char * notes_xpm[] = { @@ -86,5 +88,5 @@ NotesControl::NotesControl( QWidget *, const char * ) if( !d.exists()) { - qDebug("make dir"); + odebug << "make dir" << oendl; if(!d.mkdir( QDir::homeDirPath()+"/notes", true)) - qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed"); + odebug << "<<<<<<<<<<<<<<<<<<<<<<<<<<<make dir failed" << oendl; } @@ -167,3 +169,3 @@ void NotesControl::slotDeleteButton() { QString selectedText = box->currentText(); - qDebug("deleting "+selectedText); + odebug << "deleting "+selectedText << oendl; @@ -178,3 +180,3 @@ void NotesControl::slotDeleteButton() { if(selectedText == cfg.readEntry( entryName )) { - qDebug("removing %s, %d", selectedText.latin1(), i); + odebug << "removing " << selectedText.latin1() << ", " << i << "" << oendl; for ( int j = i; j < noOfFiles; j++ ) { @@ -183,3 +185,3 @@ void NotesControl::slotDeleteButton() { QString temp = cfg.readEntry(entryName2); - qDebug("move "+temp); + odebug << "move "+temp << oendl; cfg.writeEntry(entryName, temp); @@ -194,6 +196,6 @@ void NotesControl::slotDeleteButton() { QString fi=QPEApplication::documentDir()+"/text/plain/"+selectedText+".desktop"; - qDebug(fi); + odebug << fi << oendl; QFile f( fi); - if( !f.remove()) qDebug(".desktop file not removed"); + if( !f.remove()) odebug << ".desktop file not removed" << oendl; @@ -285,3 +287,3 @@ void NotesControl::save() { if( edited) { -// qDebug("is edited"); +// odebug << "is edited" << oendl; QString rt = view->text(); @@ -303,3 +305,3 @@ void NotesControl::save() { docname = "Empty Text"; -// qDebug(docname); +// odebug << docname << oendl; @@ -314,3 +316,3 @@ void NotesControl::save() { // else -// qDebug("oldname equals docname"); +// odebug << "oldname equals docname" << oendl; @@ -318,3 +320,3 @@ void NotesControl::save() { if(QFile(doc->linkFile()).exists()) - qDebug("puppie"); + odebug << "puppie" << oendl; doc->setType("text/plain"); @@ -329,3 +331,3 @@ void NotesControl::save() { edited=false; -// qDebug("save"); +// odebug << "save" << oendl; if (doPopulate) @@ -341,3 +343,3 @@ void NotesControl::populateBox() { box->clear(); -// qDebug("populate"); +// odebug << "populate" << oendl; Config cfg("Notes"); @@ -376,3 +378,3 @@ void NotesControl::load() { void NotesControl::load(const QString & file) { - qDebug("loading "+file); + odebug << "loading "+file << oendl; QString name = file; @@ -403,3 +405,3 @@ void NotesControl::loadDoc( const DocLnk &f) { if ( !fm.loadFile( f, txt ) ) { - qDebug("could not load file "+f.file()); + odebug << "could not load file "+f.file() << oendl; return; @@ -437,3 +439,3 @@ void NotesControl::slotSearch() { // if(e->key() == Key_C) { //copy -// qDebug("copy"); +// odebug << "copy" << oendl; // QClipboard *cb = QApplication::clipboard(); @@ -484,6 +486,6 @@ void NotesApplet::mousePressEvent( QMouseEvent *) { if(vc->showMax) { - qDebug("show max"); + odebug << "show max" << oendl; vc->showMaximized(); } else { - qDebug("no show max"); + odebug << "no show max" << oendl; QWidget *wid = QPEApplication::desktop(); diff --git a/noncore/applets/notesapplet/notesapplet.pro b/noncore/applets/notesapplet/notesapplet.pro index 44e5b34..c3f9b1c 100644 --- a/noncore/applets/notesapplet/notesapplet.pro +++ b/noncore/applets/notesapplet/notesapplet.pro @@ -1,11 +1,11 @@ -TEMPLATE = lib -CONFIG += qt plugin warn_on -HEADERS = notes.h -SOURCES = notes.cpp -TARGET = notesapplet -DESTDIR = $(OPIEDIR)/plugins/applets +TEMPLATE = lib +CONFIG += qt plugin warn_on +HEADERS = notes.h +SOURCES = notes.cpp +TARGET = notesapplet +DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -VERSION = 1.0.0 +DEPENDPATH += $(OPIEDIR)/include +LIBS += -lqpe -lopiecore2 +VERSION = 1.0.1 |