RBShellPreferences

RBShellPreferences — preferences dialog

Synopsis

enum                RBShellPrefsUILocation;
struct              RBShellPreferences;
struct              RBShellPreferencesClass;
GtkWidget *         rb_shell_preferences_new            (GList *views);
void                rb_shell_preferences_append_page    (RBShellPreferences *prefs,
                                                         const char *name,
                                                         GtkWidget *widget);
void                rb_shell_preferences_add_widget     (RBShellPreferences *prefs,
                                                         GtkWidget *widget,
                                                         RBShellPrefsUILocation location,
                                                         gboolean expand,
                                                         gboolean fill);
void                rb_shell_preferences_remove_widget  (RBShellPreferences *prefs,
                                                         GtkWidget *widget,
                                                         RBShellPrefsUILocation location);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkWindow
                                 +----GtkDialog
                                       +----RBShellPreferences

Implemented Interfaces

RBShellPreferences implements AtkImplementorIface and GtkBuildable.

Description

The preferences dialog is built around a GtkNotebook widget, with two built-in pages and additional pages for various sources.

The 'general' preferences page controls the set of browser views that are visible (artist and album; genre and artist; or genre, artist, and album), the columns that are visible, and the appearance of buttons in the main toolbar. The browser and column settings apply to all sources.

The 'playback' preferences page controls whether the crossfading player backend is used, and if enabled, the crossfade duration and network buffer size.

Currently, the library and podcast sources add pages to the notebook, for configuring the location and layout of the library and the podcast download location and update frequency.

Details

enum RBShellPrefsUILocation

typedef enum {
	RB_SHELL_PREFS_UI_LOCATION_GENERAL,
	RB_SHELL_PREFS_UI_LOCATION_PLAYBACK
} RBShellPrefsUILocation;

Locations available for adding new widgets to the preferences dialog.

RB_SHELL_PREFS_UI_LOCATION_GENERAL

The "general" preferences page

RB_SHELL_PREFS_UI_LOCATION_PLAYBACK

THe "playback" preferences page

struct RBShellPreferences

struct RBShellPreferences;


struct RBShellPreferencesClass

struct RBShellPreferencesClass {
	GtkDialogClass parent_class;
};


rb_shell_preferences_new ()

GtkWidget *         rb_shell_preferences_new            (GList *views);

Creates the RBShellPreferences instance, populating it with the preferences pages for the sources in the list.

views :

list of sources to check for preferences pages. [element-type RB.Source][transfer none]

Returns :

the RBShellPreferences instance

rb_shell_preferences_append_page ()

void                rb_shell_preferences_append_page    (RBShellPreferences *prefs,
                                                         const char *name,
                                                         GtkWidget *widget);

Appends a new page to the preferences dialog notebook.

prefs :

the RBShellPreferences instance

name :

name of the page to append

widget :

the GtkWidget to use as the contents of the page

rb_shell_preferences_add_widget ()

void                rb_shell_preferences_add_widget     (RBShellPreferences *prefs,
                                                         GtkWidget *widget,
                                                         RBShellPrefsUILocation location,
                                                         gboolean expand,
                                                         gboolean fill);

Adds a widget to the preferences window. See gtk_box_pack_start for details on how the expand and fill parameters work. This function can be used to add widgets to the 'general' and 'playback' pages.

prefs :

the RBShellPreferences

widget :

the GtkWidget to insert into the preferences window

location :

the location at which to insert the widget

expand :

whether the widget should be given extra space

fill :

whether the widget should fill all space allocated to it

rb_shell_preferences_remove_widget ()

void                rb_shell_preferences_remove_widget  (RBShellPreferences *prefs,
                                                         GtkWidget *widget,
                                                         RBShellPrefsUILocation location);

Removes a widget added with rb_shell_preferences_add_widget from the preferences window.

prefs :

the RBShellPreferences

widget :

the GtkWidget to remove from the preferences window

location :

the UI location to which the widget was originally added