mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
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:
parent
260dbe55b1
commit
ba63c51cc5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user