diff options
-rw-r--r-- | e-util/ChangeLog | 6 | ||||
-rw-r--r-- | e-util/e-util.c | 15 | ||||
-rw-r--r-- | e-util/e-util.c-8611 | 15 | ||||
-rw-r--r-- | e-util/e-util.h | 8 | ||||
-rw-r--r-- | e-util/e-util.h-29002 | 8 |
5 files changed, 46 insertions, 6 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index e01604b3b7..5a65629ce1 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,9 @@ +2000-05-03 Ettore Perazzoli <ettore@helixcode.com> + + * e-util.h: #include <glib.h> and <gtk/gtktypeutils.h>. + + * e-util.c (e_free_object_list): New utility function. + 2000-05-02 Damon Chaplin <damon@helixcode.com> * e-canvas.c (e_canvas_focus_in): diff --git a/e-util/e-util.c b/e-util/e-util.c index d637b33729..f2d787f37e 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -20,8 +20,10 @@ * Boston, MA 02111-1307, USA. */ -#include "e-util.h" #include <glib.h> +#include <gtk/gtkobject.h> + +#include "e-util.h" int g_str_compare(const void *x, const void *y) @@ -39,3 +41,14 @@ g_int_compare(const void *x, const void *y) else return -1; } + +void +e_free_object_list (GList *list) +{ + GList *p; + + for (p = list; p != NULL; p = p->next) + gtk_object_unref (GTK_OBJECT (p->data)); + + g_list_free (list); +} diff --git a/e-util/e-util.c-8611 b/e-util/e-util.c-8611 index d637b33729..f2d787f37e 100644 --- a/e-util/e-util.c-8611 +++ b/e-util/e-util.c-8611 @@ -20,8 +20,10 @@ * Boston, MA 02111-1307, USA. */ -#include "e-util.h" #include <glib.h> +#include <gtk/gtkobject.h> + +#include "e-util.h" int g_str_compare(const void *x, const void *y) @@ -39,3 +41,14 @@ g_int_compare(const void *x, const void *y) else return -1; } + +void +e_free_object_list (GList *list) +{ + GList *p; + + for (p = list; p != NULL; p = p->next) + gtk_object_unref (GTK_OBJECT (p->data)); + + g_list_free (list); +} diff --git a/e-util/e-util.h b/e-util/e-util.h index e5635cdf16..a3380b9ea4 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -1,6 +1,9 @@ #ifndef _E_UTIL_H_ #define _E_UTIL_H_ +#include <glib.h> +#include <gtk/gtktypeutils.h> + #define E_MAKE_TYPE(l,str,t,ci,i,parent) \ GtkType l##_get_type(void)\ {\ @@ -19,8 +22,7 @@ GtkType l##_get_type(void)\ type = gtk_type_unique (parent, &info);\ }\ return type;\ -}\ - +} typedef enum { E_FOCUS_NONE, @@ -32,4 +34,6 @@ typedef enum { int g_str_compare(const void *x, const void *y); int g_int_compare(const void *x, const void *y); +void e_free_object_list (GList *list); + #endif /* _E_UTIL_H_ */ diff --git a/e-util/e-util.h-29002 b/e-util/e-util.h-29002 index e5635cdf16..a3380b9ea4 100644 --- a/e-util/e-util.h-29002 +++ b/e-util/e-util.h-29002 @@ -1,6 +1,9 @@ #ifndef _E_UTIL_H_ #define _E_UTIL_H_ +#include <glib.h> +#include <gtk/gtktypeutils.h> + #define E_MAKE_TYPE(l,str,t,ci,i,parent) \ GtkType l##_get_type(void)\ {\ @@ -19,8 +22,7 @@ GtkType l##_get_type(void)\ type = gtk_type_unique (parent, &info);\ }\ return type;\ -}\ - +} typedef enum { E_FOCUS_NONE, @@ -32,4 +34,6 @@ typedef enum { int g_str_compare(const void *x, const void *y); int g_int_compare(const void *x, const void *y); +void e_free_object_list (GList *list); + #endif /* _E_UTIL_H_ */ |