BookmarkList#

class BookmarkList(**properties: Any)#

Superclasses: Object

Implemented Interfaces: 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#

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 GFileInfo’s 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 type of the None singleton.

props.filename: str#

The type of the None singleton.

props.io_priority: int#

The type of the None singleton.

props.item_type: type#

The type of the None singleton.

Added in version 4.8.

props.loading: bool#

The type of the None singleton.

props.n_items: int#

The type of the None singleton.

Added in version 4.8.