RB.SongInfo¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Dialog (14), Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
Virtual Methods¶
- Inherited:
Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
|
|
|
Properties¶
- Inherited:
Gtk.Dialog (1), Gtk.Window (33), Gtk.Container (3), Gtk.Widget (39)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|
||
r/w/co |
|
||
r |
List of selected entries, if this is a multiple-entry dialog |
||
r/w/co |
|
Style Properties¶
- Inherited:
Signals¶
Name |
Short Description |
---|---|
Emitted just after changes have been applied to the database. |
|
Emitted just before the changes made in the song properties window are applied to the database. |
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.SongInfo(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Displays song properties and, if we know how to edit tags in the file, allows the user to edit them.
This class has two modes. It can display and edit properties of a single entry, in which case it uses a
Gtk.Notebook
to split the properties across ‘basic’ and ‘details’ pages, and it can display and edit properties of multiple entries at a time, in which case a smaller set of properties is displayed in a single set.In single-entry mode, it is possible to add extra pages to the
Gtk.Notebook
widget in the dialog. The ‘create-song-info’ signal is emitted by theRB.Shell
object, allowing signal handlers to add pages by callingRB.SongInfo.append_page
. The lyrics plugin is currently the only place where this ability is used. In this mode, the dialog features ‘back’ and ‘forward’ buttons that move to the next or previous entries from the currently displayed track list.In multiple-entry mode, only the set of properties that can usefully be set across multiple entries at once are displayed.
When the dialog is closed, any changes made will be applied to the entry (or entries) that were displayed in the dialog. For songs in the library, this will result in the song tags being updated on disk. For other entry types, this only updates the data store in the database.
- classmethod new(source, entry_view)¶
- Parameters:
source (
RB.Source
) –RB.Source
creating the song properties windowentry_view (
RB.EntryView
) – theRB.EntryView
to get selection data from
- Returns:
the new song properties window
- Return type:
Creates a new
RB.SongInfo
for the selected entry or entries in the specified entry view.
- append_page(title, page)¶
- Parameters:
title (
str
) – the title of the new pagepage (
Gtk.Widget
) – the pageGtk.Widget
- Returns:
the page number
- Return type:
Adds a new page to the song properties window. Should be called in a handler connected to the
RB.Shell
‘create-song-info’ signal.
- do_post_metadata_change(entry) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –
- do_pre_metadata_change(entry) virtual¶
- Parameters:
entry (
RB.RhythmDBEntry
) –
Signal Details¶
- RB.SongInfo.signals.post_metadata_change(song_info, entry)¶
- Signal Name:
post-metadata-change
- Flags:
- Parameters:
song_info (
RB.SongInfo
) – The object which received the signalentry (
RB.RhythmDBEntry
) – theRB.RhythmDBEntry
that was changed
Emitted just after changes have been applied to the database. Probably useless.
- RB.SongInfo.signals.pre_metadata_change(song_info, entry)¶
- Signal Name:
pre-metadata-change
- Flags:
- Parameters:
song_info (
RB.SongInfo
) – The object which received the signalentry (
RB.RhythmDBEntry
) – theRB.RhythmDBEntry
being changed
Emitted just before the changes made in the song properties window are applied to the database. This is only emitted in the single-entry case.
Property Details¶
- RB.SongInfo.props.current_entry¶
- Name:
current-entry
- Type:
- Default Value:
- Flags:
The
RB.RhythmDBEntry
that is currently being displayed. Will beNone
for multiple-entry song properties windows.
- RB.SongInfo.props.entry_view¶
- Name:
entry-view
- Type:
- Default Value:
- Flags:
The
RB.EntryView
for the source that created the song properties window. Used find the set of selected entries, and to change the selection when the ‘back’ and ‘forward’ buttons are pressed.
- RB.SongInfo.props.selected_entries¶
- Name:
selected-entries
- Type:
- Default Value:
- Flags:
The set of
RB.RhythmDBEntry
objects currently being displayed. Valid for both single-entry and multiple-entry song properties windows.