![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
RBSourceList; RBSourceListClass; GtkWidget* rb_sourcelist_new (RBShell *shell); void rb_sourcelist_append (RBSourceList *sourcelist, RBSource *source, RBSource *parent); void rb_sourcelist_set_playing_source (RBSourceList *sourcelist, RBSource *source); void rb_sourcelist_edit_source_name (RBSourceList *sourcelist, RBSource *source); void rb_sourcelist_remove (RBSourceList *sourcelist, RBSource *source); void rb_sourcelist_select (RBSourceList *sourcelist, RBSource *source);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkScrolledWindow +----RBSourceList
"drop-received" : Run Last "selected" : Run Last "show-popup" : Run Last "source-activated" : Run Last
The source list widget is a GtkTreeView backed by a GtkListStore containing the sources and some extra data used to structure the tree view.
The source list widget displays the available sources. Sources are divided into groups - library, stores, playlists, devices, network shares. Groups are displayed as headers, with expanders for hiding and showing the sources in the group. Sources themselves may also have child sources, such as playlists on portable audio players.
Sources are displayed with an icon and a name. If the source is currently playing, the name is displayed in bold.
typedef struct { GtkScrolledWindowClass parent_class; /* signals */ void (*selected) (RBSourceList *list, RBSource *source); void (*drop_received) (RBSourceList *list, RBSource *target, GtkSelectionData *data); void (*source_activated) (RBSourceList *list, RBSource *target); gboolean (*show_popup) (RBSourceList *list, RBSource *target); } RBSourceListClass;
GtkWidget* rb_sourcelist_new (RBShell *shell);
|
the RBShell instance |
Returns : |
the source list widget. |
void rb_sourcelist_append (RBSourceList *sourcelist, RBSource *source, RBSource *parent);
Adds a new source to the source list. If parent
is not NULL, the new
source is added beneath it. Otherwise, it is added to the end of the
source group specified by the source's source-group property.
|
the RBSourceList |
|
the RBSource to add |
|
the RBSource below which to add the new source, or NULL |
void rb_sourcelist_set_playing_source (RBSourceList *sourcelist, RBSource *source);
Updates the source list with the new playing source. The source list tracks which source is playing in order to display the name of the playing source in bold type.
|
the RBSourceList |
|
the new playing RBSource |
void rb_sourcelist_edit_source_name (RBSourceList *sourcelist, RBSource *source);
Initiates editing of the name of the specified source. The row for the source is selected and given input focus, allowing the user to edit the name. source_name_edited_cb is called when the user finishes editing.
|
the RBSourceList |
|
the RBSource to edit |
void rb_sourcelist_remove (RBSourceList *sourcelist, RBSource *source);
Removes a source from the source list. Disconnects signal handlers, removes the source from the underlying model, and updates the visibility of the group containing the source.
|
the RBSourceList |
|
the RBSource being removed |
void rb_sourcelist_select (RBSourceList *sourcelist, RBSource *source);
Selects the specified source in the source list. This will result in the 'selected' signal being emitted.
|
the RBSourceList |
|
the RBSource to select |
"drop-received"
signalvoid user_function (RBSourceList *list, gpointer target, gpointer data, gpointer user_data) : Run Last
Emitted when a drag and drop to the source list completes.
|
the RBSourceList |
|
the RBSource receiving the drop |
|
the drop data |
|
user data set when the signal handler was connected. |
"selected"
signalvoid user_function (RBSourceList *list, GObject *source, gpointer user_data) : Run Last
Emitted when a source is selected from the source list
|
the RBSourceList |
|
the newly selected RBSource |
|
user data set when the signal handler was connected. |
"show-popup"
signalgboolean user_function (RBSourceList *list, RBSource *target, gpointer user_data) : Run Last
Emitted when a source should display a popup menu in response to some user action, such as right clicking or pressing shift-f10.
|
the RBSourceList |
|
the RBSource for which a popup menu should be shown |
|
user data set when the signal handler was connected. |
"source-activated"
signalvoid user_function (RBSourceList *list, GObject *target, gpointer user_data) : Run Last
Emitted when a source is activated (by double clicking or hitting the enter key)
|
the RBSourceList |
|
the activated RBSource |
|
user data set when the signal handler was connected. |