Gnucash BugTrack notification

new followup 1

Message summary for PR#11
        From: [EMAIL PROTECTED]
        Subject: Small gnome UI bug
        Date: unknown
        0 replies       1 followups
        Notes: gnome guys, please let me know what you want done with this.


====> ORIGINAL MESSAGE FOLLOWS <====

Received: (qmail 15500 invoked from network); 16 Nov 1999 23:19:35 -0000
Received: from localhost (127.0.0.1)
  by localhost with SMTP; 16 Nov 1999 23:19:35 -0000
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Small gnome UI bug

Full_Name: Paul Flinders
Version: Nov 14 CVS
GUI: gnome
OS: Linux
Submission from: (NULL) (194.222.0.39)


There's a small bug in the text insert call back for the gnucash_sheet

In a text insert callback updates to the current position via
gtk_editable_set_position
are ignored. The position needs to be updated by writing to *position. The
position is also 
calculated incorrectly

A patch to fix this follows

diff -u -r1.1 gnucash-sheet.c
--- gnucash-sheet.c     1999/11/10 16:28:00     1.1
+++ gnucash-sheet.c     1999/11/16 23:20:53
@@ -717,7 +721,7 @@
         gnucash_sheet_cell_set_from_table (sheet, v_row, v_col, c_row, c_col);
 
         if (retval && (retval != newval )) {
-                /* this means that the edit was allowed, but now the
+               /* this means that the edit was allowed, but now the
                    cell contents differ from what the entry contents
                    would be after the insert is processed.  So we synchronize
                    the entry contents, and stop the insert signal from
@@ -726,8 +730,9 @@
                 gtk_signal_handler_block(GTK_OBJECT (sheet->entry),
                                         sheet->insert_signal);
                 gtk_entry_set_text (GTK_ENTRY (sheet->entry), retval);
-                gtk_editable_set_position (GTK_EDITABLE(sheet->entry),
-                                          *position + new_text_length + 1);
+               
+               *position += new_text_length;
+
                 gtk_signal_handler_unblock ( GTK_OBJECT (sheet->entry),
                                             sheet->insert_signal);



--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]

Reply via email to