Add new option in register "Tab order includes Transfer field".

Patch by Colin Law:
Patch that provides a new option in the Register preferences to
specify whether, when tab is hit after entering the description for a
memorised transaction in Basic Ledger view, that the cursor skips to
the value field (as at present) or just tabs to the Transfer field.
The option defaults to include the Transfer field so gnucash operation
is unaffected unless user modifies the option.

Signed-off-by: Christian Stimming <stimming@tuhh.de>

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18377 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2009-10-08 21:04:14 +00:00
parent 018c467160
commit 8ca1487a21
3 changed files with 99 additions and 31 deletions

View File

@ -2535,7 +2535,7 @@
<widget class="GtkTable" id="table3">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">15</property>
<property name="n_rows">16</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
<property name="row_spacing">0</property>
@ -2666,8 +2666,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -2694,8 +2694,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -2717,8 +2717,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2741,8 +2741,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2765,8 +2765,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2789,8 +2789,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2813,8 +2813,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">14</property>
<property name="bottom_attach">15</property>
<property name="top_attach">15</property>
<property name="bottom_attach">16</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2837,8 +2837,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">13</property>
<property name="bottom_attach">14</property>
<property name="top_attach">14</property>
<property name="bottom_attach">15</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2861,8 +2861,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">12</property>
<property name="bottom_attach">13</property>
<property name="top_attach">13</property>
<property name="bottom_attach">14</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2885,8 +2885,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">11</property>
<property name="bottom_attach">12</property>
<property name="top_attach">12</property>
<property name="bottom_attach">13</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
@ -2914,8 +2914,60 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="top_attach">11</property>
<property name="bottom_attach">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="gconf/general/register/tab_includes_transfer_on_memorised">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Move to Transfer field when memorised transaction auto filled.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Tab order in_cludes Transfer on Memorised Transactions</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_padding">12</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label121">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</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="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">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -2954,7 +3006,7 @@
<widget class="GtkTable" id="table4">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">10</property>
<property name="n_rows">11</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
<property name="row_spacing">0</property>

View File

@ -350,6 +350,18 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/gnucash/general/register/tab_includes_transfer_on_memorised</key>
<applyto>/apps/gnucash/general/register/tab_includes_transfer_on_memorised</applyto>
<owner>gnucash</owner>
<type>bool</type>
<default>FALSE</default>
<locale name="C">
<short>Move to Transfer field when memorised transaction auto filled</short>
<long>If active then after a memorised transaction is automatically filled in the cursor will move to the Transfer field. If not active then it skips to the value field.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnucash/general/register/use_new_window</key>
<applyto>/apps/gnucash/general/register/use_new_window</applyto>

View File

@ -857,13 +857,17 @@ gnc_split_register_auto_completion (SplitRegister *reg,
gnc_resume_gui_refresh ();
/* now move to the non-empty amount column */
amount = xaccSplitGetAmount (blank_split);
cell_name = (gnc_numeric_negative_p (amount)) ? CRED_CELL : DEBT_CELL;
if (gnc_table_get_current_cell_location (reg->table, cell_name,
&new_virt_loc))
*p_new_virt_loc = new_virt_loc;
/* now move to the non-empty amount column unless config setting says not */
if ( !gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
"tab_includes_transfer_on_memorised", NULL) )
{
amount = xaccSplitGetAmount (blank_split);
cell_name = (gnc_numeric_negative_p (amount)) ? CRED_CELL : DEBT_CELL;
if (gnc_table_get_current_cell_location (reg->table, cell_name,
&new_virt_loc))
*p_new_virt_loc = new_virt_loc;
}
}
break;