diff --git a/libgimp/gimpenums.c.tail b/libgimp/gimpenums.c.tail index fee13c8dbf..dd3602236c 100644 --- a/libgimp/gimpenums.c.tail +++ b/libgimp/gimpenums.c.tail @@ -45,11 +45,11 @@ static const GimpGetTypeFunc get_type_funcs[] = gimp_message_handler_type_get_type, gimp_offset_type_get_type, gimp_orientation_type_get_type, + gimp_paint_application_mode_get_type, + gimp_path_stroke_type_get_type, gimp_pdb_error_handler_get_type, gimp_pdb_proc_type_get_type, gimp_pdb_status_type_get_type, - gimp_paint_application_mode_get_type, - gimp_path_stroke_type_get_type, gimp_precision_get_type, gimp_progress_command_get_type, gimp_repeat_mode_get_type, @@ -111,11 +111,11 @@ static const gchar * const type_names[] = "GimpMessageHandlerType", "GimpOffsetType", "GimpOrientationType", + "GimpPaintApplicationMode", + "GimpPathStrokeType", "GimpPDBErrorHandler", "GimpPDBProcType", "GimpPDBStatusType", - "GimpPaintApplicationMode", - "GimpPathStrokeType", "GimpPrecision", "GimpProgressCommand", "GimpRepeatMode", diff --git a/pdb/enumcode.pl b/pdb/enumcode.pl index 91c5ce29f1..10fe602767 100755 --- a/pdb/enumcode.pl +++ b/pdb/enumcode.pl @@ -72,8 +72,8 @@ foreach (sort keys %enums) { ! $enums{$_}->{external}) { my $gtype = $func = $_; - for ($gtype) { s/Gimp//; s/([A-Z][^A-Z]+)/\U$1\E_/g; s/_$// } - for ($func) { s/Gimp//; s/([A-Z][^A-Z]+)/\L$1\E_/g; s/_$// } + for ($gtype) { s/Gimp//; s/([A-Z][^A-Z]+|[A-Z]+(?=[A-Z]))/\U$1\E_/g; s/_$// } + for ($func) { s/Gimp//; s/([A-Z][^A-Z]+|[A-Z]+(?=[A-Z]))/\L$1\E_/g; s/_$// } print ENUMFILE "\n#define GIMP_TYPE_$gtype (gimp_$func\_get_type ())\n\n"; print ENUMFILE "GType gimp_$func\_get_type (void) G_GNUC_CONST;\n\n"; @@ -136,14 +136,14 @@ static const GimpGetTypeFunc get_type_funcs[] = CODE my $first = 1; -foreach (sort keys %enums) { +foreach (sort {uc($a) cmp uc($b)} keys %enums) { if (! ($_ =~ /GimpUnit/)) { my $enum = $enums{$_}; my $func = $_; my $gegl_enum = ($func =~ /Gegl/); for ($func) { s/Gimp//; s/Gegl//; s/PDB/Pdb/; - s/([A-Z][^A-Z]+)/\L$1\E_/g; s/_$// } + s/([A-Z][^A-Z]+|[A-Z]+(?=[A-Z]))/\L$1\E_/g; s/_$// } print ENUMFILE ",\n" unless $first; @@ -166,7 +166,7 @@ static const gchar * const type_names[] = CODE $first = 1; -foreach (sort keys %enums) { +foreach (sort {uc($a) cmp uc($b)} keys %enums) { if (! ($_ =~ /GimpUnit/)) { my $enum = $enums{$_}; my $gtype = $_;