GimpRc

GimpRc

Synopsis

                    GimpRc;
GimpRc *            gimp_rc_new                         (const gchar *system_gimprc,
                                                         const gchar *user_gimprc,
                                                         gboolean verbose);
void                gimp_rc_set_autosave                (GimpRc *gimprc,
                                                         gboolean autosave);
void                gimp_rc_set_unknown_token           (GimpRc *rc,
                                                         const gchar *token,
                                                         const gchar *value);
void                gimp_rc_save                        (GimpRc *gimprc);
gchar *             gimp_rc_query                       (GimpRc *rc,
                                                         const gchar *key);
void                gimp_rc_migrate                     (GimpRc *rc);

Object Hierarchy

  GObject
   +----GimpBaseConfig
         +----GimpCoreConfig
               +----GimpDisplayConfig
                     +----GimpGuiConfig
                           +----GimpPluginConfig
                                 +----GimpRc

Implemented Interfaces

GimpRc implements GimpConfigInterface.

Properties

  "system-gimprc"            gchar*                : Read / Write / Construct
  "user-gimprc"              gchar*                : Read / Write / Construct
  "verbose"                  gboolean              : Read / Write / Construct

Description

Details

GimpRc

typedef struct _GimpRc GimpRc;


gimp_rc_new ()

GimpRc *            gimp_rc_new                         (const gchar *system_gimprc,
                                                         const gchar *user_gimprc,
                                                         gboolean verbose);

Creates a new GimpRc object and loads the system-wide and the user configuration files.

system_gimprc :

the name of the system-wide gimprc file or NULL to use the standard location

user_gimprc :

the name of the user gimprc file or NULL to use the standard location

verbose :

enable console messages about loading and saving

Returns :

the new GimpRc.

gimp_rc_set_autosave ()

void                gimp_rc_set_autosave                (GimpRc *gimprc,
                                                         gboolean autosave);


gimp_rc_set_unknown_token ()

void                gimp_rc_set_unknown_token           (GimpRc *rc,
                                                         const gchar *token,
                                                         const gchar *value);


gimp_rc_save ()

void                gimp_rc_save                        (GimpRc *gimprc);

Saves any settings that differ from the system-wide defined defaults to the users personal gimprc file.

gimprc :

a GimpRc object.

gimp_rc_query ()

gchar *             gimp_rc_query                       (GimpRc *rc,
                                                         const gchar *key);

This function looks up key in the object properties of rc. If there's a matching property, a string representation of its value is returned. If no property is found, the list of unknown tokens attached to the rc object is searched.

rc :

a GimpRc object.

key :

a string used as a key for the lookup.

Returns :

a newly allocated string representing the value or NULL if the key couldn't be found.

gimp_rc_migrate ()

void                gimp_rc_migrate                     (GimpRc *rc);

Resets all GimpParamConfigPath properties of the passed rc object to their default values, in order to prevent paths in a migrated gimprc to refer to folders in the old GIMP's user directory.

rc :

a GimpRc object.

Property Details

The "system-gimprc" property

  "system-gimprc"            gchar*                : Read / Write / Construct

Default value: NULL


The "user-gimprc" property

  "user-gimprc"              gchar*                : Read / Write / Construct

Default value: NULL


The "verbose" property

  "verbose"                  gboolean              : Read / Write / Construct

Default value: FALSE