Patch for balance column displayed in template register

2009-09-26 Thread Tim M
I noticed yesterday a bug in the reg run balance patch that was applied,
there is now a "Balance" column displayed in the template transaction
register.  If you open the scheduled transaction editor, then open a
scheduled transaction and go to the "Template Transaction" tab, there is a
"Balance" column displayed on the far right side of the register.

The attached patch fixes this defect so that the RBALN column is not
displayed in template registers.
Index: split-register-layout.c
===
--- split-register-layout.c	(revision 18328)
+++ split-register-layout.c	(working copy)
@@ -268,7 +268,10 @@
 gnc_table_layout_set_cell (layout, curs, DESC_CELL,  0, 2);
 gnc_table_layout_set_cell (layout, curs, TDEBT_CELL, 0, 5);
 gnc_table_layout_set_cell (layout, curs, TCRED_CELL, 0, 6);
-gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+if (!reg->is_template)
+{
+  gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+}
 gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
 
 curs_last = curs;
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Patch for balance column displayed in template register

2009-09-28 Thread Christian Stimming
Am Samstag, 26. September 2009 14:59 schrieb Tim M:
> I noticed yesterday a bug in the reg run balance patch that was applied,
> there is now a "Balance" column displayed in the template transaction
> register.  If you open the scheduled transaction editor, then open a
> scheduled transaction and go to the "Template Transaction" tab, there is a
> "Balance" column displayed on the far right side of the register.
>
> The attached patch fixes this defect so that the RBALN column is not
> displayed in template registers.

Applied. Thanks a lot!

Christian
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Patch for balance column displayed in template register

2009-09-30 Thread Tim M
The attached patch is an improvement to the original patch (and should
be applied over it, this patch was generated from very recent trunk
with the original patch already applied) which supplies the correct
number of columns to gnucash for the general_ledger register view if
the register is a template.

-Tim

2009/9/28 Christian Stimming :
> Am Samstag, 26. September 2009 14:59 schrieb Tim M:
>> I noticed yesterday a bug in the reg run balance patch that was applied,
>> there is now a "Balance" column displayed in the template transaction
>> register.  If you open the scheduled transaction editor, then open a
>> scheduled transaction and go to the "Template Transaction" tab, there is a
>> "Balance" column displayed on the far right side of the register.
>>
>> The attached patch fixes this defect so that the RBALN column is not
>> displayed in template registers.
>
> Applied. Thanks a lot!
>
> Christian
>
Index: src/register/ledger-core/split-register-layout.c
===
--- src/register/ledger-core/split-register-layout.c	(revision 18357)
+++ src/register/ledger-core/split-register-layout.c	(working copy)
@@ -242,13 +242,15 @@
 {
   gnc_table_layout_set_cell (layout, curs, FDEBT_CELL,  0, 5);
   gnc_table_layout_set_cell (layout, curs, FCRED_CELL,  0, 6);
+  gnc_table_layout_set_cell (layout, curs, RATE_CELL,   0, 7);
 }
 else
 {
   gnc_table_layout_set_cell (layout, curs, DEBT_CELL,  0, 5);
   gnc_table_layout_set_cell (layout, curs, CRED_CELL,  0, 6);
+  gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+  gnc_table_layout_set_cell (layout, curs, RATE_CELL,  0, 8);
 }
-gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
 
 curs_last = curs;
 curs = gnc_table_layout_get_cursor (layout,
@@ -268,11 +270,12 @@
 gnc_table_layout_set_cell (layout, curs, DESC_CELL,  0, 2);
 gnc_table_layout_set_cell (layout, curs, TDEBT_CELL, 0, 5);
 gnc_table_layout_set_cell (layout, curs, TCRED_CELL, 0, 6);
-if (!reg->is_template)
-{
+if (reg->is_template)
+  gnc_table_layout_set_cell (layout, curs, RATE_CELL,  0, 7);
+else {
   gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+  gnc_table_layout_set_cell (layout, curs, RATE_CELL,  0, 8);
 }
-gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
 
 curs_last = curs;
 curs = gnc_table_layout_get_cursor (layout,
@@ -294,13 +297,14 @@
 {
   gnc_table_layout_set_cell (layout, curs, FDEBT_CELL,  0, 5);
   gnc_table_layout_set_cell (layout, curs, FCRED_CELL,  0, 6);
+  gnc_table_layout_set_cell (layout, curs, RATE_CELL,   0, 7);
 }
 else
 {
   gnc_table_layout_set_cell (layout, curs, DEBT_CELL,  0, 5);
   gnc_table_layout_set_cell (layout, curs, CRED_CELL,  0, 6);
+  gnc_table_layout_set_cell (layout, curs, RATE_CELL,  0, 8);
 }
-gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
 
 break;
   }
@@ -463,7 +467,10 @@
 case INCOME_LEDGER:
 case GENERAL_LEDGER:
 case SEARCH_LEDGER:
-  num_cols = 9;
+  if (reg->is_template)
+num_cols = 8;
+  else
+num_cols = 9;
   break;
 
 case STOCK_REGISTER:
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Patch for balance column displayed in template register

2009-10-03 Thread Christian Stimming
Hi Tim,

I somehow lost the result of your discussion with Derek. Can you clarify again 
for me: Should this patch here be applied?

Thanks,

Christian

Am Donnerstag, 1. Oktober 2009 04:23 schrieb Tim M:
> The attached patch is an improvement to the original patch (and should
> be applied over it, this patch was generated from very recent trunk
> with the original patch already applied) which supplies the correct
> number of columns to gnucash for the general_ledger register view if
> the register is a template.
>
> -Tim
>
> 2009/9/28 Christian Stimming :
> > Am Samstag, 26. September 2009 14:59 schrieb Tim M:
> >> I noticed yesterday a bug in the reg run balance patch that was applied,
> >> there is now a "Balance" column displayed in the template transaction
> >> register.  If you open the scheduled transaction editor, then open a
> >> scheduled transaction and go to the "Template Transaction" tab, there is
> >> a "Balance" column displayed on the far right side of the register.
> >>
> >> The attached patch fixes this defect so that the RBALN column is not
> >> displayed in template registers.
> >
> > Applied. Thanks a lot!
> >
> > Christian
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Patch for balance column displayed in template register

2009-10-03 Thread Tim M
Hi Christian,

Yes it should be applied if it looks ok to you.

Thanks,
-Tim

2009/10/3 Christian Stimming :
> Hi Tim,
>
> I somehow lost the result of your discussion with Derek. Can you clarify again
> for me: Should this patch here be applied?
>
> Thanks,
>
> Christian
>
> Am Donnerstag, 1. Oktober 2009 04:23 schrieb Tim M:
>> The attached patch is an improvement to the original patch (and should
>> be applied over it, this patch was generated from very recent trunk
>> with the original patch already applied) which supplies the correct
>> number of columns to gnucash for the general_ledger register view if
>> the register is a template.
>>
>> -Tim
>>
>> 2009/9/28 Christian Stimming :
>> > Am Samstag, 26. September 2009 14:59 schrieb Tim M:
>> >> I noticed yesterday a bug in the reg run balance patch that was applied,
>> >> there is now a "Balance" column displayed in the template transaction
>> >> register.  If you open the scheduled transaction editor, then open a
>> >> scheduled transaction and go to the "Template Transaction" tab, there is
>> >> a "Balance" column displayed on the far right side of the register.
>> >>
>> >> The attached patch fixes this defect so that the RBALN column is not
>> >> displayed in template registers.
>> >
>> > Applied. Thanks a lot!
>> >
>> > Christian
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Patch for balance column displayed in template register

2009-10-03 Thread Christian Stimming
Am Donnerstag, 1. Oktober 2009 04:23 schrieb Tim M:
> The attached patch is an improvement to the original patch (and should
> be applied over it, this patch was generated from very recent trunk
> with the original patch already applied) which supplies the correct
> number of columns to gnucash for the general_ledger register view if
> the register is a template.

Applied, r18365. Thanks a lot!

Christian

>
> -Tim
>
> 2009/9/28 Christian Stimming :
> > Am Samstag, 26. September 2009 14:59 schrieb Tim M:
> >> I noticed yesterday a bug in the reg run balance patch that was applied,
> >> there is now a "Balance" column displayed in the template transaction
> >> register.  If you open the scheduled transaction editor, then open a
> >> scheduled transaction and go to the "Template Transaction" tab, there is
> >> a "Balance" column displayed on the far right side of the register.
> >>
> >> The attached patch fixes this defect so that the RBALN column is not
> >> displayed in template registers.
> >
> > Applied. Thanks a lot!
> >
> > Christian
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel