RB.SongInfo

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.Window Gtk.Window Gtk.Bin->Gtk.Window Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Dialog Gtk.Dialog RB.SongInfo RB.SongInfo Gtk.Dialog->RB.SongInfo Gtk.Widget->Gtk.Container Gtk.Window->Gtk.Dialog

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

new (source, entry_view)

append_page (title, page)

Virtual Methods

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

do_post_metadata_change (entry)

do_pre_metadata_change (entry)

Properties

Inherited:

Gtk.Dialog (1), Gtk.Window (33), Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

current-entry

RB.RhythmDBEntry

r

RB.RhythmDBEntry object

entry-view

RB.EntryView

r/w/co

RB.EntryView object

selected-entries

GLib.Array

r

List of selected entries, if this is a multiple-entry dialog

source

RB.Source

r/w/co

RB.Source object

Style Properties

Inherited:

Gtk.Dialog (4), Gtk.Window (2), Gtk.Widget (17)

Signals

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

post-metadata-change

Emitted just after changes have been applied to the database.

pre-metadata-change

Emitted just before the changes made in the song properties window are applied to the database.

Fields

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent

Gtk.Dialog

r

Class Details

class RB.SongInfo(*args, **kwargs)
Bases:

Gtk.Dialog

Abstract:

No

Structure:

RB.SongInfoClass

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 the RB.Shell object, allowing signal handlers to add pages by calling RB.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:
Returns:

the new song properties window

Return type:

Gtk.Widget

Creates a new RB.SongInfo for the selected entry or entries in the specified entry view.

append_page(title, page)
Parameters:
Returns:

the page number

Return type:

int

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:

RUN_LAST

Parameters:

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:

RUN_LAST

Parameters:

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:

RB.RhythmDBEntry

Default Value:

None

Flags:

READABLE

The RB.RhythmDBEntry that is currently being displayed. Will be None for multiple-entry song properties windows.

RB.SongInfo.props.entry_view
Name:

entry-view

Type:

RB.EntryView

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

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:

GLib.Array

Default Value:

None

Flags:

READABLE

The set of RB.RhythmDBEntry objects currently being displayed. Valid for both single-entry and multiple-entry song properties windows.

RB.SongInfo.props.source
Name:

source

Type:

RB.Source

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The RB.Source that created the song properties window. Used to update for track list changes, and to find the sets of albums, artist, and genres to use for tag edit completion.