diff options
author | Mike Kestner <mkestner@src.gnome.org> | 2002-11-01 05:30:57 +0800 |
---|---|---|
committer | Mike Kestner <mkestner@src.gnome.org> | 2002-11-01 05:30:57 +0800 |
commit | 613453b1095e325149b8d37e5731d415e1d5f9bd (patch) | |
tree | 1c0d7f9be4d4a87aa67d8e185ae2bb23d02254b7 /e-util/e-util.c | |
parent | ec242d6c30d7bf056c8f59710b8576c942f93583 (diff) | |
download | gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.gz gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.zst gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.zip |
merging the gal-2 branch back to the trunk.
merging the gal-2 branch back to the trunk.
svn path=/trunk/; revision=18471
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r-- | e-util/e-util.c | 566 |
1 files changed, 19 insertions, 547 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index 87a320597b..135386f1cf 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -23,8 +23,8 @@ #include <config.h> #include "e-util.h" +#include "e-i18n.h" -#include <gal/widgets/e-unicode.h> #include <glib.h> #include <gtk/gtkobject.h> #include <errno.h> @@ -37,7 +37,6 @@ #include <stdio.h> #include <stdlib.h> #include <time.h> -#include <libgnome/gnome-defs.h> #include <libgnome/gnome-util.h> #include <math.h> @@ -323,552 +322,10 @@ e_read_uri(const char *uri) } #endif -typedef gint (*GtkSignal_INT__INT_INT_POINTER) (GtkObject * object, - gint arg1, - gint arg2, - gpointer arg3, - gpointer user_data); +/* Include build marshalers */ -void -e_marshal_INT__INT_INT_POINTER (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_INT__INT_INT_POINTER rfunc; - gint *return_val; - return_val = GTK_RETLOC_INT (args[3]); - rfunc = (GtkSignal_INT__INT_INT_POINTER) func; - *return_val = (*rfunc) (object, - GTK_VALUE_INT (args[0]), - GTK_VALUE_INT (args[1]), - GTK_VALUE_POINTER (args[2]), - func_data); -} - -typedef gint (*GtkSignal_INT__INT_POINTER_INT_POINTER) (GtkObject * object, - gint arg1, - gpointer arg2, - gint arg3, - gpointer arg4, - gpointer user_data); - -void -e_marshal_INT__INT_POINTER_INT_POINTER (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_INT__INT_POINTER_INT_POINTER rfunc; - gint *return_val; - return_val = GTK_RETLOC_INT (args[4]); - rfunc = (GtkSignal_INT__INT_POINTER_INT_POINTER) func; - *return_val = (*rfunc) (object, - GTK_VALUE_INT (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_INT (args[2]), - GTK_VALUE_POINTER (args[3]), - func_data); -} - -typedef void (*GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object, - GtkObject *arg1, - gdouble arg2, - gdouble arg3, - gboolean arg4, - gpointer user_data); - -void -e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL rfunc; - rfunc = (GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL) func; - (*rfunc) (object, - GTK_VALUE_OBJECT (args[0]), - GTK_VALUE_DOUBLE (args[1]), - GTK_VALUE_DOUBLE (args[2]), - GTK_VALUE_BOOL (args[3]), - func_data); -} - -typedef gdouble (*GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object, - GtkObject *arg1, - gdouble arg2, - gdouble arg3, - gboolean arg4, - gpointer user_data); - -void -e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL rfunc; - gdouble *return_val; - return_val = GTK_RETLOC_DOUBLE (args[4]); - rfunc = (GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL) func; - *return_val = (*rfunc) (object, - GTK_VALUE_OBJECT (args[0]), - GTK_VALUE_DOUBLE (args[1]), - GTK_VALUE_DOUBLE (args[2]), - GTK_VALUE_BOOL (args[3]), - func_data); -} - -typedef gdouble (*GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object, - GtkObject *arg1, - gdouble arg2, - gdouble arg3, - gboolean arg4, - gpointer user_data); - -void -e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL rfunc; - gboolean *return_val; - return_val = GTK_RETLOC_BOOL (args[4]); - rfunc = (GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL) func; - *return_val = (*rfunc) (object, - GTK_VALUE_OBJECT (args[0]), - GTK_VALUE_DOUBLE (args[1]), - GTK_VALUE_DOUBLE (args[2]), - GTK_VALUE_BOOL (args[3]), - func_data); -} - -typedef void (*GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT) (GtkObject * object, - gint arg1, - gint arg2, - gpointer arg3, - gpointer arg4, - gint arg5, - gint arg6, - gpointer user_data); -void -e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT rfunc; - rfunc = (GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]), - GTK_VALUE_POINTER (args[2]), - GTK_VALUE_POINTER (args[3]), - GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]), func_data); -} - -typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT) (GtkObject * object, - gint arg1, - gpointer arg2, - gint arg3, - gpointer arg4, - gpointer arg5, - gint arg6, - gint arg7, - gpointer user_data); -void -e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT rfunc; - rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2]), - GTK_VALUE_POINTER (args[3]), - GTK_VALUE_POINTER (args[4]), - GTK_VALUE_INT (args[5]), GTK_VALUE_INT (args[6]), func_data); -} - -typedef void (*GtkSignal_NONE__INT_INT_POINTER_INT) (GtkObject * object, - gint arg1, - gint arg2, - gpointer arg3, - gint arg4, gpointer user_data); -void -e_marshal_NONE__INT_INT_POINTER_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_NONE__INT_INT_POINTER_INT rfunc; - rfunc = (GtkSignal_NONE__INT_INT_POINTER_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]), - GTK_VALUE_POINTER (args[2]), GTK_VALUE_INT (args[3]), func_data); -} - -typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_INT) (GtkObject * object, - gint arg1, - gpointer arg2, - gint arg3, - gpointer arg4, - gint arg5, gpointer user_data); -void -e_marshal_NONE__INT_POINTER_INT_POINTER_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_NONE__INT_POINTER_INT_POINTER_INT rfunc; - rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2]), - GTK_VALUE_POINTER (args[3]), GTK_VALUE_INT (args[4]), func_data); -} - -typedef gboolean (*GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT) (GtkObject * object, - gint arg1, - gint arg2, - gpointer arg3, - gint arg4, - gint arg5, - gint arg6, - gpointer user_data); -void -e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT rfunc; - gboolean *return_val; - return_val = GTK_RETLOC_BOOL (args[6]); - rfunc = (GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT) func; - *return_val = (*rfunc) (object, - GTK_VALUE_INT (args[0]), - GTK_VALUE_INT (args[1]), - GTK_VALUE_POINTER (args[2]), - GTK_VALUE_INT (args[3]), - GTK_VALUE_INT (args[4]), - GTK_VALUE_INT (args[5]), func_data); -} - -typedef gboolean (*GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT) (GtkObject * object, - gint arg1, - gpointer arg2, - gint arg3, - gpointer arg4, - gint arg5, - gint arg6, - gint arg7, - gpointer user_data); -void -e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT rfunc; - gboolean *return_val; - return_val = GTK_RETLOC_BOOL (args[7]); - rfunc = (GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT) func; - *return_val = (*rfunc) (object, - GTK_VALUE_INT (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_INT (args[2]), - GTK_VALUE_POINTER (args[3]), - GTK_VALUE_INT (args[4]), - GTK_VALUE_INT (args[5]), - GTK_VALUE_INT (args[6]), func_data); -} - -typedef void (*GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT) (GtkObject * - object, - gint arg1, - gint arg2, - gpointer - arg3, - gint arg4, - gint arg5, - gpointer - arg6, - gint arg7, - gint arg8, - gpointer - user_data); - -void -e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, - GtkArg * args) -{ - GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT rfunc; - rfunc = (GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]), - GTK_VALUE_POINTER (args[2]), - GTK_VALUE_INT (args[3]), - GTK_VALUE_INT (args[4]), - GTK_VALUE_POINTER (args[5]), - GTK_VALUE_INT (args[6]), GTK_VALUE_INT (args[7]), func_data); -} - -typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT) (GtkObject * - object, - gint arg1, - gpointer arg2, - gint arg3, - gpointer arg4, - gint arg5, - gint arg6, - gpointer arg7, - gint arg8, - gint arg9, - gpointer user_data); - -void -e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject * object, - GtkSignalFunc func, - gpointer func_data, - GtkArg * args) -{ - GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT rfunc; - rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_INT (args[2]), - GTK_VALUE_POINTER (args[3]), - GTK_VALUE_INT (args[4]), - GTK_VALUE_INT (args[5]), - GTK_VALUE_POINTER (args[6]), - GTK_VALUE_INT (args[7]), GTK_VALUE_INT (args[8]), func_data); -} - -typedef void (*GtkSignal_NONE__POINTER_POINTER_INT) (GtkObject *, gpointer, - gpointer, gint, gpointer); - -void -e_marshal_NONE__POINTER_POINTER_INT (GtkObject * object, GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_NONE__POINTER_POINTER_INT rfunc; - rfunc = (GtkSignal_NONE__POINTER_POINTER_INT) func; - (*rfunc) (object, GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), - GTK_VALUE_INT (args[2]), func_data); -} - -typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER) (GtkObject *, gint, gpointer, - gint, gpointer, gpointer); - -void -e_marshal_NONE__INT_POINTER_INT_POINTER (GtkObject * object, GtkSignalFunc func, - gpointer func_data, GtkArg * args) -{ - GtkSignal_NONE__INT_POINTER_INT_POINTER rfunc; - rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER) func; - (*rfunc) (object, GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]), - GTK_VALUE_INT (args[2]), GTK_VALUE_POINTER (args[3]), func_data); -} - -typedef void (*GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER) (GtkObject *, - gpointer, gpointer, gpointer, gpointer, - gpointer); - -void -e_marshal_NONE__POINTER_POINTER_POINTER_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER rfunc; - rfunc = (GtkSignal_NONE__POINTER_POINTER_POINTER_POINTER) func; - (*rfunc) (object, GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), - GTK_VALUE_POINTER (args[2]), GTK_VALUE_POINTER (args[3]), func_data); -} - -typedef int (*GtkSignal_INT__POINTER_POINTER) (GtkObject *, - gpointer, gpointer, - gpointer user_data); -void -e_marshal_INT__POINTER_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_INT__POINTER_POINTER rfunc; - int *return_val; - - rfunc = (GtkSignal_INT__POINTER_POINTER) func; - return_val = GTK_RETLOC_INT (args[2]); - - *return_val = (*rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_POINTER (args[1]), - func_data); -} - -typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER) (GtkObject *, - gpointer, gpointer, gpointer, - gpointer user_data); -void -e_marshal_INT__POINTER_POINTER_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_INT__POINTER_POINTER_POINTER rfunc; - int *return_val; - - rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER) func; - return_val = GTK_RETLOC_INT (args[3]); - - *return_val = (*rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_POINTER (args[2]), - func_data); -} - -typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER_POINTER) (GtkObject *, - gpointer, gpointer, gpointer, gpointer, - gpointer user_data); -void -e_marshal_INT__POINTER_POINTER_POINTER_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_INT__POINTER_POINTER_POINTER_POINTER rfunc; - int *return_val; - - rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER_POINTER) func; - return_val = GTK_RETLOC_INT (args[4]); - - *return_val = (*rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_POINTER (args[2]), - GTK_VALUE_POINTER (args[3]), - func_data); -} - - -typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER_POINTER_POINTER) (GtkObject *, - gpointer, gpointer, gpointer, gpointer, gpointer, - gpointer user_data); -void -e_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_INT__POINTER_POINTER_POINTER_POINTER_POINTER rfunc; - int *return_val; - - rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER_POINTER_POINTER) func; - return_val = GTK_RETLOC_INT (args[4]); - - *return_val = (*rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_POINTER (args[2]), - GTK_VALUE_POINTER (args[3]), - GTK_VALUE_POINTER (args[4]), - func_data); -} - -typedef void (*GtkSignal_NONE__POINTER_POINTER_POINTER_BOOL) (GtkObject *, - gpointer, gpointer, gpointer, gboolean, - gpointer user_data); - -void -e_marshal_NONE__POINTER_POINTER_POINTER_BOOL (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_NONE__POINTER_POINTER_POINTER_BOOL rfunc; - - rfunc = (GtkSignal_NONE__POINTER_POINTER_POINTER_BOOL) func; - - (*rfunc) (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_POINTER (args[1]), - GTK_VALUE_POINTER (args[2]), - GTK_VALUE_BOOL (args[3]), - func_data); -} - -void -e_marshal_NONE__POINTER_INT_INT_INT (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - (* (void (*)(GtkObject *, gpointer, int, int, int, gpointer)) func) - (object, - GTK_VALUE_POINTER (args[0]), - GTK_VALUE_INT (args[1]), - GTK_VALUE_INT (args[2]), - - GTK_VALUE_INT (args[3]), - func_data); -} - -typedef int (*GtkSignal_INT__OBJECT_POINTER) (GtkObject *, - GtkObject *, gpointer, - gpointer user_data); -void -e_marshal_INT__OBJECT_POINTER (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_INT__OBJECT_POINTER rfunc; - int *return_val; - - rfunc = (GtkSignal_INT__OBJECT_POINTER) func; - return_val = GTK_RETLOC_INT (args[2]); - - *return_val = (*rfunc) (object, - GTK_VALUE_OBJECT (args[0]), - GTK_VALUE_POINTER (args[1]), - func_data); -} - -typedef void (*GtkSignal_NONE__DOUBLE) (GtkObject *, - gdouble, - gpointer user_data); -void -e_marshal_NONE__DOUBLE (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_NONE__DOUBLE rfunc; - - rfunc = (GtkSignal_NONE__DOUBLE) func; - - (*rfunc) (object, - GTK_VALUE_DOUBLE (args[0]), - func_data); -} - -typedef gboolean (*GtkSignal_BOOL__STRING_INT) (GtkObject *, - char *, - gint, - gpointer user_data); - -void -e_marshal_BOOL__STRING_INT (GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args) -{ - GtkSignal_BOOL__STRING_INT rfunc; - gboolean *return_val; - - rfunc = (GtkSignal_BOOL__STRING_INT) func; - return_val = GTK_RETLOC_BOOL (args[2]); - - *return_val = (*rfunc) (object, - GTK_VALUE_STRING (args[0]), - GTK_VALUE_INT (args[1]), - func_data); -} +#include "e-marshal.h" +#include "e-marshal.c" gchar** e_strsplit (const gchar *string, @@ -1666,3 +1123,18 @@ e_strdupv (const gchar **str_array) return NULL; } } + +char * +e_gettext (const char *msgid) +{ + static gboolean initialized = FALSE; + + if (!initialized) { + bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + initialized = TRUE; + } + + return dgettext (GETTEXT_PACKAGE, msgid); +} + |