rb-builder-helpers

rb-builder-helpers — helper functions for dealing with GtkBuilder files

Description

Some simple helper functions to make it a bit easier to deal with widgets built from GtkBuilder files.

Functions

rb_builder_load ()

GtkBuilder *
rb_builder_load (const char *file,
                 gpointer user_data);

Locates and reads a GtkBuilder file, automatically connecting signal handlers where possible.

The caller can specify an absolute path to the file, a resource path starting with /org/gnome/Rhythmbox/ or just a filename, in which case the file will be loaded from GResources (in normal builds) or the source data/ui directory (in uninstalled builds).

Parameters

file

filename, either absolute or relative to the data directory

 

user_data

user data to pass to autoconnected signal handlers

 

Returns

GtkBuilder object built from the file.

[transfer full]


rb_builder_load_plugin_file ()

GtkBuilder *
rb_builder_load_plugin_file (GObject *plugin,
                             const char *file,
                             gpointer user_data);

Like rb_builder_load, except it finds files associated with plugins as well as those in the core data directories.

Parameters

plugin

RBPlugin instance

 

file

name of file to load

 

user_data

user data to pass to autoconnected signal handlers

 

Returns

GtkBuilder object built from the file.

[transfer full]


rb_builder_boldify_label ()

void
rb_builder_boldify_label (GtkBuilder *builder,
                          const char *name);

Makes a label built from a GtkBuilder file bold.

Parameters

builder

a GtkBuilder instance

 

name

name of the label to boldify

 

rb_combo_box_hyphen_separator_func ()

gboolean
rb_combo_box_hyphen_separator_func (GtkTreeModel *model,
                                    GtkTreeIter *iter,
                                    gpointer data);

A row separator function to use for GtkComboBox widgets. It expects the model to contain a string in its first column, and interprets a string containing a single hyphen character as a separator.

Parameters

model

a GtkTreeModel

 

iter

a GtkTreeIter

 

data

nothing

 

Returns

TRUE if the row pointed to by iter is a separator

Types and Values