summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-11-26 03:43:24 +0000
committerTim Janik <timj@src.gnome.org>1998-11-26 03:43:24 +0000
commitc7ac3835fa2d5542bff316c3a02da626a754d213 (patch)
treefa66d00e02bf40e153dab5a9738d105ba828b68d
parentce073aac7dd120cc930c3f6d1f5e7334f96c8f6e (diff)
downloadgdk-pixbuf-c7ac3835fa2d5542bff316c3a02da626a754d213.tar.gz
reverted bogus and undocumented!!! changes from Jay Cox (98/11/23
Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org> * gtk/gtkclist.h: * gtk/gtkctree.h: * gtk/gtkclist.c: * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays. * gtk/maketypes.awk: changed underline substitution, so we get GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS. * gtk/makeenums.pl: likewise. * gtk/gtkctree.c: adapted type names accordingly.
-rw-r--r--ChangeLog13
-rw-r--r--ChangeLog.pre-2-013
-rw-r--r--ChangeLog.pre-2-1013
-rw-r--r--ChangeLog.pre-2-213
-rw-r--r--ChangeLog.pre-2-413
-rw-r--r--ChangeLog.pre-2-613
-rw-r--r--ChangeLog.pre-2-813
-rw-r--r--TODO2
-rw-r--r--gtk/gtkclist.c10
-rw-r--r--gtk/gtkclist.h10
-rw-r--r--gtk/gtkctree.c10
-rw-r--r--gtk/gtkctree.h4
-rwxr-xr-xgtk/makeenums.pl9
-rw-r--r--gtk/maketypes.awk19
14 files changed, 123 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 14464a8c1..56b96ebc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.c:
+ * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from
+ Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays.
+
+ * gtk/maketypes.awk: changed underline substitution, so we get
+ GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS.
+ * gtk/makeenums.pl: likewise.
+ * gtk/gtkctree.c: adapted type names accordingly.
+
Tue Nov 24 11:31:06 1998 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.2.txt: Edited section on the ScrolledWindow.
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 14464a8c1..56b96ebc5 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,16 @@
+Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.c:
+ * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from
+ Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays.
+
+ * gtk/maketypes.awk: changed underline substitution, so we get
+ GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS.
+ * gtk/makeenums.pl: likewise.
+ * gtk/gtkctree.c: adapted type names accordingly.
+
Tue Nov 24 11:31:06 1998 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.2.txt: Edited section on the ScrolledWindow.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 14464a8c1..56b96ebc5 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,16 @@
+Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.c:
+ * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from
+ Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays.
+
+ * gtk/maketypes.awk: changed underline substitution, so we get
+ GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS.
+ * gtk/makeenums.pl: likewise.
+ * gtk/gtkctree.c: adapted type names accordingly.
+
Tue Nov 24 11:31:06 1998 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.2.txt: Edited section on the ScrolledWindow.
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 14464a8c1..56b96ebc5 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,16 @@
+Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.c:
+ * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from
+ Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays.
+
+ * gtk/maketypes.awk: changed underline substitution, so we get
+ GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS.
+ * gtk/makeenums.pl: likewise.
+ * gtk/gtkctree.c: adapted type names accordingly.
+
Tue Nov 24 11:31:06 1998 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.2.txt: Edited section on the ScrolledWindow.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 14464a8c1..56b96ebc5 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,16 @@
+Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.c:
+ * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from
+ Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays.
+
+ * gtk/maketypes.awk: changed underline substitution, so we get
+ GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS.
+ * gtk/makeenums.pl: likewise.
+ * gtk/gtkctree.c: adapted type names accordingly.
+
Tue Nov 24 11:31:06 1998 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.2.txt: Edited section on the ScrolledWindow.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 14464a8c1..56b96ebc5 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,16 @@
+Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.c:
+ * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from
+ Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays.
+
+ * gtk/maketypes.awk: changed underline substitution, so we get
+ GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS.
+ * gtk/makeenums.pl: likewise.
+ * gtk/gtkctree.c: adapted type names accordingly.
+
Tue Nov 24 11:31:06 1998 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.2.txt: Edited section on the ScrolledWindow.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 14464a8c1..56b96ebc5 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,16 @@
+Thu Nov 26 03:18:08 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.c:
+ * gtk/gtkctree.c: reverted bogus and undocumented!!! changes from
+ Jay Cox (98/11/23 13:53:26) which `const' qualified char* arrays.
+
+ * gtk/maketypes.awk: changed underline substitution, so we get
+ GTK_TYPE_CTREE_POS instead of the broken GTK_TYPE_C_TREE_POS.
+ * gtk/makeenums.pl: likewise.
+ * gtk/gtkctree.c: adapted type names accordingly.
+
Tue Nov 24 11:31:06 1998 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.2.txt: Edited section on the ScrolledWindow.
diff --git a/TODO b/TODO
index 9cb2cffad..adfc2c6b5 100644
--- a/TODO
+++ b/TODO
@@ -2,8 +2,6 @@ For 1.2.0 release:
- remove deprecated functions from *.[hc] files.
- finish composite child stuff.
- implement constructor functionality for all widgets.
-- fix enum generation code which still puts out
- GTK_TYPE_C_TREE_POS instead of GTK_TYPE_CTREE_POS
Bugs:
* Change bitfields to guints from enums, or vice versa?
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index d3eb21a44..ee7caea36 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -937,7 +937,7 @@ gtk_clist_init (GtkCList *clist)
void
gtk_clist_construct (GtkCList *clist,
gint columns,
- const gchar *titles[])
+ gchar *titles[])
{
g_return_if_fail (clist != NULL);
g_return_if_fail (GTK_IS_CLIST (clist));
@@ -1008,7 +1008,7 @@ gtk_clist_new (gint columns)
GtkWidget*
gtk_clist_new_with_titles (gint columns,
- const gchar *titles[])
+ gchar *titles[])
{
GtkWidget *widget;
@@ -2523,7 +2523,7 @@ cell_size_request (GtkCList *clist,
*/
gint
gtk_clist_prepend (GtkCList *clist,
- const gchar *text[])
+ gchar *text[])
{
g_return_val_if_fail (clist != NULL, -1);
g_return_val_if_fail (GTK_IS_CLIST (clist), -1);
@@ -2534,7 +2534,7 @@ gtk_clist_prepend (GtkCList *clist,
gint
gtk_clist_append (GtkCList *clist,
- const gchar *text[])
+ gchar *text[])
{
g_return_val_if_fail (clist != NULL, -1);
g_return_val_if_fail (GTK_IS_CLIST (clist), -1);
@@ -2546,7 +2546,7 @@ gtk_clist_append (GtkCList *clist,
gint
gtk_clist_insert (GtkCList *clist,
gint row,
- const gchar *text[])
+ gchar *text[])
{
g_return_val_if_fail (clist != NULL, -1);
g_return_val_if_fail (GTK_IS_CLIST (clist), -1);
diff --git a/gtk/gtkclist.h b/gtk/gtkclist.h
index 2323b3481..d140ad111 100644
--- a/gtk/gtkclist.h
+++ b/gtk/gtkclist.h
@@ -378,12 +378,12 @@ GtkType gtk_clist_get_type (void);
/* constructors useful for gtk-- wrappers */
void gtk_clist_construct (GtkCList *clist,
gint columns,
- const gchar *titles[]);
+ gchar *titles[]);
/* create a new GtkCList */
GtkWidget* gtk_clist_new (gint columns);
GtkWidget* gtk_clist_new_with_titles (gint columns,
- const gchar *titles[]);
+ gchar *titles[]);
/* set adjustments of clist */
void gtk_clist_set_hadjustment (GtkCList *clist,
@@ -605,16 +605,16 @@ gboolean gtk_clist_get_selectable (GtkCList *clist,
* making it easier to append and modify a row
*/
gint gtk_clist_prepend (GtkCList *clist,
- const gchar *text[]);
+ gchar *text[]);
gint gtk_clist_append (GtkCList *clist,
- const gchar *text[]);
+ 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,
- const gchar *text[]);
+ gchar *text[]);
/* removes row at index row */
void gtk_clist_remove (GtkCList *clist,
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c
index 9934a58c3..0092d2c53 100644
--- a/gtk/gtkctree.c
+++ b/gtk/gtkctree.c
@@ -354,11 +354,11 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
GTK_ARG_READWRITE,
ARG_USE_DRAG_ICONS);
gtk_object_add_arg_type ("GtkCTree::line_style",
- GTK_TYPE_C_TREE_LINE_STYLE,
+ GTK_TYPE_CTREE_LINE_STYLE,
GTK_ARG_READWRITE,
ARG_LINE_STYLE);
gtk_object_add_arg_type ("GtkCTree::expander_style",
- GTK_TYPE_C_TREE_EXPANDER_STYLE,
+ GTK_TYPE_CTREE_EXPANDER_STYLE,
GTK_ARG_READWRITE,
ARG_EXPANDER_STYLE);
object_class->set_arg = gtk_ctree_set_arg;
@@ -407,7 +407,7 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
GTK_SIGNAL_OFFSET (GtkCTreeClass,
change_focus_row_expansion),
gtk_marshal_NONE__ENUM,
- GTK_TYPE_NONE, 1, GTK_TYPE_C_TREE_EXPANSION_TYPE);
+ GTK_TYPE_NONE, 1, GTK_TYPE_CTREE_EXPANSION_TYPE);
gtk_object_class_add_signals (object_class, ctree_signals, LAST_SIGNAL);
widget_class->realize = gtk_ctree_realize;
@@ -3883,7 +3883,7 @@ void
gtk_ctree_construct (GtkCTree *ctree,
gint columns,
gint tree_column,
- const gchar *titles[])
+ gchar *titles[])
{
GtkCList *clist;
@@ -3913,7 +3913,7 @@ gtk_ctree_construct (GtkCTree *ctree,
GtkWidget *
gtk_ctree_new_with_titles (gint columns,
gint tree_column,
- const gchar *titles[])
+ gchar *titles[])
{
GtkWidget *widget;
diff --git a/gtk/gtkctree.h b/gtk/gtkctree.h
index 0abc075b3..141316a14 100644
--- a/gtk/gtkctree.h
+++ b/gtk/gtkctree.h
@@ -177,10 +177,10 @@ GtkType gtk_ctree_get_type (void);
void gtk_ctree_construct (GtkCTree *ctree,
gint columns,
gint tree_column,
- const gchar *titles[]);
+ gchar *titles[]);
GtkWidget * gtk_ctree_new_with_titles (gint columns,
gint tree_column,
- const gchar *titles[]);
+ gchar *titles[]);
GtkWidget * gtk_ctree_new (gint columns,
gint tree_column);
GtkCTreeNode * gtk_ctree_insert_node (GtkCTree *ctree,
diff --git a/gtk/makeenums.pl b/gtk/makeenums.pl
index cc6d234c0..a6e447057 100755
--- a/gtk/makeenums.pl
+++ b/gtk/makeenums.pl
@@ -199,11 +199,12 @@ while (<>) {
print ")\n";
} else {
- ($valuename = $enumname) =~ s/([A-Z][a-z])/_$1/g;
- $valuename =~ s/([a-z])([A-Z])/$1_$2/g;
- $valuename = lc($valuename);
+ my $valuename = $enumname;
+ $valuename =~ s/([^A-Z])([A-Z])/$1_$2/g;
+ $valuename =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
+ $valuename = lc($valuename);
- print "static GtkEnumValue $ {valuename}_values[] = {\n";
+ print "static GtkEnumValue _${valuename}_values[] = {\n";
for (@entries) {
my ($name,$nick) = @{$_};
print qq( { $name, "$name", "$nick" },\n);
diff --git a/gtk/maketypes.awk b/gtk/maketypes.awk
index 95f3d5a03..44fec3f77 100644
--- a/gtk/maketypes.awk
+++ b/gtk/maketypes.awk
@@ -36,17 +36,18 @@ function set_type (set_type_1)
{
type_counter += 1;
type_name = set_type_1;
- type_macro = "GTK_TYPE";
-
- tmp = type_name
- gsub ("[A-Z][a-z]", "_&", tmp);
-# OK, the following is ridiculous. But easier than writing a loop
- gsub ("[a-z]", "&@", tmp);
- gsub ("@[A-Z]", "@&", tmp);
- gsub ("@@", "_", tmp);
+ type_macro = "GTK_TYPE_";
+
+ tmp = type_name;
+# OK, the following is ridiculous, and sed s///g would be far easier
+ gsub ("[A-Z]", "@&", tmp);
+ gsub ("[^A-Z]@", "&_", tmp);
+ gsub ("@", "", tmp);
+ gsub ("[A-Z][A-Z][A-Z][0-9a-z]", "@&", tmp);
+ gsub ("@..", "&_", tmp);
gsub ("@", "", tmp);
type_macro = type_macro toupper (tmp);
- type_ident = tolower (tmp);
+ type_ident = "_" tolower (tmp);
sub ("^GTK_TYPE_GTK_", "GTK_TYPE_", type_macro);
}