diff libgui/src/m-editor/file-editor-tab.cc @ 15312:d81105896288

m-editor: open a new file from the directory of the last active tab * file-editor-tab.cc, file-editor-tab.h: new get_file_name method & open_file with a directory * file-editor.cc: request_open_file with the path to the last active file
author Thorsten Liebig <thorsten.liebig@gmx.de>
date Tue, 04 Sep 2012 22:34:48 +0200
parents ae9079bbc627
children 67ef63ead023
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc
+++ b/libgui/src/m-editor/file-editor-tab.cc
@@ -603,13 +603,14 @@
 }
 
 bool
-file_editor_tab::open_file ()
+file_editor_tab::open_file (QString dir)
 {
   QString openFileName;
   QFileDialog fileDialog(this);
   fileDialog.setNameFilter(SAVE_FILE_FILTER);
   fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
   fileDialog.setViewMode(QFileDialog::Detail);
+  fileDialog.setDirectory(dir);
   if (fileDialog.exec () == QDialog::Accepted)
     {
       openFileName = fileDialog.selectedFiles().at(0);