gimmie r698 - in trunk: . gimmie



Author: orph
Date: Mon Jan 12 12:02:08 2009
New Revision: 698
URL: http://svn.gnome.org/viewvc/gimmie?rev=698&view=rev

Log:
2009-01-12  Alex Graveley  <alex beatniksoftware com>

	* gimmie/gimmie_evolution.py: evolution.list_addressbooks is
	evolution.ebook.list_addressbooks.  Also remove the 'evolution'
	import guard, since the caller should catch this.



Modified:
   trunk/ChangeLog
   trunk/gimmie/gimmie_evolution.py

Modified: trunk/gimmie/gimmie_evolution.py
==============================================================================
--- trunk/gimmie/gimmie_evolution.py	(original)
+++ trunk/gimmie/gimmie_evolution.py	Mon Jan 12 12:02:08 2009
@@ -5,11 +5,7 @@
 import gtk
 from gimmie_base import Item, ItemSource
 
-try:
-    import evolution
-except ImportError, err:
-    print " !!! Unable to import evolution bindings:", err
-    evolution = None
+import evolution
 
 
 class EvolutionContactWindow(gtk.Window):
@@ -79,7 +75,7 @@
         
     def do_open(self):
         #os.system('evolution mailto:'+self.contact.get_property('email_1'))
-        ecw=EvolutionContactWindow(self.contact)
+        ecw = EvolutionContactWindow(self.contact)
         ecw.show()
 
 
@@ -95,13 +91,12 @@
 
     def _get_all_contacts(self):
         contacts = []
-        if evolution:
-            for book_id in evolution.list_addressbooks():
-                book = evolution.open_addressbook(book_id[1])
-                if book:
-                    for c in book.get_all_contacts():
-                        contact = EvolutionContact(c)
-                        contacts.append(contact)
+        for book_id in evolution.ebook.list_addressbooks():
+            book = evolution.ebook.open_addressbook(book_id[1])
+            if book:
+                for c in book.get_all_contacts():
+                    contact = EvolutionContact(c)
+                    contacts.append(contact)
         return contacts
 
     def get_items_uncached(self):



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