mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Add hook to print invoice. Still need to write the invoice print
routine (in scheme), but the hook curently exists to do so. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6736 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -222,3 +222,9 @@
|
||||
)
|
||||
|
||||
(gnc:hook-add-dangler gnc:*add-extension-hook* add-business-extensions)
|
||||
|
||||
(define (gnc:invoice-make-printable invoice)
|
||||
(display "I would be printing out an invoice right now...\n")
|
||||
)
|
||||
|
||||
(export gnc:invoice-make-printable)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <gnome.h>
|
||||
#include <g-wrap-wct.h>
|
||||
#include <libguile.h>
|
||||
|
||||
#include "dialog-utils.h"
|
||||
#include "global-options.h"
|
||||
@@ -196,9 +198,18 @@ gnc_invoice_window_help_cb (GtkWidget *widget, gpointer data)
|
||||
static void
|
||||
gnc_invoice_window_print_invoice_cb (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
/* XXX: print this invoice (TBD) */
|
||||
InvoiceWindow *iw = data;
|
||||
GncInvoice *invoice = iw_get_invoice (iw);
|
||||
SCM func, inv;
|
||||
|
||||
fprintf (stderr, "I would print an invoice now... \n");
|
||||
g_return_if_fail (invoice);
|
||||
|
||||
func = gh_eval_str ("gnc:invoice-make-printable");
|
||||
inv = gw_wcp_assimilate_ptr (invoice, gh_eval_str("<gnc:GncInvoice*>"));
|
||||
|
||||
/* scm_protect_object(func); */
|
||||
gh_call1 (func, inv);
|
||||
/* scm_unprotect_object(func); */
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user