[evolution-patches] patch for e-d-s bug #53994
- From: Chris Toshok <toshok ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] patch for e-d-s bug #53994
- Date: Fri, 20 Feb 2004 11:17:52 -0800
need this GType foo to help language bindings.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.89
diff -u -r1.89 ChangeLog
--- ChangeLog 12 Feb 2004 22:41:18 -0000 1.89
+++ ChangeLog 20 Feb 2004 19:16:48 -0000
@@ -1,3 +1,20 @@
+2004-02-20 Chris Toshok <toshok ximian com>
+
+ [ fixes bug #53994 ]
+
+ * libebook/e-book-query.c (e_book_query_get_type): new function,
+ supply e_book_query_copy as the CopyFunc, and e_book_query_unref
+ as the FreeFunc.
+ (e_book_query_copy): new function, just convert @q to a string and
+ reparse it, ala the EVCard copy function.
+
+ * libebook/e-book-query.h: add prototypes for
+ e_book_query_get_type and e_book_query_copy. also add
+ E_TYPE_BOOK_QUERY.
+
+ * libebook/e-contact.h: add
+ E_TYPE_CONTACT_{DATE,NAME,PHOTO,CERT,ADDRESS}.
+
2004-02-12 Chris Toshok <toshok ximian com>
* libebook/e-book-listener.c
Index: libebook/e-book-query.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book-query.c,v
retrieving revision 1.2
diff -u -r1.2 e-book-query.c
--- libebook/e-book-query.c 23 Dec 2003 22:36:53 -0000 1.2
+++ libebook/e-book-query.c 20 Feb 2004 19:16:48 -0000
@@ -626,3 +626,25 @@
return g_string_free (str, FALSE);
}
+
+GType
+e_book_query_get_type (void)
+{
+ static GType type_id = 0;
+
+ if (!type_id)
+ type_id = g_boxed_type_register_static ("EBookQuery",
+ (GBoxedCopyFunc) e_book_query_copy,
+ (GBoxedFreeFunc) e_book_query_unref);
+ return type_id;
+}
+
+EBookQuery*
+e_book_query_copy (EBookQuery *q)
+{
+ char *str = e_book_query_to_string (q);
+ EBookQuery *nq = e_book_query_from_string (str);
+
+ g_free (str);
+ return nq;
+}
Index: libebook/e-book-query.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book-query.h,v
retrieving revision 1.2
diff -u -r1.2 e-book-query.h
--- libebook/e-book-query.h 23 Dec 2003 22:36:53 -0000 1.2
+++ libebook/e-book-query.h 20 Feb 2004 19:16:48 -0000
@@ -6,6 +6,8 @@
G_BEGIN_DECLS
+#define E_TYPE_BOOK_QUERY (e_book_query_get_type ())
+
typedef struct EBookQuery EBookQuery;
typedef enum {
@@ -44,6 +46,9 @@
/* a special any field contains query */
EBookQuery* e_book_query_any_field_contains (const char *value);
+GType e_book_query_get_type (void);
+EBookQuery* e_book_query_copy (EBookQuery *q);
+
G_END_DECLS
#endif /* __E_BOOK_QUERY_H__ */
Index: libebook/e-contact.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-contact.h,v
retrieving revision 1.9
diff -u -r1.9 e-contact.h
--- libebook/e-contact.h 23 Jan 2004 20:16:12 -0000 1.9
+++ libebook/e-contact.h 20 Feb 2004 19:16:48 -0000
@@ -21,6 +21,12 @@
#define E_IS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CONTACT))
#define E_CONTACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CONTACT, EContactClass))
+#define E_TYPE_CONTACT_DATE (e_contact_date_get_type ())
+#define E_TYPE_CONTACT_NAME (e_contact_name_get_type ())
+#define E_TYPE_CONTACT_PHOTO (e_contact_photo_get_type ())
+#define E_TYPE_CONTACT_CERT (e_contact_cert_get_type ())
+#define E_TYPE_CONTACT_ADDRESS (e_contact_address_get_type ())
+
typedef struct _EContact EContact;
typedef struct _EContactClass EContactClass;
typedef struct _EContactPrivate EContactPrivate;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]