ClapperGtk.ExtraMenuButton

g ClapperGtk.ExtraMenuButton ClapperGtk.ExtraMenuButton GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Widget->ClapperGtk.ExtraMenuButton

Subclasses:

None

Methods

Inherited:

Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

get_can_open_subtitles ()

get_speed_visible ()

get_volume_visible ()

set_can_open_subtitles (allowed)

set_speed_visible (visible)

set_volume_visible (visible)

Virtual Methods

Inherited:

Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

Properties

Inherited:

Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

can-open-subtitles

bool

r/w/en

speed-visible

bool

r/w/en

volume-visible

bool

r/w/en

Signals

Inherited:

Gtk.Widget (13), GObject.Object (1)

Name

Short Description

open-subtitles

A signal that user wants to open subtitles file.

Fields

Inherited:

Gtk.Widget (13), GObject.Object (1)

Class Details

class ClapperGtk.ExtraMenuButton(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

Structure:

ClapperGtk.ExtraMenuButtonClass

A menu button with extra options.

classmethod new()
Returns:

a new extra menu button Gtk.Widget.

Return type:

Gtk.Widget

Creates a new ClapperGtk.ExtraMenuButton instance.

get_can_open_subtitles()
Returns:

True if open subtitles is visible, False otherwise.

Return type:

bool

Get whether an option to open external subtitle stream inside popover is visible.

get_speed_visible()
Returns:

True if speed control is visible, False otherwise.

Return type:

bool

Get whether speed control inside popover is visible.

get_volume_visible()
Returns:

True if volume control is visible, False otherwise.

Return type:

bool

Get whether volume control inside popover is visible.

set_can_open_subtitles(allowed)
Parameters:

allowed (bool) – whether opening subtitles should be allowed

Set whether an option to open external subtitle stream should be allowed.

Note that this [class`Gtk`.Widget] can only add subtitles to currently playing [class`Clapper`.MediaItem]. When no media is selected, option to open subtitles will not be shown regardless how this option is set.

set_speed_visible(visible)
Parameters:

visible (bool) – whether visible

Set whether speed control inside popover should be visible.

set_volume_visible(visible)
Parameters:

visible (bool) – whether visible

Set whether volume control inside popover should be visible.

Signal Details

ClapperGtk.ExtraMenuButton.signals.open_subtitles(extra_menu_button, item)
Signal Name:

open-subtitles

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

A signal that user wants to open subtitles file.

Implementation should add a way for user to select subtitles to open such as by e.g. using [class`Gtk`.FileDialog] and then add them to the item using [method`Clapper`.MediaItem.set_suburi] method.

This signal will pass the [class`Clapper`.MediaItem] that was current when user clicked the open button and subtitles should be added to this item. This avoids situations where another item starts playing before user selects subtitles file to be opened. When using asynchronous operations to open file, implementation should [method`GObject`.Object.ref] the item to ensure that it stays valid until finish.

Note that this signal will not be emitted if open button is not visible by setting [method`ClapperGtk`.ExtraMenuButton.set_can_open_subtitles] to True, so you do not have to implement handler for it otherwise.

Property Details

ClapperGtk.ExtraMenuButton.props.can_open_subtitles
Name:

can-open-subtitles

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Visibility of open subtitles option inside popover.

ClapperGtk.ExtraMenuButton.props.speed_visible
Name:

speed-visible

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Visibility of speed control inside popover.

ClapperGtk.ExtraMenuButton.props.volume_visible
Name:

volume-visible

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Visibility of volume control inside popover.