Why not store the sx:enabled flag in the SX instance KVP?  Granted, I
dont think 2.0 has an SX KVP, but we could maybe fix that...  I'll
point out that the 2.0 parser will barf on unknown tags and fail
to load the data file.

-derek

Josh Sled <[EMAIL PROTECTED]> writes:

> Author: jsled
> Date: 2007-01-31 22:30:21 -0500 (Wed, 31 Jan 2007)
> New Revision: 15486
> Trac: http://svn.gnucash.org/trac/changeset/15486
>
> Modified:
>    gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
>    gnucash/trunk/src/backend/file/gnc-schedxaction-xml-v2.c
>    gnucash/trunk/src/doc/xml/gnucash-v2.rnc
>    gnucash/trunk/src/engine/SchedXaction.c
>    gnucash/trunk/src/engine/SchedXaction.h
>    gnucash/trunk/src/engine/SchedXactionP.h
>    gnucash/trunk/src/gnome/dialog-sx-editor.c
>    gnucash/trunk/src/gnome/dialog-sx-editor.h
>    gnucash/trunk/src/gnome/dialog-sx-from-trans.c
>    gnucash/trunk/src/gnome/glade/sched-xact.glade
> Log:
> SX "enabled" patch from Peter McAlpine <[EMAIL PROTECTED]>.
[snip]
>  #define SX_ID                   "sx:id"
>  #define SX_NAME                 "sx:name"
> +#define SX_ENABLED              "sx:enabled"
>  #define SX_AUTOCREATE           "sx:autoCreate"
>  #define SX_AUTOCREATE_NOTIFY    "sx:autoCreateNotify"
>  #define SX_ADVANCE_CREATE_DAYS  "sx:advanceCreateDays"
> @@ -164,6 +166,9 @@
>  
>      xmlNewTextChild( ret, NULL, BAD_CAST SX_NAME, BAD_CAST 
> xaccSchedXactionGetName(sx) );
>  
> +    xmlNewTextChild( ret, NULL, BAD_CAST SX_ENABLED,
> +                     BAD_CAST ( sx->enabled ? "y" : "n" ) );
> +
>      xmlNewTextChild( ret, NULL, BAD_CAST SX_AUTOCREATE,
>                       BAD_CAST ( sx->autoCreateOption ? "y" : "n" ) );
>      xmlNewTextChild( ret, NULL, BAD_CAST SX_AUTOCREATE_NOTIFY,
> @@ -285,6 +290,18 @@
[snip]
-- 
       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
       [EMAIL PROTECTED]                        PGP key available
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to