mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add translation and rotation to the custom printing page. Modify the
code so that only the custom widgets that have an effect for the current setting are sensitive. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12996 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2006-01-27 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/scm/printing/print-check.scm:
|
||||
* src/gnome/glade/print.glade:
|
||||
* src/gnome/dialog-print-check.c: Add translation and rotation to
|
||||
the custom printing page. Modify the code so that only the custom
|
||||
widgets that have an effect for the current setting are sensitive.
|
||||
|
||||
2006-01-27 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
Get "make distcheck" to work....
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "gnc-ui.h"
|
||||
#include "gnc-date-format.h"
|
||||
|
||||
#define CHECK_PRINT_NUM_FORMATS 3
|
||||
#define CHECK_PRINT_NUM_FORMATS 4
|
||||
#define CHECK_PRINT_NUM_POSITIONS 4
|
||||
#define CHECK_PRINT_NUM_UNITS 4
|
||||
|
||||
@@ -54,14 +54,15 @@
|
||||
#define KEY_CUSTOM_WORDS "custom_amount_words"
|
||||
#define KEY_CUSTOM_NUMBER "custom_amount_number"
|
||||
#define KEY_CUSTOM_MEMO "custom_memo"
|
||||
#define KEY_CUSTOM_POSITION "custom_position"
|
||||
#define KEY_CUSTOM_TRANSLATION "custom_translation"
|
||||
#define KEY_CUSTOM_ROTATION "custom_rotation"
|
||||
#define KEY_CUSTOM_UNITS "custom_units"
|
||||
|
||||
/* Used by glade_xml_signal_autoconnect_full */
|
||||
void gnc_ui_print_check_response_cb(GtkDialog * dialog, gint response, PrintCheckDialog * pcd);
|
||||
void gnc_print_check_combobox_changed(GtkComboBox *widget, PrintCheckDialog * pcd);
|
||||
static void gnc_ui_print_save_dialog(PrintCheckDialog * pcd);
|
||||
static void gnc_ui_print_restore_dialog(PrintCheckDialog * pcd);
|
||||
|
||||
void gnc_ui_print_restore_dialog(PrintCheckDialog * pcd);
|
||||
|
||||
struct _print_check_dialog {
|
||||
@@ -76,13 +77,15 @@ struct _print_check_dialog {
|
||||
|
||||
GtkWidget * format_combobox;
|
||||
GtkWidget * position_combobox;
|
||||
GtkWidget * custom_table;
|
||||
GtkSpinButton * payee_x, * payee_y;
|
||||
GtkSpinButton * date_x, * date_y;
|
||||
GtkSpinButton * words_x, * words_y;
|
||||
GtkSpinButton * number_x, * number_y;
|
||||
GtkSpinButton * memo_x, * memo_y;
|
||||
|
||||
GtkSpinButton * check_position;
|
||||
GtkSpinButton * translation_x, * translation_y;
|
||||
GtkSpinButton * check_rotation;
|
||||
GtkWidget * translation_label;
|
||||
|
||||
GtkWidget * units_combobox;
|
||||
|
||||
@@ -157,8 +160,11 @@ gnc_ui_print_save_dialog(PrintCheckDialog * pcd)
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO,
|
||||
gtk_spin_button_get_value(pcd->memo_x),
|
||||
gtk_spin_button_get_value(pcd->memo_y));
|
||||
gnc_gconf_set_float(GCONF_SECTION, KEY_CUSTOM_POSITION,
|
||||
gtk_spin_button_get_value(pcd->check_position),
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION,
|
||||
gtk_spin_button_get_value(pcd->translation_x),
|
||||
gtk_spin_button_get_value(pcd->translation_y));
|
||||
gnc_gconf_set_float(GCONF_SECTION, KEY_CUSTOM_ROTATION,
|
||||
gtk_spin_button_get_value(pcd->check_rotation),
|
||||
NULL);
|
||||
active = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->units_combobox));
|
||||
gnc_gconf_set_int(GCONF_SECTION, KEY_CUSTOM_UNITS, active, NULL);
|
||||
@@ -203,8 +209,11 @@ gnc_ui_print_restore_dialog(PrintCheckDialog * pcd)
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->memo_x, x);
|
||||
gtk_spin_button_set_value(pcd->memo_y, y);
|
||||
x = gnc_gconf_get_float(GCONF_SECTION, KEY_CUSTOM_POSITION, NULL);
|
||||
gtk_spin_button_set_value(pcd->check_position, x);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->translation_x, x);
|
||||
gtk_spin_button_set_value(pcd->translation_y, y);
|
||||
x = gnc_gconf_get_float(GCONF_SECTION, KEY_CUSTOM_ROTATION, NULL);
|
||||
gtk_spin_button_set_value(pcd->check_rotation, x);
|
||||
active = gnc_gconf_get_int(GCONF_SECTION, KEY_CUSTOM_UNITS, NULL);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(pcd->units_combobox), active);
|
||||
}
|
||||
@@ -244,6 +253,7 @@ gnc_ui_print_check_dialog_create(GncPluginPageRegister *plugin_page,
|
||||
pcd->format_combobox = glade_xml_get_widget (xml, "check_format_combobox");
|
||||
pcd->position_combobox = glade_xml_get_widget (xml, "check_position_combobox");
|
||||
|
||||
pcd->custom_table = glade_xml_get_widget (xml, "custom_table");
|
||||
pcd->payee_x = GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "payee_x_entry"));
|
||||
pcd->payee_y = GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "payee_y_entry"));
|
||||
pcd->date_x = GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "date_x_entry"));
|
||||
@@ -258,8 +268,11 @@ gnc_ui_print_check_dialog_create(GncPluginPageRegister *plugin_page,
|
||||
GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "amount_numbers_y_entry"));
|
||||
pcd->memo_x = GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "memo_x_entry"));
|
||||
pcd->memo_y = GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "memo_y_entry"));
|
||||
pcd->check_position =
|
||||
GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "check_position_entry"));
|
||||
pcd->translation_x = GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "translation_x_entry"));
|
||||
pcd->translation_y = GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "translation_y_entry"));
|
||||
pcd->translation_label = glade_xml_get_widget (xml, "translation_label");
|
||||
pcd->check_rotation =
|
||||
GTK_SPIN_BUTTON(glade_xml_get_widget (xml, "check_rotation_entry"));
|
||||
pcd->units_combobox = glade_xml_get_widget (xml, "units_combobox");
|
||||
|
||||
window = GTK_WINDOW(GNC_PLUGIN_PAGE(plugin_page)->window);
|
||||
@@ -315,7 +328,7 @@ gnc_ui_print_check_dialog_ok_cb(PrintCheckDialog * pcd)
|
||||
(gnc_date_format_get_custom(GNC_DATE_FORMAT(pcd->date_format)));
|
||||
|
||||
cust_format =
|
||||
SCM_LIST6
|
||||
SCM_LIST7
|
||||
(scm_cons(scm_str2symbol("payee"),
|
||||
SCM_LIST2(scm_make_real(multip*gtk_spin_button_get_value(pcd->payee_x)),
|
||||
scm_make_real(multip*gtk_spin_button_get_value(pcd->payee_y)))),
|
||||
@@ -331,8 +344,11 @@ gnc_ui_print_check_dialog_ok_cb(PrintCheckDialog * pcd)
|
||||
scm_cons(scm_str2symbol("memo"),
|
||||
SCM_LIST2(scm_make_real(multip*gtk_spin_button_get_value(pcd->memo_x)),
|
||||
scm_make_real(multip*gtk_spin_button_get_value(pcd->memo_y)))),
|
||||
scm_cons(scm_str2symbol("position"),
|
||||
scm_make_real(multip*gtk_spin_button_get_value(pcd->check_position))));
|
||||
scm_cons(scm_str2symbol("translate"),
|
||||
SCM_LIST2(scm_make_real(multip*gtk_spin_button_get_value(pcd->translation_x)),
|
||||
scm_make_real(multip*gtk_spin_button_get_value(pcd->translation_y)))),
|
||||
scm_cons(scm_str2symbol("rotate"),
|
||||
scm_make_real(gtk_spin_button_get_value(pcd->check_rotation))));
|
||||
|
||||
/* hide the window */
|
||||
gtk_widget_hide(pcd->dialog);
|
||||
@@ -354,6 +370,40 @@ gnc_ui_print_check_dialog_ok_cb(PrintCheckDialog * pcd)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_print_check_set_sensitive (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gboolean sensitive = GPOINTER_TO_INT(data);
|
||||
gtk_widget_set_sensitive(widget, sensitive);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_print_check_combobox_changed (GtkComboBox *widget,
|
||||
PrintCheckDialog * pcd)
|
||||
{
|
||||
gboolean sensitive;
|
||||
gint value;
|
||||
|
||||
value = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->format_combobox));
|
||||
if (-1 == value)
|
||||
return;
|
||||
sensitive = (value == (CHECK_PRINT_NUM_FORMATS - 1));
|
||||
gtk_container_foreach(GTK_CONTAINER(pcd->custom_table),
|
||||
gnc_print_check_set_sensitive,
|
||||
GINT_TO_POINTER(sensitive));
|
||||
if (sensitive == TRUE)
|
||||
return;
|
||||
|
||||
value = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->position_combobox));
|
||||
if (-1 == value)
|
||||
return;
|
||||
sensitive = (value == (CHECK_PRINT_NUM_POSITIONS - 1));
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(pcd->translation_label), sensitive);
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(pcd->translation_x), sensitive);
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(pcd->translation_y), sensitive);
|
||||
}
|
||||
|
||||
void
|
||||
gnc_ui_print_check_response_cb(GtkDialog * dialog,
|
||||
gint response,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="has_separator">True</property>
|
||||
<signal name="response" handler="gnc_ui_print_check_response_cb" last_modification_time="Sun, 22 Jan 2006 21:24:04 GMT"/>
|
||||
|
||||
@@ -111,6 +112,10 @@
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">check_format_combobox</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -136,6 +141,10 @@
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">check_position_combobox</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -160,6 +169,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -180,6 +193,7 @@ Quicken(tm) Wallet Checks w/ side stub
|
||||
Custom</property>
|
||||
<property name="add_tearoffs">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="changed" handler="gnc_print_check_combobox_changed" last_modification_time="Sat, 28 Jan 2006 04:19:16 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@@ -199,6 +213,7 @@ Bottom
|
||||
Custom</property>
|
||||
<property name="add_tearoffs">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="changed" handler="gnc_print_check_combobox_changed" last_modification_time="Sat, 28 Jan 2006 04:19:41 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@@ -229,6 +244,10 @@ Custom</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
@@ -236,9 +255,9 @@ Custom</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<widget class="GtkTable" id="custom_table">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">8</property>
|
||||
<property name="n_rows">9</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
@@ -257,6 +276,10 @@ Custom</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@@ -281,6 +304,10 @@ Custom</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
@@ -306,6 +333,10 @@ Custom</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">payee_x_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -331,6 +362,10 @@ Custom</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">date_x_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -356,6 +391,10 @@ Custom</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">amount_words_x_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -381,6 +420,10 @@ Custom</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">amount_numbers_x_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -406,6 +449,10 @@ Custom</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">memo_x_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -417,31 +464,6 @@ Custom</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label711">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Check po_sition:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">check_position_entry</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="payee_x_entry">
|
||||
<property name="visible">True</property>
|
||||
@@ -552,28 +574,6 @@ Custom</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="check_position_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="digits">3</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="snap_to_ticks">False</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="adjustment">0 0 100000 0.10000000149 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="payee_y_entry">
|
||||
<property name="visible">True</property>
|
||||
@@ -684,6 +684,26 @@ Custom</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="units_combobox">
|
||||
<property name="visible">True</property>
|
||||
<property name="items" translatable="yes">Inches
|
||||
Centimeters
|
||||
Millimeters
|
||||
Points</property>
|
||||
<property name="add_tearoffs">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="bottom_attach">9</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label709">
|
||||
<property name="visible">True</property>
|
||||
@@ -698,6 +718,89 @@ Custom</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">units_combobox</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="bottom_attach">9</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="translation_x_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="digits">3</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="snap_to_ticks">False</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="adjustment">0 0 100000 0.10000000149 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="translation_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Translation:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">translation_x_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label847680">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Rotation</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">check_rotation_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@@ -710,22 +813,44 @@ Custom</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkComboBox" id="units_combobox">
|
||||
<widget class="GtkSpinButton" id="check_rotation_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="items" translatable="yes">Inches
|
||||
Centimeters
|
||||
Millimeters
|
||||
Points</property>
|
||||
<property name="add_tearoffs">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="digits">3</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="snap_to_ticks">False</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="adjustment">-160 -180 180 0.00999999977648 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">7</property>
|
||||
<property name="bottom_attach">8</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="translation_y_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="digits">3</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="snap_to_ticks">False</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="adjustment">0 0 100000 0.10000000149 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
@@ -748,6 +873,10 @@ Points</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
|
||||
@@ -121,26 +121,33 @@
|
||||
(if off (set! offset (cdr off)))))))
|
||||
(set! format (print-check-format:custom-info format-info)))
|
||||
|
||||
(if (not (or offset (eq? (print-check-format:position format-info) 'custom)))
|
||||
(if (not (eq? (print-check-format:format format-info) 'custom))
|
||||
(begin
|
||||
(set! offset
|
||||
(cdr (assq (print-check-format:position format-info)
|
||||
(cdr (assq (print-check-format:format format-info)
|
||||
gnc:*stock-check-formats*)))))
|
||||
(if (pair? offset)
|
||||
(set! offset (cdr offset))))
|
||||
(set! offset
|
||||
(cdr (assq 'position
|
||||
(print-check-format:custom-info format-info)))))
|
||||
(if (not (or offset (eq? (print-check-format:position format-info) 'custom)))
|
||||
(begin
|
||||
(set! offset
|
||||
(cdr (assq (print-check-format:position format-info)
|
||||
(cdr (assq (print-check-format:format format-info)
|
||||
gnc:*stock-check-formats*)))))
|
||||
(if (pair? offset)
|
||||
(set! offset (cdr offset))))
|
||||
(set! offset
|
||||
(caddr (assq 'translate
|
||||
(print-check-format:custom-info format-info))))))
|
||||
(set! offset 0.0))
|
||||
|
||||
(let ((fmt (print-check-format:date-format format-info)))
|
||||
(begin
|
||||
(set! date-string (strftime fmt (localtime date)))))
|
||||
|
||||
(display "offset is ") (display offset) (newline)
|
||||
(let ((translate-pos (assq 'translate format)))
|
||||
(if translate-pos
|
||||
(gnc:print-session-translate ps (cadr translate-pos)
|
||||
(caddr translate-pos))))
|
||||
(begin
|
||||
(display "translate by ") (display (cadr translate-pos))
|
||||
(display " ") (display (caddr translate-pos)) (newline)
|
||||
(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))))
|
||||
|
||||
Reference in New Issue
Block a user