diff -r f688a9913724 -r 949591651fc7 texteditor.cpp --- a/texteditor.cpp Mon Apr 18 06:17:00 2005 +0000 +++ b/texteditor.cpp Fri Jul 08 07:24:43 2005 +0000 @@ -114,6 +114,7 @@ actionSettingsFonthintDefault->setOn (false); e->setCurrentFont (varFont); } + filenameHint=""; } @@ -206,6 +207,16 @@ return filename; } +void TextEditor::setFilenameHint(const QString &fnh) +{ + filenameHint=fnh; +} + +QString TextEditor::getFilenameHint() +{ + return filenameHint; +} + bool TextEditor::findText(const QString &t, const bool &cs) { bool wo=false; // word matches @@ -693,8 +704,16 @@ void TextEditor::textExportAsASCII() { QString text = textConvertToASCII( e->text()); - QString fn = QFileDialog::getSaveFileName( QString::null, "VYM Note (ASCII) (*.txt);;All files (*)", - this,"export note dialog",tr("Export Note to single file (ASCII)") ); + QString fn,s; + if (!filenameHint.isEmpty()) + { + if (!filenameHint.contains (".txt")) + s=filenameHint+".txt"; + else + s=filenameHint; + } else + s=QString::null; + fn = QFileDialog::getSaveFileName( s, "VYM Note (ASCII) (*.txt);;All files (*)", this,"export note dialog",tr("Export Note to single file (ASCII)") ); int ret=-1; if ( !fn.isEmpty() )