mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't set transaction properties via scheme in C code.
This commit is contained in:
@@ -699,105 +699,6 @@ gnc_copy_trans_scm_onto_trans_swap_accounts(SCM trans_scm,
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_trans_scm_set_date *
|
||||
* set the date of a scheme transaction. *
|
||||
* *
|
||||
* Args: trans_scm - the scheme transaction *
|
||||
* ts - the time to set *
|
||||
* Returns: Nothing *
|
||||
\********************************************************************/
|
||||
void
|
||||
gnc_trans_scm_set_date(SCM trans_scm, time64 time)
|
||||
{
|
||||
SCM arg;
|
||||
Timespec ts = {time, 0};
|
||||
initialize_scm_functions();
|
||||
if (!gnc_is_trans_scm(trans_scm))
|
||||
return;
|
||||
arg = gnc_timespec2timepair(ts);
|
||||
scm_call_2(setters.trans_scm_date, trans_scm, arg);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_trans_scm_set_num *
|
||||
* set the num of a scheme transaction. *
|
||||
* *
|
||||
* Args: trans_scm - the scheme transaction *
|
||||
* num - the num to set *
|
||||
* Returns: Nothing *
|
||||
\********************************************************************/
|
||||
void
|
||||
gnc_trans_scm_set_num(SCM trans_scm, const char *num)
|
||||
{
|
||||
SCM arg;
|
||||
|
||||
initialize_scm_functions();
|
||||
|
||||
if (!gnc_is_trans_scm(trans_scm))
|
||||
return;
|
||||
if (num == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_utf8_string(num);
|
||||
|
||||
scm_call_2(setters.trans_scm_num, trans_scm, arg);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_trans_scm_set_description *
|
||||
* set the description of a scheme transaction. *
|
||||
* *
|
||||
* Args: trans_scm - the scheme transaction *
|
||||
* description - the description to set *
|
||||
* Returns: Nothing *
|
||||
\********************************************************************/
|
||||
void
|
||||
gnc_trans_scm_set_description(SCM trans_scm, const char *description)
|
||||
{
|
||||
SCM arg;
|
||||
|
||||
initialize_scm_functions();
|
||||
|
||||
if (!gnc_is_trans_scm(trans_scm))
|
||||
return;
|
||||
if (description == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_utf8_string(description);
|
||||
|
||||
scm_call_2(setters.trans_scm_description, trans_scm, arg);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_trans_scm_set_notes *
|
||||
* set the notes of a scheme transaction. *
|
||||
* *
|
||||
* Args: trans_scm - the scheme transaction *
|
||||
* notes - the notes to set *
|
||||
* Returns: Nothing *
|
||||
\********************************************************************/
|
||||
void
|
||||
gnc_trans_scm_set_notes(SCM trans_scm, const char *notes)
|
||||
{
|
||||
SCM arg;
|
||||
|
||||
initialize_scm_functions();
|
||||
|
||||
if (!gnc_is_trans_scm(trans_scm))
|
||||
return;
|
||||
if (notes == NULL)
|
||||
return;
|
||||
|
||||
arg = scm_from_utf8_string(notes);
|
||||
|
||||
scm_call_2(setters.trans_scm_notes, trans_scm, arg);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_trans_scm_append_split_scm *
|
||||
* append the scheme split onto the scheme transaction *
|
||||
|
||||
@@ -68,10 +68,6 @@ void gnc_copy_trans_scm_onto_trans_swap_accounts(SCM trans_scm,
|
||||
gboolean do_commit,
|
||||
QofBook *book);
|
||||
|
||||
void gnc_trans_scm_set_date(SCM trans_scm, time64 time);
|
||||
void gnc_trans_scm_set_num(SCM trans_scm, const char *num);
|
||||
void gnc_trans_scm_set_description(SCM trans_scm, const char *description);
|
||||
void gnc_trans_scm_set_notes(SCM trans_scm, const char *notes);
|
||||
void gnc_trans_scm_append_split_scm(SCM trans_scm, SCM split_scm);
|
||||
|
||||
SCM gnc_trans_scm_get_split_scm(SCM trans_scm, int index);
|
||||
|
||||
Reference in New Issue
Block a user