aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2002-12-07 10:56:56 +0800
committerHans Petter <hansp@src.gnome.org>2002-12-07 10:56:56 +0800
commit4b74fdf033dc4e4e71155adbe89ca3845cfb302c (patch)
tree9c600bbf9aae34c21c8411a808e33d918c2ed005 /calendar
parentf46092c3876adad67a080c06ee4908e2efffc05a (diff)
downloadgsoc2013-evolution-4b74fdf033dc4e4e71155adbe89ca3845cfb302c.tar
gsoc2013-evolution-4b74fdf033dc4e4e71155adbe89ca3845cfb302c.tar.gz
gsoc2013-evolution-4b74fdf033dc4e4e71155adbe89ca3845cfb302c.tar.bz2
gsoc2013-evolution-4b74fdf033dc4e4e71155adbe89ca3845cfb302c.tar.lz
gsoc2013-evolution-4b74fdf033dc4e4e71155adbe89ca3845cfb302c.tar.xz
gsoc2013-evolution-4b74fdf033dc4e4e71155adbe89ca3845cfb302c.tar.zst
gsoc2013-evolution-4b74fdf033dc4e4e71155adbe89ca3845cfb302c.zip
Implement GType for this enumeration. (cal_query_class_init): Use the
2002-12-06 Hans Petter Jansson <hpj@ximian.com> * 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
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/cal-client/cal-query.c21
-rw-r--r--calendar/cal-client/cal-query.h4
3 files changed, 33 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index a68fe6cd16..431a23f370 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,14 @@
2002-12-06 Hans Petter Jansson <hpj@ximian.com>
+ * 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.
+
+2002-12-06 Hans Petter Jansson <hpj@ximian.com>
+
* gui/component-factory.c (create_view): Pass the env argument to
bonobo_control_set_property ().
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",
diff --git a/calendar/cal-client/cal-query.h b/calendar/cal-client/cal-query.h
index b75836cd96..9464e7ae6e 100644
--- a/calendar/cal-client/cal-query.h
+++ b/calendar/cal-client/cal-query.h
@@ -35,6 +35,8 @@ G_BEGIN_DECLS
#define IS_CAL_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAL_QUERY_TYPE))
#define IS_CAL_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAL_QUERY_TYPE))
+#define CAL_QUERY_DONE_STATUS_ENUM_TYPE (cal_query_done_status_enum_get_type ())
+
/* Status values when a query terminates */
typedef enum {
CAL_QUERY_DONE_SUCCESS,
@@ -66,6 +68,8 @@ typedef struct {
GType cal_query_get_type (void);
+GType cal_query_done_status_enum_get_type (void);
+
CalQuery *cal_query_construct (CalQuery *query,
GNOME_Evolution_Calendar_Cal cal,
const char *sexp);