r19613 - gnucash/trunk/src/libqof/qof - Add kvp_frame_set_gdate() function

Phil Longstaff plongstaff at code.gnucash.org
Sun Sep 26 14:56:30 EDT 2010


Author: plongstaff
Date: 2010-09-26 14:56:30 -0400 (Sun, 26 Sep 2010)
New Revision: 19613
Trac: http://svn.gnucash.org/trac/changeset/19613

Modified:
   gnucash/trunk/src/libqof/qof/kvp_frame.c
   gnucash/trunk/src/libqof/qof/kvp_frame.h
Log:
Add kvp_frame_set_gdate() function


Modified: gnucash/trunk/src/libqof/qof/kvp_frame.c
===================================================================
--- gnucash/trunk/src/libqof/qof/kvp_frame.c	2010-09-25 17:14:27 UTC (rev 19612)
+++ gnucash/trunk/src/libqof/qof/kvp_frame.c	2010-09-26 18:56:30 UTC (rev 19613)
@@ -418,6 +418,15 @@
 }
 
 void
+kvp_frame_set_gdate(KvpFrame * frame, const char * path, GDate nval)
+{
+    KvpValue *value;
+    value = kvp_value_new_gdate (nval);
+    frame = kvp_frame_set_value_nc (frame, path, value);
+    if (!frame) kvp_value_delete (value);
+}
+
+void
 kvp_frame_set_string(KvpFrame * frame, const char * path, const char* str)
 {
     KvpValue *value;

Modified: gnucash/trunk/src/libqof/qof/kvp_frame.h
===================================================================
--- gnucash/trunk/src/libqof/qof/kvp_frame.h	2010-09-25 17:14:27 UTC (rev 19612)
+++ gnucash/trunk/src/libqof/qof/kvp_frame.h	2010-09-26 18:56:30 UTC (rev 19613)
@@ -166,6 +166,12 @@
  *     the path exist, they are created.
  */
 void kvp_frame_set_timespec(KvpFrame * frame, const gchar * path, Timespec ts);
+/**    store the value of the
+ *     GDate at the indicated path.
+ *     If not all frame components of
+ *     the path exist, they are created.
+ */
+void kvp_frame_set_gdate(KvpFrame * frame, const gchar * path, GDate date);
 
 /** \deprecated
 



More information about the gnucash-changes mailing list