* Added evolution as a recommended dependency
* Added more foundational code for actually using the new addressbook system
git-svn-id: file:///svnroot/gc-dialer/trunk@127
c39d3808-3fe2-4d86-a59f-
b7f623ee9f21
- def callable(*args, **kwds):
+ def decorated_func(*args, **kwds):
if not a:
a.append(func(*args, **kwds))
try:
if not a:
a.append(func(*args, **kwds))
try:
except StopIteration:
return False
except StopIteration:
return False
- callable.__name__ = func.__name__
- callable.__doc__ = func.__doc__
- callable.__dict__.update(func.__dict__)
+ decorated_func.__name__ = func.__name__
+ decorated_func.__doc__ = func.__doc__
+ decorated_func.__dict__.update(func.__dict__)
class DummyAddressBook(object):
class DummyAddressBook(object):
return button_handler
def run(self, contactDetails):
return button_handler
def run(self, contactDetails):
- self._typemodel.clear()
+ self._booksList.clear()
for phoneType, phoneNumber in contactDetails:
for phoneType, phoneNumber in contactDetails:
- self._typemodel.append((phoneNumber, "%s - %s" % (make_pretty(phoneNumber), phoneType)))
+ self._booksList.append((phoneNumber, "%s - %s" % (make_pretty(phoneNumber), phoneType)))
+ userResponse = self._dialog.run()
if userResponse == gtk.RESPONSE_OK:
pass
if userResponse == gtk.RESPONSE_OK:
pass
self._clipboard = gtk.clipboard_get()
self._deviceIsOnline = True
self._clipboard = gtk.clipboard_get()
self._deviceIsOnline = True
+ self.callbacklist = None
self._callbackNeedsSetup = True
self._recenttime = 0.0
self._callbackNeedsSetup = True
self._recenttime = 0.0
self._gcBackend = GCDialer()
self._gcBackend = GCDialer()
+ self._addressBookFactories = [
+ DummyAddressBook(),
+ EvolutionAddressBook(),
+ self._gcBackend,
+ ]
+ self._addressBook = None
+ self.open_addressbook(*self.get_addressbooks().next()[0:2])
+
self._phoneTypeSelector = PhoneTypeSelector(self._widgetTree, self._gcBackend)
if not self._gcBackend.is_authed():
self._phoneTypeSelector = PhoneTypeSelector(self._widgetTree, self._gcBackend)
if not self._gcBackend.is_authed():
error_dialog.connect("response", close, self)
error_dialog.run()
error_dialog.connect("response", close, self)
error_dialog.run()
+ def get_addressbooks(self):
+ """
+ @returns Iterable of (Address Book Factory, Book Id, Book Name)
+ """
+ for factory in self._addressBookFactories:
+ for bookFactory, bookId, bookName in factory.get_addressbooks():
+ yield bookFactory, bookId, bookName
+
+ def open_addressbook(self, bookFactory, bookId):
+ self._addressBook = bookFactory.open_addressbook(bookId)
+ self._contactstime = 0
+
def set_number(self, number):
"""
Set the callback phonenumber
def set_number(self, number):
"""
Set the callback phonenumber
Section: user/Communication
Priority: Optional
Depends: python2.5, python2.5-gtk2
Section: user/Communication
Priority: Optional
Depends: python2.5, python2.5-gtk2
-Recommends: python2.5-hildon
+Recommends: python2.5-hildon python-evolution
Version: 0.0.0
Architecture: all
Description: Python frontend to the private Google service Grandcentral
Version: 0.0.0
Architecture: all
Description: Python frontend to the private Google service Grandcentral
#enable-msg=
# Disable the message(s) with the given id(s).
#enable-msg=
# Disable the message(s) with the given id(s).
-#Unused Arg, Missing Docstring
-disable-msg=W0613,C0111
-
+disable-msg=W0403,W0612,W0613,C0103,C0111,C0301