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

gEDA-cvs: CVS update: gtksheet_1_2.c



  User: sdb     
  Date: 05/03/11 12:50:58

  Modified:    .        gtksheet_1_2.c gtksheet_2_2.c s_sheet_data.c
                        x_gtksheet.c x_window.c
  Log:
  Incorporated definitions of default_border* as suggested by Carlos.  A
  
  couple other possible bugfixes also. 
  
  
  
  
  Revision  Changes    Path
  1.3       +4 -0      eda/geda/devel/gattrib/src/gtksheet_1_2.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gtksheet_1_2.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/gtksheet_1_2.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- gtksheet_1_2.c	5 Feb 2005 16:03:53 -0000	1.2
  +++ gtksheet_1_2.c	11 Mar 2005 17:50:56 -0000	1.3
  @@ -75,6 +75,10 @@
   #define DEFAULT_FONT_ASCENT(widget) (widget->style->font->ascent)
   #define DEFAULT_FONT_DESCENT(widget) (widget->style->font->descent)
   
  +static GtkBorder default_border = { 1, 1, 1, 1 };
  +static GtkBorder default_outside_border = { 0, 0, 0, 0 };
  +
  +
   /*-----------------------------------------------------------------------------*/
   /* scrollbar spacing class macro */
   #define SCROLLBAR_SPACING(w) (GTK_SHEET_CLASS (GTK_OBJECT (w)->klass)->scrollbar_spacing)
  
  
  
  1.6       +3 -0      eda/geda/devel/gattrib/src/gtksheet_2_2.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gtksheet_2_2.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/gtksheet_2_2.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- gtksheet_2_2.c	5 Feb 2005 16:03:53 -0000	1.5
  +++ gtksheet_2_2.c	11 Mar 2005 17:50:56 -0000	1.6
  @@ -102,6 +102,9 @@
   #define CELLOFFSET 4
   #define DEFAULT_COLUMN_WIDTH 80
   
  +static GtkBorder default_border = { 1, 1, 1, 1 };
  +static GtkBorder default_outside_border = { 0, 0, 0, 0 };
  +
   static inline guint DEFAULT_ROW_HEIGHT(GtkWidget *widget) 
   { 
     if(!widget->style->font_desc) return 24;
  
  
  
  1.9       +1 -1      eda/geda/devel/gattrib/src/s_sheet_data.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_sheet_data.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/s_sheet_data.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- s_sheet_data.c	21 Feb 2005 05:29:33 -0000	1.8
  +++ s_sheet_data.c	11 Mar 2005 17:50:56 -0000	1.9
  @@ -398,8 +398,8 @@
   
   		    s_string_list_add_item(sheet_head->master_pin_attrib_list_head, 
   					   &(sheet_head->pin_attrib_count), attrib_name);
  -		    free(attrib_value);
   		  }   /* if (strcmp(attrib_name, "pinnumber") != 0) */ 
  +		  if (attrib_value != NULL) free(attrib_value);
   		  free(attrib_name);
   		  free(attrib_text);
   		}
  
  
  
  1.8       +7 -3      eda/geda/devel/gattrib/src/x_gtksheet.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_gtksheet.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/x_gtksheet.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- x_gtksheet.c	21 Feb 2005 05:29:33 -0000	1.7
  +++ x_gtksheet.c	11 Mar 2005 17:50:56 -0000	1.8
  @@ -262,6 +262,9 @@
     int new_width = 0;
     int char_width;
     
  +  /* Leave if no items to add are available */
  +  if ((count == 0) || (list_head == NULL)) return;
  +
     /* Get character width based upon "X", which is a large char.
      * font_combo is a global.  Where is it set?  */
   #ifdef HAS_GTK22
  @@ -303,6 +306,9 @@
     gchar *text;
     int j;
   
  +  /* Leave if no items to add are available */
  +  if ((count == 0) || (list_head == NULL)) return;
  +
     string_list_item = list_head;
     for (j = 0; j < count; j++) {
       text = (gchar *) g_strdup(string_list_item->data);
  @@ -317,9 +323,7 @@
     
   
   /*------------------------------------------------------------------
  - * x_gtksheet_add_cell_item:  First construct the rest of the spreadsheet
  - * widget, then insert data into sheet's cells, then finally display
  - * the sheet window.  
  + * x_gtksheet_add_cell_item:  
    *------------------------------------------------------------------*/
   void
   x_gtksheet_add_cell_item(GtkSheet *sheet, int i, int j, gchar *text)
  
  
  
  1.6       +16 -8     eda/geda/devel/gattrib/src/x_window.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_window.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gattrib/src/x_window.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- x_window.c	5 Feb 2005 16:03:53 -0000	1.5
  +++ x_window.c	11 Mar 2005 17:50:56 -0000	1.6
  @@ -258,10 +258,15 @@
       exit(0);
     }
   
  +  if (sheet_head->pin_count == 0) {
  +    fprintf(stderr, "\n\nNo pins found on any components!  \nPlease check your design.  \nExiting. . . .\n");
  +    exit(0);
  +  }
  +
  +
  +
     /* Since we have passed the sanity checking, initialize the gtksheet. */
   #ifdef DEBUG
  -  fflush(stderr);
  -  fflush(stdout);
     printf("In x_window_add_items, about to call x_gtksheet_init.\n");
   #endif
     x_gtksheet_init();  /* this creates a new gtksheet having dimensions specified
  @@ -271,18 +276,21 @@
   #ifdef DEBUG
     printf("In x_window_add_items, now load up the row and column labels.\n");
   #endif
  +  if (sheet_head->comp_count > 0 ) {
     x_gtksheet_add_row_labels(GTK_SHEET(sheets[0]), sheet_head->comp_count, sheet_head->master_comp_list_head);
     x_gtksheet_add_col_labels(GTK_SHEET(sheets[0]), sheet_head->comp_attrib_count, sheet_head->master_comp_attrib_list_head);
  +  }
  +
   
  -#if 0
  +  /* This is not ready.  I need to implement net attributes */
     if (sheet_head->net_count > 0 ) {
       x_gtksheet_add_row_labels(GTK_SHEET(sheets[1]), sheet_head->net_count, sheet_head->master_net_list_head);
       x_gtksheet_add_col_labels(GTK_SHEET(sheets[1]), sheet_head->net_attrib_count, sheet_head->master_net_attrib_list_head);
     } else {
  -    x_gtksheet_add_row_labels(GTK_SHEET(sheets[1]), 1, 1);
  -    x_gtksheet_add_col_labels(GTK_SHEET(sheets[1]), 1, 1);
  +    x_gtksheet_add_row_labels(GTK_SHEET(sheets[1]), 1, NULL);
  +    x_gtksheet_add_col_labels(GTK_SHEET(sheets[1]), 1, NULL);
     }  
  -#endif  
  +
   
     if (sheet_head->pin_count > 0 ) {
       x_gtksheet_add_row_labels(GTK_SHEET(sheets[2]), sheet_head->pin_count, sheet_head->master_pin_list_head);