Bug#428452: use the g_path_get_dirname(...) of the last-file-opened to initialize the default directory of the File > Open dialog.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15870 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Joshua Sled 2007-04-11 02:08:23 +00:00
parent 260dbe55b1
commit ba63c51cc5

View File

@ -832,15 +832,20 @@ gnc_file_open (void)
{
const char * newfile;
char *lastfile;
gchar *last_file_dir;
gboolean result;
if (!gnc_file_query_save (TRUE))
return FALSE;
lastfile = gnc_history_get_last();
newfile = gnc_file_dialog (_("Open"), NULL, lastfile, GNC_FILE_DIALOG_OPEN);
if (lastfile)
last_file_dir = g_path_get_dirname(lastfile);
newfile = gnc_file_dialog (_("Open"), NULL, last_file_dir, GNC_FILE_DIALOG_OPEN);
if (lastfile != NULL)
g_free(lastfile);
if (last_file_dir != NULL)
g_free(last_file_dir);
result = gnc_post_file_open (newfile);
/* This dialogue can show up early in the startup process. If the