Gtk.BookmarkList¶
class — extends GObject.Object, Gio.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¶
new¶
@classmethod
def new(cls, filename: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None = ..., attributes: str | None = ...) -> BookmarkList
Creates a new GtkBookmarkList with the given attributes.
Parameters:
filename— The bookmark file to loadattributes— The attributes to query
Methods¶
get_attributes¶
Gets the attributes queried on the children.
get_filename¶
Returns the filename of the bookmark file that this list is loading.
get_io_priority¶
Gets the IO priority to use while loading file.
is_loading¶
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¶
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¶
Sets the IO priority to use while loading files.
The default IO priority is GLib.PRIORITY_DEFAULT.
Parameters:
io_priority— IO priority to use
Properties¶
attributes¶
The attributes to query.
filename¶
The bookmark file to load.
io_priority¶
Priority used when loading.
item_type¶
The type of items. See Gio.ListModel.get_item_type.
loading¶
True if files are being loaded.
n_items¶
The number of items. See Gio.ListModel.get_n_items.