-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() { | |||
358 | update(); | 358 | update(); |
359 | } | 359 | } |
360 | 360 | ||
361 | void NotesControl::load() { | 361 | void NotesControl::load() { |
362 | 362 | ||
363 | if(!loaded) { | 363 | if(!loaded) { |
364 | Config cfg("Notes"); | 364 | Config cfg("Notes"); |
365 | cfg.setGroup("Docs"); | 365 | cfg.setGroup("Docs"); |
366 | QString lastDoc=cfg.readEntry( "LastDoc",""); | 366 | QString lastDoc=cfg.readEntry( "LastDoc","notes"); |
367 | DocLnk nf; | 367 | DocLnk nf; |
368 | nf.setType("text/plain"); | 368 | nf.setType("text/plain"); |
369 | nf.setFile(lastDoc); | 369 | nf.setFile(lastDoc); |
370 | 370 | ||
371 | loadDoc(nf); | 371 | loadDoc(nf); |
372 | loaded=true; | 372 | loaded=true; |
373 | oldDocName=lastDoc; | 373 | oldDocName=lastDoc; |
374 | cfg.writeEntry( "LastDoc",oldDocName ); | 374 | cfg.writeEntry( "LastDoc",oldDocName ); |
@@ -383,17 +383,17 @@ void NotesControl::load(const QString & file) { | |||
383 | if( !QFile( QDir::homeDirPath()+"/"+file).exists() ) | 383 | if( !QFile( QDir::homeDirPath()+"/"+file).exists() ) |
384 | temp = QDir::homeDirPath()+"/notes/"+ name.replace( QRegExp(" "), "_" ); | 384 | temp = QDir::homeDirPath()+"/notes/"+ name.replace( QRegExp(" "), "_" ); |
385 | else | 385 | else |
386 | temp = name; | 386 | temp = name; |
387 | if(!loaded) { | 387 | if(!loaded) { |
388 | DocLnk nf; | 388 | DocLnk nf; |
389 | nf.setType("text/plain"); | 389 | nf.setType("text/plain"); |
390 | nf.setFile( temp); | 390 | nf.setFile( temp); |
391 | 391 | if(!temp.isEmpty()) | |
392 | loadDoc(nf); | 392 | loadDoc(nf); |
393 | loaded=true; | 393 | loaded=true; |
394 | } | 394 | } |
395 | // view->setFocus(); | 395 | // view->setFocus(); |
396 | oldDocName=file; | 396 | oldDocName=file; |
397 | Config cfg("Notes"); | 397 | Config cfg("Notes"); |
398 | cfg.setGroup("Docs"); | 398 | cfg.setGroup("Docs"); |
399 | cfg.writeEntry( "LastDoc",oldDocName ); | 399 | cfg.writeEntry( "LastDoc",oldDocName ); |