Panel.Session

g GObject.Object GObject.Object Panel.Session Panel.Session GObject.Object->Panel.Session

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_from_variant (variant)

append (item)

get_item (position)

get_n_items ()

insert (position, item)

lookup_by_id (id)

prepend (item)

remove (item)

remove_at (position)

to_variant ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Panel.Session(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Panel.SessionClass

classmethod new()
Return type:

Panel.Session

classmethod new_from_variant(variant)
Parameters:

variant (GLib.Variant) – a GLib.Variant from Panel.Session.to_variant()

Raises:

GLib.Error

Returns:

a Panel.Session

Return type:

Panel.Session

Creates a new Panel.Session from a GLib.Variant.

This creates a new Panel.Session instance from a previous session which had been serialized to variant.

New in version 1.4.

append(item)
Parameters:

item (Panel.SessionItem) –

get_item(position)
Parameters:

position (int) – the index of the item

Returns:

The Panel.SessionItem at position or None if there is no item at that position.

Return type:

Panel.SessionItem or None

Gets the item at position.

New in version 1.4.

get_n_items()
Return type:

int

insert(position, item)
Parameters:
lookup_by_id(id)
Parameters:

id (str) – the id of the item

Returns:

an Panel.SessionItem or None

Return type:

Panel.SessionItem or None

Gets a session item matching id.

New in version 1.4.

prepend(item)
Parameters:

item (Panel.SessionItem) –

remove(item)
Parameters:

item (Panel.SessionItem) –

remove_at(position)
Parameters:

position (int) –

to_variant()
Returns:

a GLib.Variant

Return type:

GLib.Variant

Serializes a Panel.Session as a GLib.Variant

The result of this function may be passed to Panel.Session.new_from_variant() to recreate a Panel.Session.

The resulting variant will not be floating.