Gtk.BookmarkList

g GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel GObject.Object GObject.Object Gtk.BookmarkList Gtk.BookmarkList GObject.Object->Gtk.BookmarkList Gio.ListModel->Gtk.BookmarkList

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ListModel (4)

Structs:

GObject.ObjectClass (5)

class

new (filename, attributes)

get_attributes ()

get_filename ()

get_io_priority ()

is_loading ()

set_attributes (attributes)

set_io_priority (io_priority)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ListModel (3)

Properties

Name

Type

Flags

Short Description

attributes

str

r/w/en

filename

str

r/w/co/en

io-priority

int

r/w/en

item-type

GObject.GType

r

loading

bool

r/en

n-items

int

r

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1)

Class Details

class Gtk.BookmarkList(**kwargs)
Bases:

GObject.Object, Gio.ListModel

Abstract:

No

Structure:

Gtk.BookmarkListClass

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

classmethod new(filename, attributes)[source]
Parameters:
  • filename (str or None) – The bookmark file to load

  • attributes (str or None) – The attributes to query

Returns:

a new GtkBookmarkList

Return type:

Gtk.BookmarkList

Creates a new GtkBookmarkList with the given attributes.

get_attributes()[source]
Returns:

The queried attributes

Return type:

str or None

Gets the attributes queried on the children.

get_filename()[source]
Returns:

the filename of the .xbel file

Return type:

str

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

get_io_priority()[source]
Returns:

The IO priority.

Return type:

int

Gets the IO priority to use while loading file.

is_loading()[source]
Returns:

True if self is loading

Return type:

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)[source]
Parameters:

attributes (str or None) – the attributes to enumerate

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.

set_io_priority(io_priority)[source]
Parameters:

io_priority (int) – IO priority to use

Sets the IO priority to use while loading files.

The default IO priority is GLib.PRIORITY_DEFAULT.

Property Details

Gtk.BookmarkList.props.attributes
Name:

attributes

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The attributes to query.

Gtk.BookmarkList.props.filename
Name:

filename

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

The bookmark file to load.

Gtk.BookmarkList.props.io_priority
Name:

io-priority

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Priority used when loading.

Gtk.BookmarkList.props.item_type
Name:

item-type

Type:

GObject.GType

Default Value:

<GType GFileInfo>

Flags:

READABLE

The type of items. See [method`Gio`.ListModel.get_item_type].

New in version 4.8.

Gtk.BookmarkList.props.loading
Name:

loading

Type:

bool

Default Value:

False

Flags:

READABLE, EXPLICIT_NOTIFY

True if files are being loaded.

Gtk.BookmarkList.props.n_items
Name:

n-items

Type:

int

Default Value:

0

Flags:

READABLE

The number of items. See [method`Gio`.ListModel.get_n_items].

New in version 4.8.