[valadoc] Make type links showing relative names
- From: Florian Brosch <flobrosch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [valadoc] Make type links showing relative names
- Date: Thu, 15 Oct 2009 21:03:35 +0000 (UTC)
commit 36110c4b30f0c730f67ae9fa281c639e053f58f7
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Sun Sep 27 12:55:56 2009 +0200
Make type links showing relative names
src/doclets/htmlhelpers/taglets/typelink.vala | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/doclets/htmlhelpers/taglets/typelink.vala b/src/doclets/htmlhelpers/taglets/typelink.vala
index 32cf5d1..8731493 100755
--- a/src/doclets/htmlhelpers/taglets/typelink.vala
+++ b/src/doclets/htmlhelpers/taglets/typelink.vala
@@ -51,6 +51,23 @@ public class Valadoc.Html.TypeLinkInlineTaglet : Valadoc.InlineTaglet {
}
this.name = element.full_name ();
+ if (self is DocumentedElement) {
+ var doc_element = (DocumentedElement) self;
+ var doc_element_name = doc_element.full_name ();
+
+ if (this.name == doc_element_name) {
+ this.name = element.name;
+ } else if (this.name.has_prefix (doc_element_name)) {
+ this.name = this.name.substring (doc_element_name.length + 1);
+ } else if (doc_element.parent != null && doc_element.parent is DocumentedElement) {
+ var doc_parent_element_name = ((DocumentedElement) doc_element.parent).full_name ();
+ if (this.name == doc_parent_element_name) {
+ this.name = element.name;
+ } else if (this.name.has_prefix (doc_parent_element_name)) {
+ this.name = this.name.substring (doc_parent_element_name.length + 1);
+ }
+ }
+ }
this.css = get_html_content_link_css_class ( element );
this.link = get_html_link ( settings, element, self );
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]