* src/gnome/glade/print.glade: add "Deluxe Personal Check" type

* src/gnome/dialog-print-check.c: add support for choosing
	  a "deluxe" check type.
	* src/scm/printing/print-check.scm: add support for printing
	  to "deluxe" personal checks.  This prints the check "sideways"
	  on a US-Letter configuration.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8345 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins
2003-05-20 02:08:42 +00:00
parent 613055b558
commit 3fe70012c7
4 changed files with 38 additions and 10 deletions

View File

@@ -31,6 +31,13 @@
APIs. All to allow sideways printing (by rotating the image).
* src/gnome-utils/gw-gnome-utils-spec.scm: wrap the new print-session
apis.
* src/gnome/glade/print.glade: add "Deluxe Personal Check" type
* src/gnome/dialog-print-check.c: add support for choosing
a "deluxe" check type.
* src/scm/printing/print-check.scm: add support for printing
to "deluxe" personal checks. This prints the check "sideways"
on a US-Letter configuration.
2003-05-18 Derek Atkins <derek@ihtfp.com>

View File

@@ -39,7 +39,7 @@
#include "print-session.h"
#include "gnc-ui.h"
#define CHECK_PRINT_NUM_FORMATS 2
#define CHECK_PRINT_NUM_FORMATS 3
#define CHECK_PRINT_NUM_POSITIONS 4
#define CHECK_PRINT_NUM_DATEFORMATS 9
#define CHECK_PRINT_NUM_UNITS 4
@@ -326,7 +326,7 @@ gnc_ui_print_check_dialog_ok_cb(GtkButton * button,
int sel_option;
double multip = 72.0;
char * formats[] = { "quicken", "custom" };
char * formats[] = { "quicken", "deluxe", "custom" };
char * positions[] = { "top", "middle", "bottom", "custom" };
sel_option = gnc_ui_print_get_option_menu_item(pcd->format_picker);

View File

@@ -338,6 +338,7 @@
<name>check_format_picker</name>
<can_focus>True</can_focus>
<items>Quicken/QuickBooks (tm) US-Letter
Deluxe(tm) Personal Checks US-Letter
Custom
</items>
<initial_choice>0</initial_choice>

View File

@@ -61,11 +61,20 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define gnc:*stock-check-formats*
'((quicken . ((payee . (90.0 150.0))
(amount-words . (90.0 120.0))
(amount-number . (500.0 150.0))
(date . (500.0 185.0))
(memo . (50.0 40.0))))))
'((deluxe . ((payee . (126.0 150.0))
(amount-words . (90.0 125.0))
(amount-number . (400.0 150.0))
(date . (343.0 183.0))
(memo . (105.0 73.0))
(rotate . 90.0)
(translate . (232.0 300.0))
(offset . 0.0)))
(quicken . ((payee . (90.0 150.0))
(amount-words . (90.0 120.0))
(amount-number . (500.0 150.0))
(date . (500.0 185.0))
(memo . (50.0 40.0))))
))
(define gnc:*stock-check-positions*
'((top . 540.0)
@@ -86,10 +95,13 @@
(set! format (assq (print-check-format:format format-info)
gnc:*stock-check-formats*))
(if (pair? format)
(set! format (cdr format))))
(begin
(set! format (cdr format))
(let ((off (assq 'offset format)))
(if off (set! offset (cdr off)))))))
(set! format (print-check-format:custom-info format-info)))
(if (not (eq? (print-check-format:position format-info) 'custom))
(if (not (or offset (eq? (print-check-format:position format-info) 'custom)))
(begin
(set! offset
(cdr (assq (print-check-format:position format-info)
@@ -110,7 +122,15 @@
(strftime date-fmt (localtime date))))
(begin
(set! date-string (strftime fmt (localtime date))))))
(let ((translate-pos (assq 'translate format)))
(if translate-pos
(gnc:print-session-translate ps (cadr translate-pos)
(caddr translate-pos))))
(let ((rotate-angle (assq 'rotate format)))
(if rotate-angle (gnc:print-session-rotate ps (cdr rotate-angle))))
(let ((date-pos (assq 'date format)))
(gnc:print-session-moveto ps (cadr date-pos)
(+ offset (caddr date-pos)))