:right-sidebar: True BookmarkList =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: BookmarkList(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.ListModel` ``GtkBookmarkList`` is a list model that wraps ``GBookmarkFile``. It presents a ``GListModel`` and fills it asynchronously with the ``GFileInfo``'s returned from that function. The ``GFileInfo``'s in the list have some attributes in the recent namespace added: ``recent::private`` (boolean) and ``recent:applications`` (stringv). Constructors ------------ .. rst-class:: interim-class .. class:: BookmarkList :no-index: .. classmethod:: new(filename: str | None = None, attributes: str | None = None) -> ~gi.repository.Gtk.BookmarkList Creates a new ``GtkBookmarkList`` with the given ``attributes``. :param filename: The bookmark file to load :param attributes: The attributes to query Methods ------- .. rst-class:: interim-class .. class:: BookmarkList :no-index: .. method:: get_attributes() -> str | None Gets the attributes queried on the children. .. method:: get_filename() -> str Returns the filename of the bookmark file that this list is loading. .. method:: get_io_priority() -> int Gets the IO priority to use while loading file. .. method:: is_loading() -> bool Returns :const:`True` if the files are currently being loaded. Files will be added to ``self`` from time to time while loading is going on. The order in which are added is undefined and may change in between runs. .. method:: set_attributes(attributes: str | None = None) -> None Sets the ``attributes`` to be enumerated and starts the enumeration. If ``attributes`` is :const:`None`, no attributes will be queried, but a list of ``GFileInfo``'s will still be created. :param attributes: the attributes to enumerate .. method:: set_io_priority(io_priority: int) -> None Sets the IO priority to use while loading files. The default IO priority is ``%G_PRIORITY_DEFAULT``. :param io_priority: IO priority to use Properties ---------- .. rst-class:: interim-class .. class:: BookmarkList :no-index: .. attribute:: props.attributes :type: str The attributes to query. .. attribute:: props.filename :type: str The bookmark file to load. .. attribute:: props.io_priority :type: int Priority used when loading. .. attribute:: props.item_type :type: type The type of items. See :obj:`~gi.repository.Gio.ListModel.get_item_type`. .. versionadded:: 4.8 .. attribute:: props.loading :type: bool :const:`True` if files are being loaded. .. attribute:: props.n_items :type: int The number of items. See :obj:`~gi.repository.Gio.ListModel.get_n_items`. .. versionadded:: 4.8