[Gnucash-changes] r12086 - gnucash/trunk - Add ability for no-autocompletion option in split register, use in SX editor to prevent bug.

Joshua Sled jsled at cvs.gnucash.org
Sat Dec 3 14:41:54 EST 2005


Author: jsled
Date: 2005-12-03 14:41:53 -0500 (Sat, 03 Dec 2005)
New Revision: 12086
Trac: http://svn.gnucash.org/trac/changeset/12086

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/GNOME2_STATUS
   gnucash/trunk/src/gnome/dialog-scheduledxaction.c
   gnucash/trunk/src/register/ledger-core/split-register-control.c
   gnucash/trunk/src/register/ledger-core/split-register.c
   gnucash/trunk/src/register/ledger-core/split-register.h
Log:
Add ability for no-autocompletion option in split register, use in SX editor to prevent bug.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2005-12-03 17:58:53 UTC (rev 12085)
+++ gnucash/trunk/ChangeLog	2005-12-03 19:41:53 UTC (rev 12086)
@@ -6,6 +6,15 @@
 
 2005-12-03  Joshua Sled  <jsled at asynchronous.org>
 
+	* split-register-control.c (gnc_split_register_auto_completion):
+	Fail fast if no auto-complete requested.
+	* split-register.c (gnc_split_register_set_auto_complete): Add new
+	configuration option to turn off auto-completion.
+	* dialog-scheduledxaction.c (schedXact_editor_create_ledger): Turn
+	off auto-complete on the SX template register.
+
+2005-12-03  Joshua Sled  <jsled at asynchronous.org>
+
 	* GNOME2_STATUS: remove GOG-porting notes, spelling fixes.
 	
 	* sched-xact.glade: 

Modified: gnucash/trunk/GNOME2_STATUS
===================================================================
--- gnucash/trunk/GNOME2_STATUS	2005-12-03 17:58:53 UTC (rev 12085)
+++ gnucash/trunk/GNOME2_STATUS	2005-12-03 19:41:53 UTC (rev 12086)
@@ -13,10 +13,6 @@
 release out the door and not stall it until all the deprecated
 functionality has been removed.
 
-+--------------------------------------+
-|  Last sync with HEAD on 2005-10-31   |
-+--------------------------------------+
-
 ========================================
               DONE
 ========================================
@@ -38,7 +34,7 @@
 
     +-----
     | Can someone who comes across this note and wants to help please go
-    | through 1.8.9 and create a list of stuff missing from 2.0?
+    | through 1.8.x and create a list of stuff missing from 2.0?
     +------------
 
 ========================================
@@ -59,23 +55,9 @@
     - Printing text reports works.
     - Printing pie/bar charts fails.
 
-  - Startup CRITICAL errors...
-
-    [jsled at phoenix:~/stuff/proj/gnucash/src-g2/gnucash]$ /opt/gnc-g2-unstable/bin/gnucash
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gvaluetypes.c: line 741 (g_value_set_string): assertion `G_VALUE_HOLDS_STRING (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gobject.c: line 1239 (g_object_set_property): assertion `G_IS_VALUE (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gvalue.c: line 149 (g_value_unset): assertion `G_IS_VALUE (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gvaluetypes.c: line 741 (g_value_set_string): assertion `G_VALUE_HOLDS_STRING (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gobject.c: line 1239 (g_object_set_property): assertion `G_IS_VALUE (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gvalue.c: line 149 (g_value_unset): assertion `G_IS_VALUE (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gvaluetypes.c: line 741 (g_value_set_string): assertion `G_VALUE_HOLDS_STRING (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gobject.c: line 1239 (g_object_set_property): assertion `G_IS_VALUE (value)' failed
-    (gnucash:7823): GLib-GObject-CRITICAL **: file gvalue.c: line 149 (g_value_unset): assertion `G_IS_VALUE (value)' failed
-    Use of deprecated SAXv1 function getLineNumber
-
   - Open pages are no longer open after reopening file.
     - Account tree, register and report pages are restored.
-    - Budget and busines pages are not restored.
+    - Budget and business pages are not restored.
     - Trying to reopen a multi-column report spits lots of
       warning. Trying to edit that pages options crashes gnucash.
 
@@ -109,7 +91,6 @@
   - HBCI - Transaction templates eventually need to be converted from a GTK_CLIST
     to a GTK_TREE_VIEW.  Currently working as a GtkClist. 
 
-
 - Budgeting
 
   - Budget Report
@@ -188,10 +169,6 @@
 
   - SX Editor
 
-    - When tabbing from memo to account on the second split with the same
-      name as the first, the account will be auto-populated with a GUID
-      (instead of an account name), but not a valid one.
-
     - Template-register Cut/Copy/Paste not connected.
 
     - Template-register View > {Basic, Auto-Split} options have no effect.
@@ -199,10 +176,6 @@
   - Open SX Editor, close it; open Register Preferences, change "Draw
     {horiz,vert} lines" => crash.
 
-  - Entering a value (e.g. '20.00') without entering an account or a memo for
-    the first split causes everything else entered so far to be reset when
-    tabbing to the second split.
-
 ========================================
               ENHANCEMENTS
 ========================================
@@ -234,3 +207,10 @@
     and then remove the "Close" button from the toolbar.  Then we can also
     decide if we want to allow a user to 'close' the account tree.
 
+- Scheduled Transactions
+
+  - Entering a value (e.g. '20.00') without entering an account or a memo for
+    the first split causes everything else entered so far to be reset when
+    tabbing to the second split.
+
+

Modified: gnucash/trunk/src/gnome/dialog-scheduledxaction.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-scheduledxaction.c	2005-12-03 17:58:53 UTC (rev 12085)
+++ gnucash/trunk/src/gnome/dialog-scheduledxaction.c	2005-12-03 19:41:53 UTC (rev 12086)
@@ -1604,6 +1604,7 @@
         gnc_split_register_config(splitreg,
                                   splitreg->type, splitreg->style,
                                   FALSE);
+        gnc_split_register_set_auto_complete(splitreg, FALSE);
 
         /* don't show present/future divider [by definition, not necessary] */
         gnc_split_register_show_present_divider( splitreg, FALSE );

Modified: gnucash/trunk/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-control.c	2005-12-03 17:58:53 UTC (rev 12085)
+++ gnucash/trunk/src/register/ledger-core/split-register-control.c	2005-12-03 19:41:53 UTC (rev 12086)
@@ -623,6 +623,8 @@
   BasicCell *cell;
   Split *split;
 
+  g_return_val_if_fail(reg->do_auto_complete, FALSE);
+
   blank_split = xaccSplitLookup (&info->blank_split_guid,
                                  gnc_get_current_book ());
   blank_trans = xaccSplitGetParent (blank_split);

Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c	2005-12-03 17:58:53 UTC (rev 12085)
+++ gnucash/trunk/src/register/ledger-core/split-register.c	2005-12-03 19:41:53 UTC (rev 12086)
@@ -2186,6 +2186,7 @@
                          SplitRegisterType type,
                          SplitRegisterStyle style,
                          gboolean use_double_line,
+                         gboolean do_auto_complete,
                          gboolean is_template)
 {
   TableLayout *layout;
@@ -2203,6 +2204,7 @@
   reg->type = type;
   reg->style = style;
   reg->use_double_line = use_double_line;
+  reg->do_auto_complete = do_auto_complete;
   reg->is_template = is_template;
 
   layout = gnc_split_register_layout_new (reg);
@@ -2261,6 +2263,7 @@
                         gboolean is_template)
 {
   SplitRegister * reg;
+  gboolean default_do_auto_complete = TRUE;
 
   reg = g_new0 (SplitRegister, 1);
 
@@ -2271,6 +2274,7 @@
                            type,
                            style,
                            use_double_line,
+                           default_do_auto_complete,
                            is_template);
 
   return reg;
@@ -2313,6 +2317,14 @@
   gnc_table_realize_gui (reg->table);
 }
 
+void
+gnc_split_register_set_auto_complete(SplitRegister *reg,
+                                     gboolean do_auto_complete)
+{
+  g_return_if_fail(reg);
+  reg->do_auto_complete = do_auto_complete;
+}
+
 static void
 gnc_split_register_destroy_info (SplitRegister *reg)
 {

Modified: gnucash/trunk/src/register/ledger-core/split-register.h
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.h	2005-12-03 17:58:53 UTC (rev 12085)
+++ gnucash/trunk/src/register/ledger-core/split-register.h	2005-12-03 19:41:53 UTC (rev 12086)
@@ -245,6 +245,7 @@
 
   gboolean use_double_line;
   gboolean is_template;
+  gboolean do_auto_complete;
 
   SRInfo * sr_info;   /**< \internal private data; outsiders should not access this */
 };
@@ -267,6 +268,10 @@
                                 SplitRegisterStyle style,
                                 gboolean use_double_line);
 
+/** Change the auto-completion behavior. **/
+void gnc_split_register_set_auto_complete(SplitRegister *reg,
+                                          gboolean do_auto_complete);
+
 /** Destroy the split register. */
 void gnc_split_register_destroy (SplitRegister *reg);
 



More information about the gnucash-changes mailing list