r18443 - gnucash/trunk/src/gnome-utils - Fix Bug 591573 - "File|Save As" with xml option and no file name crashes
plongstaff at rogers.com
Fri Dec 4 10:54:10 EST 2009
that's basically what I do (except for popping up a dialog). What I would prefer to do is have Save As be disabled unless either 1) a file is selected (I could catch that signal), or 2) a file name is typed into the file name text box (I don't know how to catch that signal, and I do assume that a text box can emit a signal when something is typed into it). I think it's better UI practice to have invalid operations be disabled.
From: Derek Atkins <warlord at MIT.EDU>
To: gnucash-devel at gnucash.org
Sent: Fri, December 4, 2009 10:43:53 AM
Subject: Re: r18443 - gnucash/trunk/src/gnome-utils - Fix Bug 591573 - "File|Save As" with xml option and no file name crashes
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
> 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
gnucash-devel mailing list
gnucash-devel at gnucash.org
More information about the gnucash-devel