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:
Dave Peticolas 2000-11-14 23:17:20 +00:00
parent 5063dbb5cc
commit 0ec498fe1c
3 changed files with 8 additions and 12 deletions

View File

@ -379,19 +379,15 @@ 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

View File

@ -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

View 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)