r20616 - gnucash/trunk/src/engine - gncOwner convenience functions: jobs do have an active state, fix the getter function. At the same time, move the Job Active getter with the other getters. This is why I missed it the first time.

Geert Janssens gjanssens at code.gnucash.org
Wed May 11 17:50:26 EDT 2011


Author: gjanssens
Date: 2011-05-11 17:50:25 -0400 (Wed, 11 May 2011)
New Revision: 20616
Trac: http://svn.gnucash.org/trac/changeset/20616

Modified:
   gnucash/trunk/src/engine/gncJob.h
   gnucash/trunk/src/engine/gncOwner.c
Log:
gncOwner convenience functions: jobs do have an active state, fix the getter function. At the same time, move the Job Active getter with the other getters. This is why I missed it the first time.

Modified: gnucash/trunk/src/engine/gncJob.h
===================================================================
--- gnucash/trunk/src/engine/gncJob.h	2011-05-10 11:05:18 UTC (rev 20615)
+++ gnucash/trunk/src/engine/gncJob.h	2011-05-11 21:50:25 UTC (rev 20616)
@@ -80,9 +80,9 @@
 const char * gncJobGetName (const GncJob *job);
 const char * gncJobGetReference (const GncJob *job);
 GncOwner   * gncJobGetOwner (GncJob *job);
+gboolean     gncJobGetActive (const GncJob *job);
 
 /** @} */
-gboolean gncJobGetActive (const GncJob *job);
 
 /** Return a pointer to the instance gncJob that is identified
  *  by the guid, and is residing in the book. Returns NULL if the

Modified: gnucash/trunk/src/engine/gncOwner.c
===================================================================
--- gnucash/trunk/src/engine/gncOwner.c	2011-05-10 11:05:18 UTC (rev 20615)
+++ gnucash/trunk/src/engine/gncOwner.c	2011-05-11 21:50:25 UTC (rev 20616)
@@ -393,9 +393,8 @@
         return gncVendorGetActive (owner->owner.vendor);
     case GNC_OWNER_EMPLOYEE:
         return gncEmployeeGetActive (owner->owner.employee);
-    /* Jobs don't really have an active status, so we consider them always active */
     case GNC_OWNER_JOB:
-        return TRUE;
+        return gncJobGetActive (owner->owner.job);
     }
 }
 



More information about the gnucash-changes mailing list