[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-140-gcb62238)



The branch, master has been updated
       via  cb6223880a8732453dd2d0c0d7b17011e4113ff7 (commit)
      from  7fe3224436c425e51440a9f87db1a18c49530eb3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gattrib/src/gtkitementry_2_2.c |   12 ------------
 gattrib/src/gtksheet_2_2.c     |    5 ++++-
 2 files changed, 4 insertions(+), 13 deletions(-)


=================
 Commit Messages
=================

commit cb6223880a8732453dd2d0c0d7b17011e4113ff7
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Aug 19 01:25:02 2008 +0100

    gattrib: Attempt to make sheet changed detection less sensitive. (CODE!*)
    
    * Really now.. this is getting embarassing.
    
    The old code set the page's CHANGED flag upon received keypresses,
    including modifier-keys such as Alt etc.. (As used to access the
    common Alt+F4 shortcut to close the window), meaning the user was
    always prompted that they would loose changes.
    
    Remove setting the CHANGED flag in functions gtk_entry_enter_text
    and gtk_sheet_key_press. Instead, set it in gtk_sheet_entry_changed
    and gtk_sheet_real_cell_clear.
    
    This code could do with some closer attention in the future. There
    are certainly more appropriate places to set the CHANGED flag,
    ie. without hacking the gtksheet implementation to do it directly.

:100644 100644 3d6d253... 0a95ccc... M	gattrib/src/gtkitementry_2_2.c
:100644 100644 6fcf77b... e74f1f0... M	gattrib/src/gtksheet_2_2.c

=========
 Changes
=========

commit cb6223880a8732453dd2d0c0d7b17011e4113ff7
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Aug 19 01:25:02 2008 +0100

    gattrib: Attempt to make sheet changed detection less sensitive. (CODE!*)
    
    * Really now.. this is getting embarassing.
    
    The old code set the page's CHANGED flag upon received keypresses,
    including modifier-keys such as Alt etc.. (As used to access the
    common Alt+F4 shortcut to close the window), meaning the user was
    always prompted that they would loose changes.
    
    Remove setting the CHANGED flag in functions gtk_entry_enter_text
    and gtk_sheet_key_press. Instead, set it in gtk_sheet_entry_changed
    and gtk_sheet_real_cell_clear.
    
    This code could do with some closer attention in the future. There
    are certainly more appropriate places to set the CHANGED flag,
    ie. without hacking the gtksheet implementation to do it directly.

diff --git a/gattrib/src/gtkitementry_2_2.c b/gattrib/src/gtkitementry_2_2.c
index 3d6d253..0a95ccc 100644
--- a/gattrib/src/gtkitementry_2_2.c
+++ b/gattrib/src/gtkitementry_2_2.c
@@ -41,16 +41,6 @@
 
 #include "gtkitementry_2_2.h"
 
-/*------------------------------------------------------------------
- * Gattrib specific includes -- stuff dealing with gattrib data structs.
- * Included here in order to grab sheet_head->CHANGED, which is set
- * when the user puts a new value in a cell.
- *------------------------------------------------------------------*/
-#include <libgeda/libgeda.h>       /* geda library fcns  */
-#include "../include/struct.h"     /* typdef and struct declarations */
-#include "../include/prototype.h"  /* function prototypes */
-#include "../include/globals.h"
-
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
 #endif
@@ -1192,8 +1182,6 @@ gtk_entry_enter_text (GtkEntry       *entry,
   printf("In gtk_entry_enter_text, inserting text . . . \n");
 #endif
 
-  sheet_head->CHANGED = TRUE;
-
   if (gtk_editable_get_selection_bounds (editable, NULL, NULL))
     gtk_editable_delete_selection (editable);
   else
diff --git a/gattrib/src/gtksheet_2_2.c b/gattrib/src/gtksheet_2_2.c
index 6fcf77b..e74f1f0 100644
--- a/gattrib/src/gtksheet_2_2.c
+++ b/gattrib/src/gtksheet_2_2.c
@@ -3676,6 +3676,8 @@ gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column, gboolean dele
 
     if(GTK_IS_OBJECT(sheet) && G_OBJECT(sheet)->ref_count > 0)
       gtk_signal_emit(GTK_OBJECT(sheet),sheet_signals[CLEAR_CELL], row, column);
+
+    sheet_head->CHANGED = 1;
   }  
 
   if(delete){ 
@@ -3978,6 +3980,8 @@ gtk_sheet_entry_changed(GtkWidget *widget, gpointer data)
       gtk_sheet_cell_clear(sheet, row, col);
  }
 
+ sheet_head->CHANGED = 1;
+
  if(sheet->freeze_count == 0)
         GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IS_FROZEN);
  
@@ -5879,7 +5883,6 @@ gtk_sheet_key_press(GtkWidget *widget,
       printf("In gtk_sheet_key_press, after switch, found default case.\n");
       printf("  User probably typed letter key or DEL.\n");
 #endif
-      sheet_head->CHANGED = 1;  /* cell has been updated.  */
       if(in_selection) {
 	GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION);
 	if(extend_selection) return TRUE; 




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs