Unlike the reference chapter this one is manually written and can be outdated but I'll do my best to avoid this. I'll also try to provide examples and purpose informations for most entries.
Gaby provides a simple way to ensure that every message (being an informal message, an emergency error or a critical error) get a correct and coherent handling.
This is done using two global variable :
gaby_errno (int) holds a number that gives the type of message. They are defined in gabyerror.h.
Today it looks like :
#define NO_ERROR 0 #define CUSTOM_MESSAGE 1 #define CUSTOM_WARNING 2 #define CUSTOM_ERROR 3 #define ONLY_IN_GNOME 4 #define FILE_READ_ERROR 5 #define FILE_WRITE_ERROR 6 #define TEMPFILE_ERROR 7 #define LOAD_PLUGIN_ERROR 8 #define UNKNOWN_ERROR 999
gaby_message (char*) holds a string that has a different behaviour regarding the value of gaby_errno
FIXME: this table is broken.
|CUSTOM_MESSAGE||string to show||A string in an "Information Box"|
|CUSTOM_WARNING||string to show||A string in a "Warning Box"|
|CUSTOM_ERROR||string to show||A string in an "Error Box"|
|ONLY_IN_GNOME||NULL||A message to warn about a feature only available if it was compiled with Gnome support|
|FILE_READ_ERROR||name of the file||A message telling that an error occured when reading a file|
|FILE_WRITE_ERROR||name of the file||A message telling that an error occured when writing a file|
The message is then issued when you call gaby_perror_in_a_box().