Skip to content

Commit

Permalink
Export the price-source enums to Guile and use them in price-quotes.scm.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Sep 15, 2015
1 parent 6b6920f commit 4259255
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/engine/engine.i
Expand Up @@ -334,7 +334,7 @@ KvpValue * kvp_frame_get_slot_path_gslist (KvpFrame *frame, GSList *key_path);
SET_ENUM("TRANS-DATE-POSTED");
SET_ENUM("TRANS-DESCRIPTION");
SET_ENUM("TRANS-NUM");

SET_ENUM("KVP-OPTION-PATH");

SET_ENUM("OPTION-SECTION-ACCOUNTS");
Expand All @@ -355,6 +355,15 @@ KvpValue * kvp_frame_get_slot_path_gslist (KvpFrame *frame, GSList *key_path);
SET_ENUM("GNC-HOW-RND-ROUND");
SET_ENUM("GNC-HOW-RND-NEVER");

SET_ENUM("PRICE-SOURCE-EDIT-DLG");
SET_ENUM("PRICE-SOURCE-FQ");
SET_ENUM("PRICE-SOURCE-USER-PRICE");
SET_ENUM("PRICE-SOURCE-XFER-DLG-VAL");
SET_ENUM("PRICE-SOURCE-SPLIT-REG");
SET_ENUM("PRICE-SOURCE-STOCK-SPLIT");
SET_ENUM("PRICE-SOURCE-INVOICE");
SET_ENUM("PRICE-SOURCE-INVALID");

#undef SET_ENUM
}

Expand Down
4 changes: 2 additions & 2 deletions src/scm/price-quotes.scm
Expand Up @@ -429,7 +429,7 @@
(begin
(gnc-price-begin-edit saved-price)
(gnc-price-set-time saved-price gnc-time)
(gnc-price-set-source-string saved-price "Finance::Quote")
(gnc-price-set-source saved-price PRICE-SOURCE-FQ)
(gnc-price-set-typestr saved-price price-type)
(gnc-price-set-value saved-price price)
(gnc-price-commit-edit saved-price)
Expand All @@ -443,7 +443,7 @@
(gnc-price-set-commodity gnc-price commodity)
(gnc-price-set-currency gnc-price currency)
(gnc-price-set-time gnc-price gnc-time)
(gnc-price-set-source-string gnc-price "Finance::Quote")
(gnc-price-set-source gnc-price PRICE-SOURCE-FQ)
(gnc-price-set-typestr gnc-price price-type)
(gnc-price-set-value gnc-price price)
(gnc-price-commit-edit gnc-price)
Expand Down

0 comments on commit 4259255

Please sign in to comment.