2003-01-12 Martin Baulig <martin@ximian.com>

* parser/gapi2xml.pl (addNameElem): Make this work if the $cname
	doesn't start with $prefix.

svn path=/trunk/gtk-sharp/; revision=10427
This commit is contained in:
Martin Baulig 2003-01-12 17:45:19 +00:00
parent 01f0577b8c
commit 44265207bf
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2003-01-12 Martin Baulig <martin@ximian.com>
* parser/gapi2xml.pl (addNameElem): Make this work if the $cname
doesn't start with $prefix.
2003-01-10 Duncan Mak <duncan@ximian.com>
* gtk/TextView.custom (WindowToBufferCoords): Remove the hack, as

View File

@ -521,11 +521,16 @@ sub addNameElem
my $elem = $doc->createElement($type);
$node->appendChild($elem);
if ($prefix) {
$cname =~ /$prefix(\w+)/;
if ($prepend) {
$name = $prepend . $1;
my $match;
if ($cname =~ /$prefix(\w+)/) {
$match = $1;
} else {
$name = $1;
$match = $cname;
}
if ($prepend) {
$name = $prepend . $match;
} else {
$name = $match;
}
$elem->setAttribute('name', StudlyCaps($name));
}