mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
Shorten the title for D-Bus interface docs
The title of an interface can be arbitrarily long, considering that reverse DNS namespaces can be pretty complex. Instead of using the whole interface name, we can use the name without the prefix.
This commit is contained in:
parent
eddd04add1
commit
2b2b04d188
@ -88,7 +88,7 @@ class MdCodeGenerator:
|
|||||||
f"Title: {iface.name} D-Bus Interface",
|
f"Title: {iface.name} D-Bus Interface",
|
||||||
f"Slug: {iface.name}",
|
f"Slug: {iface.name}",
|
||||||
"",
|
"",
|
||||||
"# " + iface.name,
|
"# " + iface.name_without_prefix,
|
||||||
"",
|
"",
|
||||||
"## Description",
|
"## Description",
|
||||||
"",
|
"",
|
||||||
|
@ -82,12 +82,13 @@ class RstCodeGenerator:
|
|||||||
|
|
||||||
def _generate_header(self, iface):
|
def _generate_header(self, iface):
|
||||||
"""Generates the header and preamble of the document."""
|
"""Generates the header and preamble of the document."""
|
||||||
header_len = len(iface.name)
|
iface_name = iface.name_without_prefix
|
||||||
|
header_len = len(iface_name)
|
||||||
res = [
|
res = [
|
||||||
f".. _{iface.name}:",
|
f".. _{iface.name}:",
|
||||||
"",
|
"",
|
||||||
"=" * header_len,
|
"=" * header_len,
|
||||||
iface.name,
|
iface_name,
|
||||||
"=" * header_len,
|
"=" * header_len,
|
||||||
"",
|
"",
|
||||||
"-----------",
|
"-----------",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user