gnome-python-desktop r487 - in trunk: . evolution



Author: jstowers
Date: Fri May  9 11:06:17 2008
New Revision: 487
URL: http://svn.gnome.org/viewvc/gnome-python-desktop?rev=487&view=rev

Log:
2008-05-09  John Stowers  <john stowers gmail com>

	* evolution/ebook.defs: Wrap more addressbook functions, is_opened, 
	is_writable, is_online, open, new_{default,system}_addressbook, get_uri,
	set_default_addressbook.

	* evolution/evo-contact.c (evo_contact_get_name): Stop warning when
	contact doesnt have a name set.



Modified:
   trunk/ChangeLog
   trunk/evolution/ebook.defs
   trunk/evolution/evo-contact.c

Modified: trunk/evolution/ebook.defs
==============================================================================
--- trunk/evolution/ebook.defs	(original)
+++ trunk/evolution/ebook.defs	Fri May  9 11:06:17 2008
@@ -213,6 +213,40 @@
 ;;------------------------------------------------------------------------------
 ;; EBook
 ;;------------------------------------------------------------------------------
+(define-function new_system_addressbook
+  (c-name "e_book_new_system_addressbook")
+  (return-type "EBook*")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-function new_default_addressbook
+  (c-name "e_book_new_default_addressbook")
+  (return-type "EBook*")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method open
+  (of-object "EBook")
+  (c-name "e_book_open")
+  (return-type "gboolean")
+  (parameters
+    '("gboolean" "only_if_exists")
+    '("GError**" "error")
+  )
+)
+
+(define-function is_self
+  (c-name "e_book_is_self")
+  (return-type "gboolean")
+  (parameters
+    '("EContact*" "contact")
+  )
+)
+
 (define-function e_book_new
   (c-name "e_book_new")
   (is-constructor-of "EBook")
@@ -321,6 +355,39 @@
   )
 )
 
+(define-method is_opened
+  (of-object "EBook")
+  (c-name "e_book_is_opened")
+  (return-type "gboolean")
+)
+
+(define-method is_writable
+  (of-object "EBook")
+  (c-name "e_book_is_writable")
+  (return-type "gboolean")
+)
+
+(define-method is_online
+  (of-object "EBook")
+  (c-name "e_book_is_online")
+  (return-type "gboolean")
+)
+
+(define-method get_uri
+  (of-object "EBook")
+  (c-name "e_book_get_uri")
+  (return-type "const-char*")
+)
+
+(define-method set_default_addressbook
+  (of-object "EBook")
+  (c-name "e_book_set_default_addressbook")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
 ; New get_book_view
 (define-method get_book_view
   (of-object "EBook")

Modified: trunk/evolution/evo-contact.c
==============================================================================
--- trunk/evolution/evo-contact.c	(original)
+++ trunk/evolution/evo-contact.c	Fri May  9 11:06:17 2008
@@ -84,8 +84,9 @@
 	g_return_val_if_fail(E_IS_CONTACT(obj), NULL);
 	
 	EContactName *name = (EContactName *)e_contact_get(obj, E_CONTACT_NAME);
-
-	return e_contact_name_to_string (name);
+    if (name)
+    	return e_contact_name_to_string (name);
+    return NULL;
 }
 
 char *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]