[Gnucash-changes] fix horrid indentation (someone used tabs inconsistently) add

Linas Vepstas linas at cvs.gnucash.org
Mon May 31 11:58:21 EDT 2004


Log Message:
-----------
fix horrid indentation (someone used tabs inconsistently)
add documentation
add copyright (hey I wrote this code in 1998, along with the rest
of the register code.  Someone stripped out the copyright along the 
way. Baadd).

Modified Files:
--------------
    gnucash/src/register/ledger-core:
        split-register-layout.c
        split-register-layout.h

Revision Data
-------------
Index: split-register-layout.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-layout.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/ledger-core/split-register-layout.h -Lsrc/register/ledger-core/split-register-layout.h -u -r1.1 -r1.2
--- src/register/ledger-core/split-register-layout.h
+++ src/register/ledger-core/split-register-layout.h
@@ -26,6 +26,26 @@
 #include "table-layout.h"
 #include "split-register.h"
 
+/** @addtogroup Register
+ *  @{
+ *  @file split-register-layout.h
+ *  @author Copyright (C) 1998, 2004 Linas Vepstas <linas at linas.org>
+ */
+
+/** Create the actual register visual layout: pick specific cell types
+ *  to sit in specific columns, and add connections so that user can tab
+ *  from one field to the next.  
+ *
+ *  The actual layout depends on the register type, but, typically,
+ *  all of the registers have the date cell on the left, description
+ *  in the middle, and monetary totals on the right.
+ * 
+ *  This implementation hard-codes the layout in C, although the
+ *  original intent was that the layout would be fetched from a 
+ *  config file that could be tweaked for a specific, non-GnuCash 
+ *  application.
+ */
 TableLayout * gnc_split_register_layout_new (SplitRegister *reg);
 
+/** @} */
 #endif
Index: split-register-layout.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-layout.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/register/ledger-core/split-register-layout.c -Lsrc/register/ledger-core/split-register-layout.c -u -r1.16 -r1.17
--- src/register/ledger-core/split-register-layout.c
+++ src/register/ledger-core/split-register-layout.c
@@ -1,5 +1,6 @@
 /********************************************************************\
  * split-register-layout.c -- split register layout object          *
+ * Copyright (C) 1998 Linas Vepstas <linas at linas.org>               *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -111,7 +112,7 @@
           gnc_table_layout_set_cell (layout, curs, CRED_CELL,  0, 6);
         }
         gnc_table_layout_set_cell (layout, curs, BALN_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,
@@ -132,7 +133,7 @@
         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, TBALN_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,
@@ -160,7 +161,7 @@
           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;
       }
@@ -173,13 +174,13 @@
                                             CURSOR_SINGLE_LEDGER);
 
         gnc_table_layout_set_cell (layout, curs, DATE_CELL,  0, 0);
-	gnc_table_layout_set_cell (layout, curs, TYPE_CELL,  0, 1);
-	gnc_table_layout_set_cell (layout, curs, DDUE_CELL,  0, 2);
+        gnc_table_layout_set_cell (layout, curs, TYPE_CELL,  0, 1);
+        gnc_table_layout_set_cell (layout, curs, DDUE_CELL,  0, 2);
         gnc_table_layout_set_cell (layout, curs, NUM_CELL,   0, 3);
         gnc_table_layout_set_cell (layout, curs, DESC_CELL,  0, 4);
         gnc_table_layout_set_cell (layout, curs, MXFRM_CELL, 0, 5);
-	gnc_table_layout_set_cell (layout, curs, DEBT_CELL,  0, 6);
-	gnc_table_layout_set_cell (layout, curs, CRED_CELL,  0, 7);
+        gnc_table_layout_set_cell (layout, curs, DEBT_CELL,  0, 6);
+        gnc_table_layout_set_cell (layout, curs, CRED_CELL,  0, 7);
         gnc_table_layout_set_cell (layout, curs, BALN_CELL,  0, 8);
 
         curs_last = curs;
@@ -195,8 +196,8 @@
                                             CURSOR_SINGLE_JOURNAL);
 
         gnc_table_layout_set_cell (layout, curs, DATE_CELL,  0, 0);
-	gnc_table_layout_set_cell (layout, curs, TYPE_CELL,  0, 1);
-	gnc_table_layout_set_cell (layout, curs, DDUE_CELL,  0, 2);
+        gnc_table_layout_set_cell (layout, curs, TYPE_CELL,  0, 1);
+        gnc_table_layout_set_cell (layout, curs, DDUE_CELL,  0, 2);
         gnc_table_layout_set_cell (layout, curs, NUM_CELL,   0, 3);
         gnc_table_layout_set_cell (layout, curs, DESC_CELL,  0, 4);
 
@@ -218,8 +219,8 @@
         gnc_table_layout_set_cell (layout, curs, ACTN_CELL, 0, 3);
         gnc_table_layout_set_cell (layout, curs, MEMO_CELL, 0, 4);
         gnc_table_layout_set_cell (layout, curs, XFRM_CELL, 0, 5);
-	gnc_table_layout_set_cell (layout, curs, DEBT_CELL, 0, 6);
-	gnc_table_layout_set_cell (layout, curs, CRED_CELL, 0, 7);
+        gnc_table_layout_set_cell (layout, curs, DEBT_CELL, 0, 6);
+        gnc_table_layout_set_cell (layout, curs, CRED_CELL, 0, 7);
 
         break;
       }
@@ -247,7 +248,7 @@
           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, 7);
+        gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
 
         curs_last = curs;
         curs = gnc_table_layout_get_cursor (layout,
@@ -267,7 +268,7 @@
         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, RATE_CELL, 0, 7);
+        gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
 
         curs_last = curs;
         curs = gnc_table_layout_get_cursor (layout,
@@ -295,7 +296,7 @@
           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, 7);
+        gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
 
         break;
       }
@@ -522,11 +523,11 @@
   gnc_register_add_cell (layout,
                          NUM_CELL,
                          NUM_CELL_TYPE_NAME,
-			 /* Translators: The 'sample:' items are
-			    strings which are not displayed, but only
-			    used to estimate widths. Please only
-			    translate the portion after the ':' and
-			    leave the rest ("sample:") as is. */
+                         /* Translators: The 'sample:' items are
+                            strings which are not displayed, but only
+                            used to estimate widths. Please only
+                            translate the portion after the ':' and
+                            leave the rest ("sample:") as is. */
                          N_("sample:99999") + 7,
                          CELL_ALIGN_LEFT,
                          FALSE,


More information about the gnucash-changes mailing list