r18443 - gnucash/trunk/src/gnome-utils - Fix Bug 591573 - "File|Save As" with xml option and no file name crashes

Derek Atkins warlord at MIT.EDU
Fri Dec 4 10:43:53 EST 2009


Phil Longstaff <plongstaff at code.gnucash.org> writes:

> Author: plongstaff
> Date: 2009-11-26 22:13:41 -0500 (Thu, 26 Nov 2009)
> New Revision: 18443
> Trac: http://svn.gnucash.org/trac/changeset/18443
> Modified:
>    gnucash/trunk/src/gnome-utils/dialog-file-access.c
> Log:
> Fix Bug 591573 -  "File|Save As" with xml option and no file name crashes
> With no file name, entered, filename returned from file_chooser is NULL,
> which led to the crash.  If NULL is returned, just ignore the button press.
> Proper UI would not allow Save As to be clicked unless conditions were right,
> but I'm not sure how to make that happen.  There is a signal emitted when a
> file is selected, but not when characters are typed into the name text field.

In the chooser dialog can't you intercept the 'Ok' button press and
check the response.  If the response isn't valid pop up a dialog saying
that they have to enter a file and ignore the Ok?


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list