changeset 16532:67d4111d078d

look for save/load files starting in current directory * main-window.cc (main_window::handle_save_workspace_request, main_window::handle_load_workspace_request): Start file dialog widget in current directory instead of home directory.
author John W. Eaton <jwe@octave.org>
date Wed, 17 Apr 2013 03:09:30 -0400
parents f3a63fdbd725
children 52c661334154
files libgui/src/main-window.cc
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Wed Apr 17 03:09:09 2013 -0400
+++ b/libgui/src/main-window.cc	Wed Apr 17 03:09:30 2013 -0400
@@ -131,12 +131,12 @@
 void
 main_window::handle_save_workspace_request (void)
 {
-  QString selectedFile =
-    QFileDialog::getSaveFileName (this, tr ("Save Workspace As"),
-                                  resource_manager::get_home_path ());
-  if (!selectedFile.isEmpty ())
+  QString file =
+    QFileDialog::getSaveFileName (this, tr ("Save Workspace As"), ".");
+
+  if (! file.isEmpty ())
     octave_link::post_event (this, &main_window::save_workspace_callback,
-                             selectedFile.toStdString ());
+                             file.toStdString ());
 }
 
 void
@@ -145,8 +145,8 @@
   QString file = file_arg;
 
   if (file.isEmpty ())
-    file = QFileDialog::getOpenFileName (this, tr ("Load Workspace"),
-                                         resource_manager::get_home_path ());
+    file = QFileDialog::getOpenFileName (this, tr ("Load Workspace"), ".");
+
   if (! file.isEmpty ())
     octave_link::post_event (this, &main_window::load_workspace_callback,
                              file.toStdString ());