gtk-doc r621 - trunk



Author: stefkost
Date: Mon Dec  1 09:22:32 2008
New Revision: 621
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=621&view=rev

Log:
	patch by: Matthias Clasen  <mclasen redhat com>
	* gtkdoc-mkdb.in:
	  Fix index-id generation for child and style properties. Fixes #562064.



Modified:
   trunk/ChangeLog
   trunk/gtkdoc-mkdb.in

Modified: trunk/gtkdoc-mkdb.in
==============================================================================
--- trunk/gtkdoc-mkdb.in	(original)
+++ trunk/gtkdoc-mkdb.in	Mon Dec  1 09:22:32 2008
@@ -311,6 +311,13 @@
     &ReadSourceDocumentation ($dir);
 }
 
+# FIXME: can we scan for a common prefix?
+# DEBUG
+# check $Declarations{$key} to first '_', we would need to count
+#my %prefixes = map { m/^(.*?)\_.*/;uc($1) => 1 } grep { m/\_/ } keys (%Declarations);
+#foreach (keys %prefixes) { print "$_\n"; }
+# DEBUG
+
 my $changed = &OutputSGML ("$ROOT_DIR/$MODULE-sections.txt");
 
 # If any of the DocBook SGML files have changed, update the timestamp file (so
@@ -823,15 +830,15 @@
             $short_symbol = $symbol;
         }
 
-        my $xref = &MakeXRef ($symbol);
         my $curletter = uc(substr($short_symbol,0,1));
         my $id = $apiindex{$symbol};
-        
+        my $xref = &MakeXRef ($id, $symbol);
+
         #print "  add symbol $symbol with $id to index in section $curletter\n";
 
         if ($curletter ne $lastletter) {
             $lastletter = $curletter;
-      
+
             if ($divopen == 1) {
                 print (OUTPUT "</indexdiv>\n");
             }
@@ -2122,12 +2129,11 @@
 sub CreateValidSGMLID {
     my ($id) = $_[0];
 
-    # Append ":CAPS" to all all-caps identifiers
-
     # Special case, '_' would end up as '' so we use 'gettext-macro' instead.
     if ($id eq "_") { return "gettext-macro"; }
 
-    if ($id !~ /[a-z]/) { $id .= ":CAPS" };
+    # Append ":CAPS" to all all-caps identifiers
+    if ($id !~ /[a-z]/ && $id !~ /-CAPS$/) { $id .= ":CAPS" };
 
     $id =~ s/[_ ]/-/g;
     $id =~ s/[,\.]//g;



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