Devhelp.BookListBuilder

g Devhelp.BookListBuilder Devhelp.BookListBuilder GObject.Object GObject.Object GObject.Object->Devhelp.BookListBuilder

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_default_sub_book_lists ()

add_sub_book_list (sub_book_list)

create_object ()

read_books_disabled_setting (settings)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Devhelp.BookListBuilder(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Devhelp.BookListBuilderClass

classmethod new()
Returns:

a new Devhelp.BookListBuilder.

Return type:

Devhelp.BookListBuilder

New in version 3.30.

add_default_sub_book_lists()

Creates the default Devhelp.BookListDirectory's and adds them to self with Devhelp.BookListBuilder.add_sub_book_list().

It creates and adds a Devhelp.BookListDirectory for the following directories (in that order):

  • $XDG_DATA_HOME/doc/

  • $XDG_DATA_HOME/gtk-doc/html/

  • $XDG_DATA_HOME/devhelp/books/

  • For each directory in $XDG_DATA_DIRS:

    • $xdg_data_dir/doc/

    • $xdg_data_dir/gtk-doc/html/

    • $xdg_data_dir/devhelp/books/

See GLib.get_user_data_dir() and GLib.get_system_data_dirs().

Additionally, if the libdevhelp has been compiled with the flatpak_build option, it creates and adds a Devhelp.BookListDirectory for the following directories (in that order, after the above ones):

  • /run/host/usr/share/doc/

  • /run/host/usr/share/gtk-doc/html/

  • /run/host/usr/share/devhelp/books/

The exact list of directories is subject to change, it is not part of the API.

New in version 3.30.

add_sub_book_list(sub_book_list)
Parameters:

sub_book_list (Devhelp.BookList) – a Devhelp.BookList.

Adds sub_book_list.

The Devhelp.BookList object that will be created with Devhelp.BookListBuilder.create_object() will contain all the sub-Devhelp.BookList's added with this function (and it will listen to their signals). The sub-Devhelp.BookList's must be added in order of decreasing priority (the first sub-Devhelp.BookList added has the highest priority). The priority is used in case of book ID conflicts (see Devhelp.Book.get_id()).

New in version 3.30.

create_object()
Returns:

the newly created Devhelp.BookList object.

Return type:

Devhelp.BookList

Creates the Devhelp.BookList. It actually creates a subclass of Devhelp.BookList, but the subclass is not exposed to the public API.

New in version 3.30.

read_books_disabled_setting(settings)
Parameters:

settings (Devhelp.Settings or None) – a Devhelp.Settings, or None.

Sets the Devhelp.Settings object from which to read the “books-disabled” Gio.Settings key. If settings is None or if this function isn’t called, then the Devhelp.BookList object that will be created with Devhelp.BookListBuilder.create_object() will not read a “books-disabled” setting.

With Devhelp.BookListBuilder it is not possible to read the “books-disabled” settings from several Devhelp.Settings objects and combine them. Only the last call to this function is taken into account when creating the Devhelp.BookList with Devhelp.BookListBuilder.create_object().

New in version 3.30.