From 4b74fdf033dc4e4e71155adbe89ca3845cfb302c Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Sat, 7 Dec 2002 02:56:56 +0000 Subject: Implement GType for this enumeration. (cal_query_class_init): Use the 2002-12-06 Hans Petter Jansson * cal-client/cal-query.c (cal_query_done_status_enum_get_type): Implement GType for this enumeration. (cal_query_class_init): Use the enumeration instead of the abstract one. * cal-client/cal-query.h: Add type macro and proto for enum. svn path=/trunk/; revision=19050 --- calendar/cal-client/cal-query.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'calendar/cal-client/cal-query.c') diff --git a/calendar/cal-client/cal-query.c b/calendar/cal-client/cal-query.c index 52fba27ef3..77b18af1ff 100644 --- a/calendar/cal-client/cal-query.c +++ b/calendar/cal-client/cal-query.c @@ -90,6 +90,25 @@ cal_query_get_type (void) return cal_query_type; } +GType +cal_query_done_status_enum_get_type (void) +{ + static GType cal_query_done_status_enum_type = 0; + + if (!cal_query_done_status_enum_type) { + static GEnumValue values [] = { + { CAL_QUERY_DONE_SUCCESS, "CalQueryDoneSuccess", "success" }, + { CAL_QUERY_DONE_PARSE_ERROR, "CalQueryDoneParseError", "parse-error" }, + { -1, NULL, NULL } + }; + + cal_query_done_status_enum_type = + g_enum_register_static ("CalQueryDoneStatusEnum", values); + } + + return cal_query_done_status_enum_type; +} + /* Class initialization function for the calendar query */ static void cal_query_class_init (CalQueryClass *klass) @@ -129,7 +148,7 @@ cal_query_class_init (CalQueryClass *klass) NULL, NULL, cal_util_marshal_VOID__ENUM_STRING, G_TYPE_NONE, 2, - G_TYPE_ENUM, + CAL_QUERY_DONE_STATUS_ENUM_TYPE, G_TYPE_STRING); query_signals[EVAL_ERROR] = g_signal_new ("eval_error", -- cgit