-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 @@ -354,50 +354,50 @@ void NotesControl::populateBox() { } list.sort(); box->insertStringList(list,-1); doPopulate=false; 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 ); cfg.write(); } } void NotesControl::load(const QString & file) { qDebug("loading "+file); QString name = file; QString temp; 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 ); cfg.write(); } void NotesControl::loadDoc( const DocLnk &f) { |