Utilities

Utilities — Various utility routines

Synopsis

GtkWidget *         goa_util_add_heading                (GtkTable *table,
                                                         const gchar *heading_text);
GtkWidget *         goa_util_add_row_check_button_from_keyfile
                                                        (GtkTable *table,
                                                         GoaObject *object,
                                                         const gchar *label_text,
                                                         const gchar *key,
                                                         const gchar *value_mnemonic);
GtkWidget *         goa_util_add_row_editable_label_from_keyfile
                                                        (GtkTable *table,
                                                         GoaObject *object,
                                                         const gchar *label_text,
                                                         const gchar *key,
                                                         gboolean editable);
GtkWidget *         goa_util_add_row_label              (GtkTable *table,
                                                         const gchar *label_text,
                                                         const gchar *value_markup);
GtkWidget *         goa_util_add_row_switch_from_keyfile
                                                        (GtkTable *table,
                                                         GoaObject *object,
                                                         const gchar *label_text,
                                                         const gchar *key);
GtkWidget *         goa_util_add_row_widget             (GtkTable *table,
                                                         const gchar *label_text,
                                                         GtkWidget *widget);
gboolean            goa_util_lookup_keyfile_boolean     (GoaObject *object,
                                                         const gchar *key);
gchar *             goa_util_lookup_keyfile_string      (GoaObject *object,
                                                         const gchar *key);

Description

Various utility routines.

Details

goa_util_add_heading ()

GtkWidget *         goa_util_add_heading                (GtkTable *table,
                                                         const gchar *heading_text);

Utility function to add a heading to table.

table :

A GtkTable.

heading_text :

The text for the heading.

Returns :

The GtkWidget that was inserted. [transfer none]

goa_util_add_row_check_button_from_keyfile ()

GtkWidget *         goa_util_add_row_check_button_from_keyfile
                                                        (GtkTable *table,
                                                         GoaObject *object,
                                                         const gchar *label_text,
                                                         const gchar *key,
                                                         const gchar *value_mnemonic);

Adds a GtkCheckButton to table that reads its value from the key-value file for object using key. If it's toggled, the new value is written back to the key-value file.

table :

A GtkTable.

object :

A GoaObject for an account.

label_text :

The text to insert on the left side or NULL for no label. [allow-none]

key :

The key in the key-value file for object to look up.

value_mnemonic :

The mnemonic text to use for the check button.

Returns :

The GtkCheckButton that was inserted. [transfer none]

goa_util_add_row_editable_label_from_keyfile ()

GtkWidget *         goa_util_add_row_editable_label_from_keyfile
                                                        (GtkTable *table,
                                                         GoaObject *object,
                                                         const gchar *label_text,
                                                         const gchar *key,
                                                         gboolean editable);

Adds a GoaEditableLabel to table that reads its value from the key-value file for object using key. If it's edited, the new value is written back to the key-value file.

table :

A GtkTable.

object :

A GoaObject for an account.

label_text :

The text to insert on the left side or NULL for no label. [allow-none]

key :

The key in the key-value file for object to look up.

editable :

Whether the widget should be editable

Returns :

The GoaEditableLabel that was inserted. [transfer none]

goa_util_add_row_label ()

GtkWidget *         goa_util_add_row_label              (GtkTable *table,
                                                         const gchar *label_text,
                                                         const gchar *value_markup);

Utility function to add label_text and value_text to table.

table :

A GtkTable.

label_text :

The text to insert on the left side or NULL for no label. [allow-none]

value_markup :

The markup to insert on the right side.

Returns :

The GtkLabel that was inserted. [transfer none]

goa_util_add_row_switch_from_keyfile ()

GtkWidget *         goa_util_add_row_switch_from_keyfile
                                                        (GtkTable *table,
                                                         GoaObject *object,
                                                         const gchar *label_text,
                                                         const gchar *key);

Adds a GtkSwitch to table that reads its "active" value from the key-value file for object using key. If it's switched, the new value is written back to the key-value file.

table :

A GtkTable.

object :

A GoaObject for an account.

label_text :

The text to insert on the left side or NULL for no label. [allow-none]

key :

The key in the key-value file for object to look up.

Returns :

The GtkSwitch that was inserted. [transfer none]

goa_util_add_row_widget ()

GtkWidget *         goa_util_add_row_widget             (GtkTable *table,
                                                         const gchar *label_text,
                                                         GtkWidget *widget);

Utility function to add label_text and widget to table.

table :

A GtkTable.

label_text :

The text to insert on the left side or NULL for no label. [allow-none]

widget :

A widget to insert on the right side.

Returns :

The GtkWidget that was inserted (e.g. widget itself). [transfer none]

goa_util_lookup_keyfile_boolean ()

gboolean            goa_util_lookup_keyfile_boolean     (GoaObject *object,
                                                         const gchar *key);


goa_util_lookup_keyfile_string ()

gchar *             goa_util_lookup_keyfile_string      (GoaObject *object,
                                                         const gchar *key);