2009/10/7 Robert Stocks <robert.sto...@gmail.com>:
> Other options:
>
> "Tab order includes Transfer on Memorised Transactions"

I like that one, modified patch attached (based on current trunk)

Colin

>
> "Include Transfer Field in Tab order on Memorised Transactions"
>
> icky one due to the double negative
>
> "Tab doesn't skip Transfer field when entering Memorised Transactions"
>
>
>
> 2009/10/6 David T. <sunfis...@yahoo.com>:
>> The developers have explained why they want the default to be false, so I 
>> would recommend using "Tab moves to Transfer field" which can default to 
>> False. Since Gnucash currently goes directly to the Amount field, you should 
>> consider this to be the "expected" behavior, even if it's not YOUR 
>> expectation.
>>
>> David
>>
>> --- On Tue, 10/6/09, Colin Law <clan...@googlemail.com> wrote:
>>
>>> From: Colin Law <clan...@googlemail.com>
>>> Subject: Re: [Patch] to add option to disable 'skip to value field' on  
>>> memorised transaction
>>> To: "Christian Stimming" <stimm...@tuhh.de>, "gnucash-devel" 
>>> <gnucash-devel@gnucash.org>
>>> Date: Tuesday, October 6, 2009, 12:45 PM
>>> 2009/10/4 Colin Law <clan...@googlemail.com>:
>>> > 2009/10/4 Christian Stimming <stimm...@tuhh.de>:
>>> >> Am Sonntag, 4. Oktober 2009 11:23 schrieb 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 skip so gnucash
>>> operation is unaffected unless
>>> >>> user modifies the option.
>>> >>
>>> >> Thanks a lot for this patch! This looks very fine.
>>> There is one single issue
>>> >> that can be improved even more (even though nobody
>>> has told you so far -
>>> >> sorry for that): If for whatever reason your
>>> changed gconf schema file isn't
>>> >> being installed in the correct location, and your
>>> new key isn't found, gconf
>>> >> will return the global default value for bool
>>> keys, which is FALSE. Hence, to
>>> >> make life still a little easier, we try to add new
>>> gconf keys in a way so
>>> >> that their default value also is FALSE. By
>>> coincidence, your default value is
>>> >> TRUE. I would ask whether it is sensible and
>>> possible to switch the option so
>>> >> that it's default value is FALSE? It's not
>>> extremely important, but still
>>> >> helpful.
>>> >
>>> > I can see the logic in going for a default of false
>>> wherever possible,
>>> > I had that problem with the schema file myself.  I
>>> did think of
>>> > reversing the logic but had difficulty coming up with
>>> a sensible
>>> > choice of words in the preferences dialog.  I have
>>> the text 'Tab skips
>>> > to value on memorised transaction' which requires a
>>> default of true.
>>> > Can anyone think of appropriate text for a default of
>>> false?  Tab
>>> > moves to Transfer field... does not really work for me
>>> as that is the
>>> > normal action one would expect from tab anyway and I
>>> am too close to
>>> > the problem to see an alternative.
>>>
>>> If no-one has an alternative for the text would it be best
>>> just to
>>> leave it as in the patch I have submitted?  It is not
>>> as if anyone
>>> getting the wrong default is going to be much upset, in
>>> fact they
>>> would likely not even notice.
>>>
>>> Colin
>>> _______________________________________________
>>> gnucash-devel mailing list
>>> gnucash-devel@gnucash.org
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>>>
>>
>>
>>
>> _______________________________________________
>> gnucash-devel mailing list
>> gnucash-devel@gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>>
>
>
>
> --
> Robert
>
diff --git a/src/gnome-utils/glade/preferences.glade b/src/gnome-utils/glade/preferences.glade
index de4fd4a..ef7d8a4 100644
--- a/src/gnome-utils/glade/preferences.glade
+++ b/src/gnome-utils/glade/preferences.glade
@@ -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>
diff --git a/src/gnome/schemas/apps_gnucash_general.schemas.in b/src/gnome/schemas/apps_gnucash_general.schemas.in
index d3daffa..16bef86 100644
--- a/src/gnome/schemas/apps_gnucash_general.schemas.in
+++ b/src/gnome/schemas/apps_gnucash_general.schemas.in
@@ -351,6 +351,18 @@
     </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>
       <owner>gnucash</owner>
diff --git a/src/register/ledger-core/split-register-control.c b/src/register/ledger-core/split-register-control.c
index f9a52fb..827ea08 100644
--- a/src/register/ledger-core/split-register-control.c
+++ b/src/register/ledger-core/split-register-control.c
@@ -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;
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to