author | llornkcor <llornkcor> | 2003-01-08 16:44:31 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-01-08 16:44:31 (UTC) |
commit | ade18a3bf5111a8ff7e43e94ca003c0dd64bc89d (patch) (side-by-side diff) | |
tree | f5ea5e991d7e60ba642612d7ce7b0c3f9108246f | |
parent | 6f03e28e8fd89c29de7b4cf97a2f6550a5ad8832 (diff) | |
download | opie-ade18a3bf5111a8ff7e43e94ca003c0dd64bc89d.zip opie-ade18a3bf5111a8ff7e43e94ca003c0dd64bc89d.tar.gz opie-ade18a3bf5111a8ff7e43e94ca003c0dd64bc89d.tar.bz2 |
fix for empty _*.txt entries when there are no other notes
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index 2b25476..4e98b31 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp @@ -358,17 +358,17 @@ void NotesControl::populateBox() { update(); } void NotesControl::load() { if(!loaded) { Config cfg("Notes"); cfg.setGroup("Docs"); - QString lastDoc=cfg.readEntry( "LastDoc",""); + QString lastDoc=cfg.readEntry( "LastDoc","notes"); DocLnk nf; nf.setType("text/plain"); nf.setFile(lastDoc); loadDoc(nf); loaded=true; oldDocName=lastDoc; cfg.writeEntry( "LastDoc",oldDocName ); @@ -383,17 +383,17 @@ void NotesControl::load(const QString & file) { if( !QFile( QDir::homeDirPath()+"/"+file).exists() ) temp = QDir::homeDirPath()+"/notes/"+ name.replace( QRegExp(" "), "_" ); else temp = name; if(!loaded) { DocLnk nf; nf.setType("text/plain"); nf.setFile( temp); - + if(!temp.isEmpty()) loadDoc(nf); loaded=true; } // view->setFocus(); oldDocName=file; Config cfg("Notes"); cfg.setGroup("Docs"); cfg.writeEntry( "LastDoc",oldDocName ); |