[Jppy-commit] [SCM] jppy - Python bindings and API for jpilot databases and a GTK2 GUI branch, devel-calendar, updated. releases/0.0.48-83-gd5978d2
Jon Schewe
jpschewe@mtu.net
Sat Nov 8 03:22:06 GMT 2008
The following commit has been merged in the devel-calendar branch:
commit d5978d25e534b1ef51e7a61e0c19b41394b83702
Author: Jon Schewe <jpschewe@mtu.net>
Date: Fri Nov 7 21:20:54 2008 -0600
A little clean up of what assumptions are made when wrt. datebk6.
Also convinced that the right _recordPromotion method is called once Nick makes the class hierarchy changes :)
diff --git a/jppy/__init__.py b/jppy/__init__.py
index e9c0e50..ea17cca 100644
--- a/jppy/__init__.py
+++ b/jppy/__init__.py
@@ -27,9 +27,6 @@ import mx.DateTime
import pisock
import os
-# hmmm... this pre-supposes the _jpilot classes at the moment.
-import datebk6
-
from conduit import conduit
from vcard import load_vcards
@@ -47,8 +44,7 @@ from baseclasses import addressBook, memoList, memo32List, taskList, calendar, i
providers = ['jpilot_t3','jpilot_tx','jpilot']
-# @todo switch dateBkFeatures back to True
-def setProvider(providerName, dateBkFeatures=False):
+def setProvider(providerName, dateBkFeatures=True):
global addressBook, memoList, memo32List, taskList, calendar, installFile, log, \
Todo, Contact, Memo, Event
if providerName in ('jpilot_t3','jpilot_tx'):
@@ -61,6 +57,8 @@ def setProvider(providerName, dateBkFeatures=False):
installFile = jpilot_t3.installFile
log = _jpilot.jp_logf
if dateBkFeatures:
+ # hmmm... this pre-supposes the _jpilot classes at the moment.
+ import datebk6
taskList._recordPromotion = datebk6.taskPromotion
memoList._recordPromotion = datebk6.memoPromotion
addressBook._recordPromotion = datebk6.contactPromotion
@@ -73,10 +71,9 @@ def setProvider(providerName, dateBkFeatures=False):
Todo = _jpilot.Todo
Contact = _jpilot.Contact
Memo = _jpilot.Memo
- # @todo figure out how to do this right
- calendar._recordPromotion = baseclasses.calendar._recordPromotion
+ # @todo figure out how to define if it should be this class or
+ # a DatebookDB class
Event = baseclasses.calendarEvent
- Event = _jpilot.Event
elif providerName == 'jpilot':
import jpilot
addressBook = jpilot.addressBook
@@ -140,7 +137,7 @@ printercommand = lpr
configDateBk = None
if config.has_option("jppy", "dateBkFeatures"):
configDateBk = config.get("jppy", "dateBkFeatures")
-
+
if configDateBk:
configDateBk = configDateBk.lower()
if "false" == configDateBk:
--
jppy - Python bindings and API for jpilot databases and a GTK2 GUI
More information about the Jppy-commit
mailing list