mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
If a filter is specified for the filebox, don't show the last
opened file in the selection box. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3148 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
5063dbb5cc
commit
0ec498fe1c
@ -379,20 +379,16 @@ gncFileOpen (void)
|
||||
if (!gncFileQuerySave ())
|
||||
return;
|
||||
|
||||
newfile = fileBox(_("Open"), "*.gnc");
|
||||
newfile = fileBox(_("Open"), NULL);
|
||||
gncPostFileOpen (newfile);
|
||||
|
||||
/* This dialogue can show up early in the startup process.
|
||||
* If the user fails to pick a file (by e.g. hitting the cancel
|
||||
* button), we might be left with a null topgroup, which leads
|
||||
* to nastiness when user goes to create their very first account.
|
||||
* Don't leave their ass in a sling, give them what they need.
|
||||
*/
|
||||
if (NULL == topgroup)
|
||||
{
|
||||
/* This dialogue can show up early in the startup process. If the
|
||||
* user fails to pick a file (by e.g. hitting the cancel button), we
|
||||
* might be left with a null topgroup, which leads to nastiness when
|
||||
* user goes to create their very first account. So create one. */
|
||||
if (topgroup == NULL)
|
||||
topgroup = xaccMallocAccountGroup();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gncFileOpenFile (const char * newfile)
|
||||
|
@ -83,7 +83,7 @@ fileBox(const char * title, const char * filter)
|
||||
fb_info.file_name = NULL;
|
||||
|
||||
last_file = gnc_history_get_last();
|
||||
if (last_file != NULL)
|
||||
if (last_file && !filter)
|
||||
gtk_file_selection_set_filename(fb_info.file_box, last_file);
|
||||
|
||||
/* hack alert - this was filtering directory names as well as file
|
||||
|
@ -99,7 +99,7 @@
|
||||
(list "Extensions" "")
|
||||
(lambda ()
|
||||
(let ((file-name (gnc:file-selection-dialog
|
||||
"Select file to save strings in" "")))
|
||||
"Select file to save strings in" ".txt")))
|
||||
(if file-name (gnc:save-translatable-strings file-name))))))
|
||||
|
||||
(gnc:add-extension menu)
|
||||
|
Loading…
Reference in New Issue
Block a user