r21517 - gnucash/trunk/src/libqof/qof - Add is_readonly

John Ralls jralls at ceridwen.us
Fri Nov 4 13:18:35 EDT 2011


On Nov 4, 2011, at 9:00 AM, gnucash-patches-request at gnucash.org wrote:

> Date: Thu, 3 Nov 2011 17:48:01 -0400
> From: Christian Stimming <cstim at code.gnucash.org>
> To: gnucash-patches at gnucash.org
> Subject: r21517 - gnucash/trunk/src/libqof/qof - Add is_readonly
> 	attribute to QofSession class.
> Message-ID: <201111032148.pA3Lm1wG000390 at code.gnucash.org>
> Content-Type: text/plain; charset=UTF-8
> 
> Author: cstim
> Date: 2011-11-03 17:48:00 -0400 (Thu, 03 Nov 2011)
> New Revision: 21517
> Trac: http://svn.gnucash.org/trac/changeset/21517
> 
> Modified:
>   gnucash/trunk/src/libqof/qof/qofsession-p.h
>   gnucash/trunk/src/libqof/qof/qofsession.c
>   gnucash/trunk/src/libqof/qof/qofsession.h
> Log:
> Add is_readonly attribute to QofSession class.

Why do we need this? QofBook already has a read-only attribute which prevents even editing instances, so there shouldn't ever be anything to save in a read-only session. If there are leaks in QofBook's read-only block, fix that. It's not a good plan to let the user do a bunch of edits and then say "Oops, this session is read only, so you can't save your work!"

Regards,
John Ralls




More information about the gnucash-devel mailing list