Commit Graph

14 Commits

Author SHA1 Message Date
Lubomir Rintel
acd814d50a generate-setting-docs: error out on missing documentation 2017-10-30 17:38:37 +01:00
Thomas Haller
d720f0955f cli: embed gtk-doc directly in property-info structure
Also mark them for translation.
2017-03-30 16:35:52 +02:00
Thomas Haller
b33b15ae76 doc: fix generate-setting-docs.py for supporting Python 3 sorted() style
Python 3 has no "cmp" argument to sorted().

Fixes: b0da972f5f
2017-03-20 11:12:40 +01:00
Lubomir Rintel
a1c5f43501 libnm/generate-setting-docs.py: include description attribute 2017-03-17 10:15:11 +01:00
Lubomir Rintel
b0da972f5f doc: sort "connection" settings first in nm-settings manual 2017-03-17 10:15:11 +01:00
Lubomir Rintel
b916d9dfe0 build: fix build with older gi
Fixes: 6c96aafaa9
(cherry picked from commit 22722b7732)
2017-01-19 14:18:26 +01:00
Lubomir Rintel
2ee8462774 build: make the doc generator find the right libnm.so
At some point gobject-introspection added an API to add a library path
and stopped honoring the LD_LIBRARY_PATH (a bug, according to GI
documentation?).

(cherry picked from commit 6c96aafaa9)
2017-01-19 11:21:38 +01:00
mirh
48402cd526 build: fix compilation with Python3
has_key() has long been dropped
https://docs.python.org/3.1/whatsnew/3.0.html#builtins

Should still work with anything from 2.3 onwards

https://github.com/NetworkManager/NetworkManager/pull/11
2016-11-29 22:03:01 +01:00
Thomas Haller
8d1233e67e python: use gi.require_version() in generate-setting-docs.py and examples
gi now emits a warning when not loading a specific library
version [1]:

  ./generate-setting-docs.py:21: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version(NM, 1.0) before import to ensure that the right version gets loaded.
    from gi.repository import NM, GObject

Seems require_version() is reasonably old to just always use it without
breaking on older versions [2].

[1] Related: https://bugzilla.gnome.org/show_bug.cgi?id=727379
[2] https://git.gnome.org/browse/pygobject/commit/?id=76758efb6579752237a0dc4d56cf9518de6c6e55
2015-11-11 10:56:05 +01:00
Dan Winship
3b86cc047e libnm: remove nm_utils_init() from the public API
Remove nm_utils_init() from the public API, and just do it as a
constructor instead.
2014-12-04 08:39:54 -05:00
Dan Winship
e43ba45f2f cli, libnm: don't use D-Bus-specific documentation in nmcli
Now that nm-setting-docs.xml is more D-Bus-specific, it's less
appropriate for nmcli's internal documentation. So generate a second
copy of the docs without using the overrides file, and use that one
for nmcli's documentation.
2014-11-19 09:24:10 -05:00
Dan Winship
36156b70dc libnm: Override parts of nm-setting-docs.xml
Add "---dbus---" sections to the NMSetting property docs, in the same
style as the plugin docs, parse them out into a file
"nm-setting-docs-overrides.xml", and use them to override the GObject
property docs in nm-setting-docs.xml.

This lets us put more D-Bus-specific information in the setting docs,
without cluttering up the property docs, and it also lets us document
dbus-only properties.
2014-11-19 09:24:10 -05:00
Dan Winship
780d8bf2fe libnm: fix nm-setting-docs.xml property types
Add nm_setting_get_dbus_property_type(), and use this to get the
correct type for properties in nm-seting-docs.xml, in situations where
the D-Bus and GObject property types don't match.

In the case of enum/flags-valued properties, give both the enum name
and the underlying D-Bus type.
2014-11-19 09:24:10 -05:00
Dan Winship
c14486984e libnm, libnm-util: move settings doc generation to libnm-core
Move the settings/plugins doc generation from libnm-util to
libnm-core, since libnm-util isn't being updated for all new
properties.

With this commit, the keyfile and ifcfg-rh documentation is basically
unchanged, except that deprecated properties are now gone, and new
properties have been added, and the sections are in a different order.
(generate-plugin-docs.pl just outputs the settings in Makefile order,
and they were unsorted in libnm-util, but are sorted in libnm-core).

The settings documentation used for nm-settings.5, the D-Bus API docs,
and the nmcli help is changed a bit more at this point, and mostly for
the worse, since the libnm-core setting properties don't match up with
the D-Bus API as well as the libnm-util ones do. To be fixed...

(I also removed the "plugins docs" line in each plugin docs comment
block while moving them, since those blocks will be used for more than
just plugins soon, and it's sort of obvious anyway.)
2014-11-19 09:24:09 -05:00