ClapperGtk.ExtraMenuButton¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
A signal that user wants to open subtitles file. |
Fields¶
- Inherited:
Class Details¶
- class ClapperGtk.ExtraMenuButton(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A menu button with extra options.
- classmethod new()¶
- Returns:
a new extra menu button
Gtk.Widget
.- Return type:
Creates a new
ClapperGtk.ExtraMenuButton
instance.
- get_can_open_subtitles()¶
-
Get whether an option to open external subtitle stream inside popover is visible.
- get_speed_visible()¶
-
Get whether speed control inside popover is visible.
- get_volume_visible()¶
-
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.
Signal Details¶
- ClapperGtk.ExtraMenuButton.signals.open_subtitles(extra_menu_button, item)¶
- Signal Name:
open-subtitles
- Flags:
- Parameters:
extra_menu_button (
ClapperGtk.ExtraMenuButton
) – The object which received the signalitem (
Clapper.MediaItem
) – aClapper.MediaItem
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:
- Default Value:
- Flags:
Visibility of open subtitles option inside popover.
- ClapperGtk.ExtraMenuButton.props.speed_visible¶
- Name:
speed-visible
- Type:
- Default Value:
- Flags:
Visibility of speed control inside popover.