BookmarkList#

class BookmarkList(**properties: Any)#

Superclasses: Object

Implemented Interfaces: ListModel

A list model that wraps GBookmarkFile.

It presents a GListModel and fills it asynchronously with the GFileInfos returned from that function.

The GFileInfos in the list have some attributes in the recent namespace added: recent::private (boolean) and recent:applications (stringv).

Constructors#

class BookmarkList
classmethod new(filename: str | None = None, attributes: str | None = None) BookmarkList#

Creates a new GtkBookmarkList with the given attributes.

Parameters:
  • filename – The bookmark file to load

  • attributes – The attributes to query

Methods#

class BookmarkList
get_attributes() str | None#

Gets the attributes queried on the children.

get_filename() str#

Returns the filename of the bookmark file that this list is loading.

get_io_priority() int#

Gets the IO priority to use while loading file.

is_loading() bool#

Returns 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.

set_attributes(attributes: str | None = None) None#

Sets the attributes to be enumerated and starts the enumeration.

If attributes is None, no attributes will be queried, but a list of GFileInfos will still be created.

Parameters:

attributes – the attributes to enumerate

set_io_priority(io_priority: int) None#

Sets the IO priority to use while loading files.

The default IO priority is %G_PRIORITY_DEFAULT.

Parameters:

io_priority – IO priority to use

Properties#

class BookmarkList
props.attributes: str#

The attributes to query.

props.filename: str#

The bookmark file to load.

props.io_priority: int#

Priority used when loading.

props.item_type: GType#

The type of items. See get_item_type.

Added in version 4.8.

props.loading: bool#

True if files are being loaded.

props.n_items: int#

The number of items. See get_n_items.

Added in version 4.8.