(patch) clist/ctree const-ness



Will commit the patch below unless there are objections; it makes the
clist_new_with_titles and related functions const-correct.

	Jeff



Index: gtk/gtkclist.c
===================================================================
RCS file: /debian/home/gnomecvs/gtk+/gtk/gtkclist.c,v
retrieving revision 1.141
diff -u -r1.141 gtkclist.c
--- gtkclist.c	1999/01/16 04:21:46	1.141
+++ gtkclist.c	1999/01/16 19:58:17
@@ -412,7 +412,7 @@
 				    GdkBitmap     *mask);
 static gint real_insert_row        (GtkCList      *clist,
 				    gint           row,
-				    gchar         *text[]);
+				    const gchar   *text[]);
 static void real_remove_row        (GtkCList      *clist,
 				    gint           row);
 static void real_clear             (GtkCList      *clist);
@@ -1046,9 +1046,9 @@
 
 /* Constructors */
 void
-gtk_clist_construct (GtkCList *clist,
-		     gint      columns,
-		     gchar    *titles[])
+gtk_clist_construct (GtkCList    *clist,
+		     gint         columns,
+		     const gchar *titles[])
 {
   g_return_if_fail (clist != NULL);
   g_return_if_fail (GTK_IS_CLIST (clist));
@@ -1118,8 +1118,8 @@
 }
  
 GtkWidget*
-gtk_clist_new_with_titles (gint   columns,
-			   gchar *titles[])
+gtk_clist_new_with_titles (gint		 columns,
+			   const gchar	*titles[])
 {
   GtkWidget *widget;
 
@@ -2666,8 +2666,8 @@
  *   gtk_clist_clear
  */
 gint
-gtk_clist_prepend (GtkCList    *clist,
-		   gchar       *text[])
+gtk_clist_prepend (GtkCList	*clist,
+		   const gchar	*text[])
 {
   g_return_val_if_fail (clist != NULL, -1);
   g_return_val_if_fail (GTK_IS_CLIST (clist), -1);
@@ -2677,8 +2677,8 @@
 }
 
 gint
-gtk_clist_append (GtkCList    *clist,
-		  gchar       *text[])
+gtk_clist_append (GtkCList	*clist,
+		  const gchar	*text[])
 {
   g_return_val_if_fail (clist != NULL, -1);
   g_return_val_if_fail (GTK_IS_CLIST (clist), -1);
@@ -2688,9 +2688,9 @@
 }
 
 gint
-gtk_clist_insert (GtkCList    *clist,
-		  gint         row,
-		  gchar       *text[])
+gtk_clist_insert (GtkCList	*clist,
+		  gint		 row,
+		  const gchar	*text[])
 {
   g_return_val_if_fail (clist != NULL, -1);
   g_return_val_if_fail (GTK_IS_CLIST (clist), -1);
@@ -2725,9 +2725,9 @@
  *   real_row_move
  */
 static gint
-real_insert_row (GtkCList *clist,
-		 gint      row,
-		 gchar    *text[])
+real_insert_row (GtkCList	*clist,
+		 gint		 row,
+		 const gchar	*text[])
 {
   gint i;
   GtkCListRow *clist_row;
Index: gtk/gtkclist.h
===================================================================
RCS file: /debian/home/gnomecvs/gtk+/gtk/gtkclist.h,v
retrieving revision 1.43
diff -u -r1.43 gtkclist.h
--- gtkclist.h	1998/12/16 01:28:28	1.43
+++ gtkclist.h	1999/01/16 19:58:23
@@ -291,7 +291,7 @@
   void   (*sort_list)           (GtkCList       *clist);
   gint   (*insert_row)          (GtkCList       *clist,
 				 gint            row,
-				 gchar          *text[]);
+				 const gchar    *text[]);
   void   (*remove_row)          (GtkCList       *clist,
 				 gint            row);
   void   (*set_cell_contents)   (GtkCList       *clist,
@@ -430,14 +430,14 @@
 GtkType gtk_clist_get_type (void);
 
 /* constructors useful for gtk-- wrappers */
-void gtk_clist_construct (GtkCList *clist,
-			  gint      columns,
-			  gchar    *titles[]);
+void gtk_clist_construct (GtkCList    *clist,
+			  gint	       columns,
+			  const gchar *titles[]);
 
 /* create a new GtkCList */
-GtkWidget* gtk_clist_new             (gint   columns);
-GtkWidget* gtk_clist_new_with_titles (gint   columns,
-				      gchar *titles[]);
+GtkWidget* gtk_clist_new             (gint	   columns);
+GtkWidget* gtk_clist_new_with_titles (gint	   columns,
+				      const gchar *titles[]);
 
 /* set adjustments of clist */
 void gtk_clist_set_hadjustment (GtkCList      *clist,
@@ -670,16 +670,16 @@
  * making it easier to append and modify a row
  */
 gint gtk_clist_prepend (GtkCList    *clist,
-		        gchar       *text[]);
+		        const gchar *text[]);
 gint gtk_clist_append  (GtkCList    *clist,
-			gchar       *text[]);
+			const gchar *text[]);
 
 /* inserts a row at index row and returns the row where it was
  * actually inserted (may be different from "row" in auto_sort mode)
  */
 gint gtk_clist_insert (GtkCList    *clist,
 		       gint         row,
-		       gchar       *text[]);
+		       const gchar *text[]);
 
 /* removes row at index row */
 void gtk_clist_remove (GtkCList *clist,
Index: gtk/gtkctree.c
===================================================================
RCS file: /debian/home/gnomecvs/gtk+/gtk/gtkctree.c,v
retrieving revision 1.52
diff -u -r1.52 gtkctree.c
--- gtkctree.c	1999/01/08 00:21:34	1.52
+++ gtkctree.c	1999/01/16 19:59:00
@@ -253,7 +253,7 @@
 					 gpointer       data);
 static gint real_insert_row             (GtkCList      *clist,
 					 gint           row,
-					 gchar         *text[]);
+					 const gchar   *text[]);
 static void real_remove_row             (GtkCList      *clist,
 					 gint           row);
 static void real_sort_list              (GtkCList      *clist);
@@ -3527,7 +3527,7 @@
 gtk_ctree_construct (GtkCTree    *ctree,
 		     gint         columns, 
 		     gint         tree_column,
-		     gchar       *titles[])
+		     const gchar *titles[])
 {
   GtkCList *clist;
 
@@ -3557,7 +3557,7 @@
 GtkWidget *
 gtk_ctree_new_with_titles (gint         columns, 
 			   gint         tree_column,
-			   gchar       *titles[])
+			   const gchar *titles[])
 {
   GtkWidget *widget;
 
@@ -3578,9 +3578,9 @@
 }
 
 static gint
-real_insert_row (GtkCList *clist,
-		 gint      row,
-		 gchar    *text[])
+real_insert_row (GtkCList    *clist,
+		 gint         row,
+		 const gchar *text[])
 {
   GtkCTreeNode *parent = NULL;
   GtkCTreeNode *sibling;
@@ -3606,7 +3606,7 @@
 gtk_ctree_insert_node (GtkCTree     *ctree,
 		       GtkCTreeNode *parent, 
 		       GtkCTreeNode *sibling,
-		       gchar        *text[],
+		       const gchar  *text[],
 		       guint8        spacing,
 		       GdkPixmap    *pixmap_closed,
 		       GdkBitmap    *mask_closed,
Index: gtk/gtkctree.h
===================================================================
RCS file: /debian/home/gnomecvs/gtk+/gtk/gtkctree.h,v
retrieving revision 1.26
diff -u -r1.26 gtkctree.h
--- gtkctree.h	1998/12/16 01:28:30	1.26
+++ gtkctree.h	1999/01/16 19:59:01
@@ -166,16 +166,16 @@
 void gtk_ctree_construct                         (GtkCTree     *ctree,
 						  gint          columns, 
 						  gint          tree_column,
-						  gchar        *titles[]);
+						  const gchar  *titles[]);
 GtkWidget * gtk_ctree_new_with_titles            (gint          columns, 
 						  gint          tree_column,
-						  gchar        *titles[]);
+						  const gchar  *titles[]);
 GtkWidget * gtk_ctree_new                        (gint          columns, 
 						  gint          tree_column);
 GtkCTreeNode * gtk_ctree_insert_node             (GtkCTree     *ctree,
 						  GtkCTreeNode *parent, 
 						  GtkCTreeNode *sibling,
-						  gchar        *text[],
+						  const gchar  *text[],
 						  guint8        spacing,
 						  GdkPixmap    *pixmap_closed,
 						  GdkBitmap    *mask_closed,


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