## RBSongInfo RBSongInfo — song properties dialog |

## Functions

GtkWidget * | rb_song_info_new ()
guint | rb_song_info_append_page ()

## Properties

RhythmDBEntry * | current-entry | Read
RBEntryView * | entry-view | Read / Write / Construct Only
GArray * | selected-entries | Read
RBSource * | source | Read / Write / Construct Only

## Signals

void | post-metadata-change | Run Last
void | pre-metadata-change | Run Last

## Types and Values

struct | RBSongInfo
struct | RBSongInfoClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── GtkDialog
                                ╰── RBSongInfo

## Implemented Interfaces

RBSongInfo implements AtkImplementorIface and GtkBuildable.

## Description

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 GtkNotebook 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 GtkNotebook widget in the dialog. The 'create-song-info' signal is emitted by the RBShell object, allowing signal handlers to add pages by calling rb_song_info_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.

## Functions

### rb_song_info_new ()

    GtkWidget *
    rb_song_info_new (RBSource *source,
                      RBEntryView *entry_view);

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

#### Parameters

source | RBSource creating the song properties window |
entry_view | the RBEntryView to get selection data from |

#### Returns

the new song properties window

### rb_song_info_append_page ()

    guint
    rb_song_info_append_page (RBSongInfo *info,
                              const char *title,
                              GtkWidget *page);

Adds a new page to the song properties window. Should be called in a handler connected to the RBShell 'create-song-info' signal.

#### Parameters

info | a RBSongInfo |
title | the title of the new page |
page | the page GtkWidget |

#### Returns

the page number

## Types and Values

### struct RBSongInfo

    struct RBSongInfo;

### struct RBSongInfoClass

    struct RBSongInfoClass {
    	GtkDialogClass parent_class;

    	void (*pre_metadata_change) (RBSongInfo *info, RhythmDBEntry *entry);
    	void (*post_metadata_change) (RBSongInfo *info, RhythmDBEntry *entry);
    };

## Property Details

### The `“current-entry”` property

      “current-entry”            RhythmDBEntry *

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

Flags: Read

### The `“entry-view”` property

      “entry-view”               RBEntryView *

The RBEntryView 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.

Flags: Read / Write / Construct Only

### The `“selected-entries”` property

      “selected-entries”         GArray *

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

Flags: Read

### The `“source”` property

      “source”                   RBSource *

The RBSource 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.

Flags: Read / Write / Construct Only

## Signal Details

### The `“post-metadata-change”` signal

    void
    user_function (RBSongInfo    *song_info,
                   RhythmDBEntry *entry,
                   gpointer       user_data)

Emitted just after changes have been applied to the database. Probably useless.

#### Parameters

song_info | the RBSongInfo instance |
entry | the RhythmDBEntry that was changed |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“pre-metadata-change”` signal

    void
    user_function (RBSongInfo    *song_info,
                   RhythmDBEntry *entry,
                   gpointer       user_data)

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.

#### Parameters

song_info | the RBSongInfo instance |
entry | the RhythmDBEntry being changed |
user_data | user data set when the signal handler was connected. |

Flags: Run Last