rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
if buildenv['outputdir']: if not os.path.exists(buildenv['outputdir']): os.mkdir(buildenv['outputdir']) if os.path.exists(buildenv['outputdir']+os.sep+compFile1): os.remove(buildenv['outputdir']+os.sep+compFile1) os.rename(compFile1, buildenv['outputdir']+os.sep+compFile1) if os.path.exists(buildenv['outputdir']+os.sep...
def distribute(buildenv): _createVersionFile(buildenv) buildVersionShort = \ hardhatutil.RemovePunctuation(buildenv['buildVersion']) # When the build version string is based on one of our CVS tags # (which usually begin with "CHANDLER_") let's remove the "CHANDLER_" # prefix from the string so it doesn't end up in t...
os.rename( compFile1, buildenv['outputdir'] + os.sep + compFile1)
os.rename(compFile1, buildenv['outputdir'] + os.sep + compFile1) if buildenv['version'] == 'release': _outputLine(buildenv['outputdir']+os.sep+"enduser", compFile1) else: _outputLine(buildenv['outputdir']+os.sep+"developer", compFile1)
def distribute(buildenv): _createVersionFile(buildenv) buildVersionShort = \ hardhatutil.RemovePunctuation(buildenv['buildVersion']) # When the build version string is based on one of our CVS tags # (which usually begin with "CHANDLER_") let's remove the "CHANDLER_" # prefix from the string so it doesn't end up in t...
class wxTable(DropReceiveWidget, wx.grid.Grid):
class wxTable(DraggableWidget, DropReceiveWidget, wx.grid.Grid):
def GetAttr (self, row, column, kind): attribute = self.base_GetAttr (row, column, kind) if not attribute: type = self.GetTypeName (row, column) delegate = AttributeEditor.GetAttributeEditor (type) attribute = self.defaultROAttribute """ An apparent bug in table asks for an attribute even when there are no entries in t...
modeOverride = kwds.get('modeOverride', None) forceUpdate = kwds.get('forceUpdate', None)
def silentCallback(*args, **kwds): # Simply return the interrupt flag return interrupt_flag == IMMEDIATE_STOP
try: running_status = RUNNING try: self.rv.refresh(notify=False) collections = [] if 'collection' in kwds: uuid = kwds['collection'] collection = self.rv.findUUID(uuid) collections.append(collection) else: for share in Sharing.Share.iterItems(self.rv): try: if(share.active and share.established and share.contents...
running_status = RUNNING try: modeOverride = kwds.get('modeOverride', None) forceUpdate = kwds.get('forceUpdate', None) self.rv.refresh(notify=False) collections = [] if 'collection' in kwds: uuid = kwds['collection'] collection = self.rv.findUUID(uuid) collections.append(collection) else: for share in Sharing.Sh...
def silentCallback(*args, **kwds): # Simply return the interrupt flag return interrupt_flag == IMMEDIATE_STOP
stats.extend(sync(collection, modeOverride=modeOverride, updateCallback=silentCallback, forceUpdate=forceUpdate)) _clearError(collection)
if(share.active and share.established and share.contents is not None and share.contents not in collections): collections.append(share.contents)
def silentCallback(*args, **kwds): # Simply return the interrupt flag return interrupt_flag == IMMEDIATE_STOP
logger.exception("Error syncing collection") if hasattr(e, 'message'): msg = e.message else: msg = str(e) _setError(collection, msg) stats.extend( { 'collection' : collection.itsUUID, 'error' : msg } ) except Exception, e: logger.exception("Background sync error") finally:
logger.exception("Error with Share object") for collection in collections: if interrupt_flag != PROCEED: return True callCallbacks(UPDATE, msg="Syncing collection '%s'" % collection.displayName) try: stats.extend(sync(collection, modeOverride=modeOverride, updateCallback=silentCallback, forceUpdate=forceUpdate)) _cl...
def silentCallback(*args, **kwds): # Simply return the interrupt flag return interrupt_flag == IMMEDIATE_STOP
running_status = IDLE
except: logger.exception("Error trying to commit in bgsync") try:
def silentCallback(*args, **kwds): # Simply return the interrupt flag return interrupt_flag == IMMEDIATE_STOP
if interrupt_flag != PROCEED: if shutdown_deferred: shutdown_deferred.callback(None) interrupt_flag = PROCEED
except: logger.exception("Error calling callbacks") running_status = IDLE if interrupt_flag != PROCEED: if shutdown_deferred: shutdown_deferred.callback(None) interrupt_flag = PROCEED
def silentCallback(*args, **kwds): # Simply return the interrupt flag return interrupt_flag == IMMEDIATE_STOP
if isCalendar: subLocation = urlparse.urljoin(location, SUBCOLLECTION) if not subLocation.endswith("/"): subLocation += "/" subResource = handle.getResource(subLocation) if ticket: subResource.ticketId = ticket try: hasSubCollection = handle.blockUntil(subResource.exists) and \ handle.blockUntil(subResource.isCollectio...
def interrogate(conduit, location, ticket=None): """ Determine sharing permissions and other details about a collection """ if not location.endswith("/"): location += "/" handle = conduit._getServerHandle() resource = handle.getResource(location) if ticket: resource.ticketId = ticket logger.debug('Examining %s ...',...
self.selectionBrush = wx.Brush(wx.Colour(217, 217, 217)) self.selectionPen = wx.Pen(wx.Colour(102,102,102))
self.selectionBrush = wx.Brush(wx.Colour(229, 229, 229))
def InitializeStyles(self):
def DrawBackgroundSelection(self, dc): styles = self.blockItem.calendarContainer
def DrawBackground(self, dc): styles = self.blockItem.calendarContainer self._doDrawingCalculations()
dc.SetPen(styles.majorLinePen)
dc.SetPen(wx.TRANSPARENT_PEN)
def DrawBackground(self, dc): styles = self.blockItem.calendarContainer self._doDrawingCalculations()
elif errorType == errors.cONNECTION_REFUSED_ERROR:
elif errorType == errors.CONNECTION_REFUSED_ERROR:
def __recordError(self, err): """Helper method to record the errors to the mailMessage object"""
parcelMenuResourceXRC = resources.FindResource ('ViewerParcelMenu', 'wxMenu') assert parcelMenuResourceXRC != None self.displayName = '' node = parcelMenuResourceXRC.GetChildren() while node != None: if node.GetName() == 'label': self.displayName = node.GetChildren().GetContent() break node = menuNode.GetNext() """ Ma...
assert (resources) ignoreErrors = wxLogNull () parcelMenuResourceXRC = resources.FindResource ('ViewerParcelMenu','wxMenu') del ignoreErrors """ Make sure you call the base class before defining your own displayName. """ assert not hasattr (self, 'displayName') self.displayName = _('UnnamedParcel') if parcelMenuResour...
def __init__(self): """ modulePath is the path to the module, which must exist. """ Parcel.__init__(self) module = sys.modules[self.__class__.__module__] self.modulename = os.path.basename (module.__file__) self.modulename = os.path.splitext (self.modulename)[0] self.modulePath = os.sep.join(module.__name__.split("."))...
watchers = (self[w] for w in
watchers = (self.find(w) for w in
def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names
watcher('refresh', uItem, names)
if watcher is not None: watcher('refresh', uItem, names)
def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names
watchers = [self[w] for w in
watchers = (self.find(w) for w in
def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names
version)]
version))
def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names
watcher('refresh', 'collection', uItem, attribute, uRef)
if watcher is not None: watcher('refresh', 'collection', uItem, attribute, uRef)
def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names
watcher('changed', 'notification', uRef, otherName, uItem)
if watcher is not None: watcher('changed', 'notification', uRef, otherName, uItem)
def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names
watchers = (self[w] for w in
watchers = (self.find(w) for w in
def _dispatchChanges(self, changes):
watcher('changed', 'notification', uRef, otherName, uItem)
if watcher is not None: watcher('changed', 'notification', uRef, otherName, uItem)
def _dispatchChanges(self, changes):
if hasattr(self, 'widget') and not self.ignoreNotifications:
if (hasattr(self, 'widget') and not self.ignoreNotifications and self.itsView is wx.GetApp().UIRepositoryView):
def onCollectionNotification(self, op, collection, name, other): """ When our item collection has changed, we need to synchronize """ if hasattr(self, 'widget') and not self.ignoreNotifications: onItemNotification = getattr(self.widget, 'onItemNotification', None) if onItemNotification is not None: onItemNotification('...
MenuBar.template('MenuBar', childrenBlocks = [ Menu.template('FileMenu',
fileMenu = Menu.template('FileMenu',
def makeColorMenuItems (parcel, cls, hues): """ dynamically creates an array of type 'cls' based on a list of colors """ menuItems = [] # make sure that all the events end up in the main parcel mainParcel = schema.parcel_for_module ("osaf.views.main", repositoryView) for shortName, title, hue in hues: rgb = wx.Image.H...
MenuItem.template('FileSeparator2', menuItemKind = 'Separator'), MenuItem.template('QuitItem', event = globalBlocks.Quit, title = _(u'Quit'), accel = _(u'Ctrl+Q'), helpString = _(u'Quit Chandler')), ]),
]) if wx.Platform != '__WXMAC__': fileMenu.attrs['childrenBlocks'].append(MenuItem.template('FileSeparator2', menuItemKind = 'Separator')) fileMenu.attrs['childrenBlocks'].append(MenuItem.template('QuitItem', event=globalBlocks.Quit, title = _(u'Quit'), accel = _(u'Ctrl+Q'), helpString = _(u'Quit Chandler'))) MenuBar...
def makeColorMenuItems (parcel, cls, hues): """ dynamically creates an array of type 'cls' based on a list of colors """ menuItems = [] # make sure that all the events end up in the main parcel mainParcel = schema.parcel_for_module ("osaf.views.main", repositoryView) for shortName, title, hue in hues: rgb = wx.Image.H...
delPat = re.compile(".*(hasLocalhasLocalAttributeValue|hasTrueAttributeValue)\(([^\)]*)\).*")
delPat = re.compile(".*(hasLocalAttributeValue|hasTrueAttributeValue)\(([^\)]*)\).*")
def _inspect_(self, indent): """ more debugging """
nowMinute = now.minute nowHour = now.hour newTime = now.replace(minute=roundTo(nowMinute,15), hour=nowHour + 1)
newTime = now + timedelta(hours=1) newTime = newTime.replace(minute=roundTo(now.minute,15))
def GetNewEventTime(self, unscrolledPosition=None): """ Returns a reasonable startTime and duration for creation of an event, taking into account. """ if (self._bgSelectionStartTime): # first try selection, if any newTime = self._bgSelectionStartTime duration = self._bgSelectionEndTime - newTime elif unscrolledPositio...
"192.168.101.46:continuous/" + buildNameNoSpaces])
options.rsyncServer + ":continuous/" + buildNameNoSpaces])
def main(): global buildscriptFile, fromAddr, mailtoAddr, alertAddr, adminAddr, defaultDomain, defaultRsyncServer parser = OptionParser(usage="%prog [options] buildName", version="%prog 1.2") parser.add_option("-t", "--toAddr", action="store", type="string", dest="toAddr", default=mailtoAddr, help="Where to mail scrip...
else: self.logger.warn('not pruning %s (refCount %d)', item._repr_(), pythonRefs - itemRefs)
elif debug: self.logger.debug('not pruning %s (refCount %d)', item._repr_(), pythonRefs - itemRefs)
def prune(self, size):
if len(rrule._bymonth) == 1:
if len(rrule._bymonth or ()) == 1 and \ rrule._byweekday is None and \ len(rrule._bynweekday or ()) == 0:
def setRuleFromDateUtil(self, rrule): """Extract attributes from rrule, set them in self.
accel = getattr(sender, 'accel', None) if accel is not None: title += '\t' + accel
accel = getattr(sender, 'accel', u'') if len(accel) > 0: title += u'\t' + accel
def broadcast (block, methodName, event, childTest): callMethod (block, methodName, event) for child in block.childrenBlocks: if childTest (child): broadcast (child, methodName, event, childTest)
cfg = ConfigParser.ConfigParser()
cfg = ConfigObj() cfg.encoding = "UTF8" cfg.filename = filename
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_prefix = "sharing_account"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "webdav account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "path", account.path) cfg....
section_name = u"sharing_account_%d" % counter cfg[section_name] = {} cfg[section_name][u"type"] = u"webdav account" cfg[section_name][u"uuid"] = account.itsUUID cfg[section_name][u"title"] = account.displayName cfg[section_name][u"host"] = account.host cfg[section_name][u"path"] = account.path cfg[section_name][u"user...
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "default", "True")
cfg[section_name][u"default"] = u"True"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_prefix = "share"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "share") cfg.set(section_name, "title", share.contents.displayName) cfg.set(section_name, "mine", col in mine.sources)
section_name = u"share_%d" % counter cfg[section_name] = {} cfg[section_name][u"type"] = u"share" cfg[section_name][u"title"] = share.contents.displayName cfg[section_name][u"mine"] = col in mine.sources
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "red", color.red) cfg.set(section_name, "green", color.green) cfg.set(section_name, "blue", color.blue) cfg.set(section_name, "alpha", color.alpha)
cfg[section_name][u"red"] = color.red cfg[section_name][u"green"] = color.green cfg[section_name][u"blue"] = color.blue cfg[section_name][u"alpha"] = color.alpha
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "publisher", "True") cfg.set(section_name, "url", share.getLocation())
cfg[section_name][u"publisher"] = u"True" cfg[section_name][u"url"] = share.getLocation()
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "publisher", "False")
cfg[section_name][u"publisher"] = u"False"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "url", url)
cfg[section_name][u"url"] = url
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "ticket", urls[0])
cfg[section_name][u"ticket"] = urls[0]
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "freebusy", "True")
cfg[section_name][u"freebusy"] = u"True"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_prefix = "smtp_account"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "smtp account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "auth", account.useAuth) cfg...
section_name = u"smtp_account_%d" % counter cfg[section_name] = {} cfg[section_name][u"type"] = u"smtp account" cfg[section_name][u"uuid"] = account.itsUUID cfg[section_name][u"title"] = account.displayName cfg[section_name][u"host"] = account.host cfg[section_name][u"auth"] = account.useAuth cfg[section_name][u"userna...
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_prefix = "imap_account"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "imap account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "username", account.username...
section_name = u"imap_account_%d" % counter cfg[section_name] = {} cfg[section_name][u"type"] = u"imap account" cfg[section_name][u"uuid"] = account.itsUUID cfg[section_name][u"title"] = account.displayName cfg[section_name][u"host"] = account.host cfg[section_name][u"username"] = account.username cfg[section_name][u"p...
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set(section_name, "smtp", account.defaultSMTPAccount.itsUUID)
cfg[section_name][u"smtp"] = account.defaultSMTPAccount.itsUUID
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_prefix = "pop_account"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
section_name = "%s_%d" % (section_prefix, counter) cfg.add_section(section_name) cfg.set(section_name, "type", "pop account") cfg.set(section_name, "uuid", account.itsUUID) cfg.set(section_name, "title", account.displayName) cfg.set(section_name, "host", account.host) cfg.set(section_name, "username", account.username)...
section_name = u"pop_account_%d" % counter cfg[section_name] = {} cfg[section_name][u"type"] = u"pop account" cfg[section_name][u"uuid"] = account.itsUUID cfg[section_name][u"title"] = account.displayName cfg[section_name][u"host"] = account.host cfg[section_name][u"username"] = account.username cfg[section_name][u"pas...
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.add_section("timezones")
cfg[u"timezones"] = {}
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set("timezones", "type", "show timezones") cfg.set("timezones", "show_timezones", showTZ)
cfg[u"timezones"][u"type"] = u"show timezones" cfg[u"timezones"][u"show_timezones"] = showTZ
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.add_section("visible_hours") cfg.set("visible_hours", "type", "visible hours")
cfg[u"visible_hours"] = {} cfg[u"visible_hours"][u"type"] = u"visible hours"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set("visible_hours", "height_mode", calPrefs.hourHeightMode) cfg.set("visible_hours", "num_hours", calPrefs.visibleHours)
cfg[u"visible_hours"][u"height_mode"] = calPrefs.hourHeightMode cfg[u"visible_hours"][u"num_hours"] = calPrefs.visibleHours
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.add_section("event_logger")
cfg[u"event_logger"] = {}
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set("event_logger", "type", "event logger")
cfg[u"event_logger"][u"type"] = u"event logger"
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
cfg.set("event_logger", "active", active) output = file(filename, "w") cfg.write(output) output.close()
cfg[u"event_logger"][u"active"] = active cfg.write()
def save(rv, filename): """Save selected settings information, including all sharing accounts and shares (whether published or subscribed), to an INI file""" cfg = ConfigParser.ConfigParser() # Sharing accounts currentAccount = schema.ns("osaf.sharing", rv).currentWebDAVAccount.item section_prefix = "sharing_account"...
self.todayButton = CollectionCanvas.CanvasTextButton(self, today.Format("%b %d, %Y"), self.bigFont, self.bigFontColor, self.bgColor)
def OnInit(self): super (wxWeekHeaderCanvas, self).OnInit()
self.Bind(wx.EVT_BUTTON, self.parent.OnToday, self.todayButton)
def OnInit(self): super (wxWeekHeaderCanvas, self).OnInit()
todayButtonSize = self.todayButton.GetSize()
def OnSize(self, event): self._doDrawingCalculations()
self.todayButton.Move((self.size.width - nextButtonSize.width - prevButtonSize.width - todayButtonSize.width - 15, 5))
def OnSize(self, event): self._doDrawingCalculations()
self.todayButton.UpdateSize()
def wxSynchronizeWidget(self):
self.todayButton = CollectionCanvas.CanvasTextButton(self, today.Format("%b %d, %Y"), self.bigFont, self.bigFontColor, self.bgColor)
def OnInit(self): super(wxMonthCanvas, self).OnInit()
self.todayButton.UpdateSize()
def OnInit(self): super(wxMonthCanvas, self).OnInit()
box.Add(self.todayButton, 0, wx.ALIGN_RIGHT | wx.ALL, 5)
def OnInit(self): super(wxMonthCanvas, self).OnInit()
self.Bind(wx.EVT_BUTTON, self.OnToday, self.todayButton)
def OnInit(self): super(wxMonthCanvas, self).OnInit()
url = response.getheader('Location') logger.debug("Redirecting to: %s" % url) continue
newurl = response.getheader('Location') old = urlparse.urlsplit(url) new = urlparse.urlsplit(newurl) if old[0] == new[0] and old[1] == new[1]: url = newurl logger.debug("Redirecting to: %s" % url) continue else: logger.debug("Illegal redirect: %s to %s" % (url, newurl)) raise IllegalRedirect()
def _request(self, method, url, body=None, extraHeaders={ }): logger.debug("_request: %s %s" % (method, url))
elif isinstance(item, Mail.MailMessageMixin):
elif isinstance(item, Mail.MailMessageMixin) and item.isOutbound:
def onSendShareItemEventUpdateUI(self, event): item = self.selectedItem() enabled = False label = _("Send") if item is not None: if isinstance(item, ItemCollection.ItemCollection): # It's a collection: label should read "Send", or "Send to new" if it's already shared. enabled = len(item.invitees) > 0 try: renotify = Sh...
sent = item.isOutbound and item.deliveryExtension.state == "SENT"
sent = item.deliveryExtension.state == "SENT"
def onSendShareItemEventUpdateUI(self, event): item = self.selectedItem() enabled = False label = _("Send") if item is not None: if isinstance(item, ItemCollection.ItemCollection): # It's a collection: label should read "Send", or "Send to new" if it's already shared. enabled = len(item.invitees) > 0 try: renotify = Sh...
wx.GetApp().Yield()
scripting.User.idle()
def SetStamp(self, type, value, timeInfo=True): """ Set the given stamp to the given value @type type : string @param type : the type of stamp to set @type value : boolean @param value : the new stamp value @type timeInfo: boolean """ type_list = ["Mail", "Task", "Event"] if not type in type_list: return currentValue =...
self.openPeers = {}
def __init__(self, application): self.application = application self.jabberID = None self.password = '' self.connection = None self.roster = None self.connected = false self.loggedIn = false self.timer = None
print "AE:controlValue", controlValue
def onKeyPressed(self, event): """ Handle a Key pressed in the control. """ event.Skip() self.showingTheLabel = False # remember we've edited the value control = event.GetEventObject() controlValue = self.GetControlValue (control) keysTyped = len(controlValue) isDelete = event.m_keyCode == wx.WXK_DELETE or event.m_keyC...
def onDeleteEventUpdateUI(self, event):
def onRemoveEventUpdateUI(self, event):
def onDeleteEventUpdateUI(self, event): event.arguments['Enable'] = False
def onRemoveEventUpdateUI(self, event): event.arguments['Text'] = _(u'Delete Collection')
def onDeleteEventUpdateUI(self, event):
def onRemoveEventUpdateUI(self, event): event.arguments['Text'] = _(u'Delete Collection') """ this is enabled if any user item is selected in the sidebar """ # can remove anything except library collections if self.contents.isSelectionEmpty(): enable = False else: for selectedItem in self.contents.iterSelection(): if (...
wx.GetApp().Yield()
wx.GetApp().Yield() self.logger.SetChecked(True) sent = None account = Mail.getCurrentSMTPAccount(App_ns.itsView)[0] if account._values['host']=='': self.logger.ReportFailure("(On SMTP account) - Host not defined") else: self.logger.ReportPass("(On SMTP account)") while not sent: wx.GetApp().Yield() try: sent = self...
def SendMail(self, timeInfo=True): """ Send a mail message @type timeInfo: boolean """ if self.isMessage: #select the item self.SelectItem() #Send button is available only when the body is edited noteArea = App_ns.detail.notes scripting.User.emulate_click(noteArea) #Press the Send button if timeInfo: self.logger.Start(...
self.logger.SetChecked(True) if self.item.isOutbound:
if sent == "SENT":
def SendMail(self, timeInfo=True): """ Send a mail message @type timeInfo: boolean """ if self.isMessage: #select the item self.SelectItem() #Send button is available only when the body is edited noteArea = App_ns.detail.notes scripting.User.emulate_click(noteArea) #Press the Send button if timeInfo: self.logger.Start(...
pos = self.widget.getIdPost(itemId) self.widget.SetSelectedChoice(pos)
pos = self.widget.getIdPos(itemId) self.widget.setSelectedChoice(pos)
def onChangeLayoutEvent(self, notification): # @@@ On the Mac, radio buttons do not work as radio # buttons, but rather they behave as individual toggle # buttons. As a workaround, we deselect the other # radio buttons. if '__WXMAC__' in wx.PlatformInfo: itemId = notification.data['sender'].widget.GetId() pos = self.w...
queryparser = 'release/bin/Lib/site-packages/QueryParser.py'
def generateDocs(options, outputDir): if options.verbose: verbosity = 4 else: verbosity = 1 if sys.platform == 'cygwin' or os.name == 'nt': chandlerdb = 'release/bin/Lib/site-packages/chandlerdb' queryparser = 'release/bin/Lib/site-packages/QueryParser.py' pyicu = 'release/bin/Lib/site-packages/PyICU.py' pyluce...
queryparser = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/QueryParser.py'
def generateDocs(options, outputDir): if options.verbose: verbosity = 4 else: verbosity = 1 if sys.platform == 'cygwin' or os.name == 'nt': chandlerdb = 'release/bin/Lib/site-packages/chandlerdb' queryparser = 'release/bin/Lib/site-packages/QueryParser.py' pyicu = 'release/bin/Lib/site-packages/PyICU.py' pyluce...
queryparser = 'release/lib/python2.4/site-packages/QueryParser.py'
def generateDocs(options, outputDir): if options.verbose: verbosity = 4 else: verbosity = 1 if sys.platform == 'cygwin' or os.name == 'nt': chandlerdb = 'release/bin/Lib/site-packages/chandlerdb' queryparser = 'release/bin/Lib/site-packages/QueryParser.py' pyicu = 'release/bin/Lib/site-packages/PyICU.py' pyluce...
queryparser = os.path.join(chandlerBin, queryparser)
def generateDocs(options, outputDir): if options.verbose: verbosity = 4 else: verbosity = 1 if sys.platform == 'cygwin' or os.name == 'nt': chandlerdb = 'release/bin/Lib/site-packages/chandlerdb' queryparser = 'release/bin/Lib/site-packages/QueryParser.py' pyicu = 'release/bin/Lib/site-packages/PyICU.py' pyluce...
queryparser,
def generateDocs(options, outputDir): if options.verbose: verbosity = 4 else: verbosity = 1 if sys.platform == 'cygwin' or os.name == 'nt': chandlerdb = 'release/bin/Lib/site-packages/chandlerdb' queryparser = 'release/bin/Lib/site-packages/QueryParser.py' pyicu = 'release/bin/Lib/site-packages/PyICU.py' pyluce...
self.model.size['x'] = event.GetPosition().x self.model.size['y'] = event.GetPosition().y
def OnMove(self, event): self.model.size['x'] = event.GetPosition().x self.model.size['y'] = event.GetPosition().y """ Calling Skip causes wxWindows to continue processing the event, which will cause the parent class to get a crack at the event. """ event.Skip()
self.model.size['width'] = event.GetSize().x self.model.size['height'] = event.GetSize().y
def OnSize(self, event): self.model.size['width'] = event.GetSize().x self.model.size['height'] = event.GetSize().y """ Calling Skip causes wxWindows to continue processing the event, which will cause the parent class to get a crack at the event. """ event.Skip()
screenSize = wxDisplaySize ()
screenSize = wxClientDisplayRect ()
def MoveOntoScreen(self): """ Check to see if the window location is off screen and moves it onto screen. The code below is currently a place holder. It will change depending on how we handle multiple windows (e.g. tiling), multiple monitors and various error conditions, like changing monitor size and windows off the s...
if self.model.size['x'] < 0 or \ self.model.size['y'] < 0 or \ self.model.size['x'] + self.model.size['width'] > screenSize[0] or \ self.model.size['y'] + self.model.size['height'] > screenSize[1]:
if self.model.size['x'] < screenSize[0] or \ self.model.size['y'] < screenSize[1] or \ self.model.size['x'] + self.model.size['width'] > screenSize[2] or \ self.model.size['y'] + self.model.size['height'] > screenSize[3]:
def MoveOntoScreen(self): """ Check to see if the window location is off screen and moves it onto screen. The code below is currently a place holder. It will change depending on how we handle multiple windows (e.g. tiling), multiple monitors and various error conditions, like changing monitor size and windows off the s...
return dt.date()
return datetime.datetime(dt.year, dt.month, dt.day)
def convertToUTC(dt, asDate = False, tz = None): """Convert the given datetime (without tz) into datetime with tzinfo=UTC. >>> import datetime >>> dt = datetime.datetime(2004, 12, 20, 12) >>> dt = convertToUTC(dt, pacific) >>> print dt 2004-12-20 20:00:00+00:00 """ if tz is None: tz = localtime if asDate: return dt.d...
self.setFreeBusy(None)
def wxSynchronizeWidget(self): style = wx.minical.CAL_SUNDAY_FIRST | wx.minical.CAL_SHOW_SURROUNDING_WEEKS | wx.minical.CAL_SHOW_BUSY if '__WXMAC__' in wx.PlatformInfo: style |= wx.BORDER_SIMPLE else: style |= wx.BORDER_STATIC if isMainCalendarVisible() and self.blockItem.doSelectWeek: style |= wx.minical.CAL_HIGHLIGH...
wasEmpty = false
def SynchronizeView(self): """ Notifies the window's wxPython counterpart that they need to synchronize themselves to match their peristent model counterpart. Whenever the application's URLTree is changed, the sidebar is notified with the SynchronizeView to update the sideBarURLTree to reflect changes """ if not app.as...
wasEmpty = true self.__UpdateURLTree(self.sideBarURLTree, '', wxWindow.root, wasEmpty) def __UpdateURLTree(self, sideBarLevel, parentUri, parentItem, wasEmpty=false):
self.__UpdateURLTree(self.sideBarURLTree, '', wxWindow.root) def __UpdateURLTree(self, sideBarLevel, parentUri, parentItem):
def SynchronizeView(self): """ Notifies the window's wxPython counterpart that they need to synchronize themselves to match their peristent model counterpart. Whenever the application's URLTree is changed, the sidebar is notified with the SynchronizeView to update the sideBarURLTree to reflect changes """ if not app.as...
if wasEmpty:
if not wxWindow.uriDictMap.has_key(uri):
def __UpdateURLTree(self, sideBarLevel, parentUri, parentItem, wasEmpty=false): """ Synchronizes the sideBar's URLTree with the application's URLTree. The sideBar only stores a dict mapping visible items in the sideBar to their instances in the application. """ wxWindow = app.association[id(self)] uriList = app.model...
uri + '/', itemId, wasEmpty)
uri + '/', itemId)
def __UpdateURLTree(self, sideBarLevel, parentUri, parentItem, wasEmpty=false): """ Synchronizes the sideBar's URLTree with the application's URLTree. The sideBar only stores a dict mapping visible items in the sideBar to their instances in the application. """ wxWindow = app.association[id(self)] uriList = app.model...
item = wxWindow.GetItemFromUri(uri) if item != None: wxWindow.Expand(item) return true return false
return wxWindow.ExpandUri(uri)
def ExpandUri(self, uri): """ Expands the item representing the given uri. Will also expand any ancestors of the item representing the supplied uri. Returns true if the expansion was successful, false otherwise. """ wxWindow = app.association[id(self)] item = wxWindow.GetItemFromUri(uri) if item != None: wxWindow.Exp...
item = wxWindow.GetItemFromUri(uri) if item != None: wxWindow.Collapse(item) return true return false
return wxWindow.CollapseUri(uri)
def CollapseUri(self, uri): """ Collapses the item representing the given uri. Returns true if the collapse was successful, false otherwise. """ wxWindow = app.association[id(self)] item = wxWindow.GetItemFromUri(uri) if item != None: wxWindow.Collapse(item) return true return false
item = wxWindow.GetItemFromUri(uri) if item != None: wxWindow.SetItemTextColour(item, color) return true return false
return wxWindow.SetUriColor(uri)
def SetUriColor(self, uri, color): """ Changes the color of the item representing the uri. Will also expand any ancestors of the item representing the supplied uri. Returns true if the color was successfully set, false otherwise. """ wxWindow = app.association[id(self)] item = wxWindow.GetItemFromUri(uri) if item != N...
item = wxWindow.GetItemFromUri(uri) if item != None: wxWindow.SetItemBold(item, isBold) return true return false class URLTreeEntry:
return wxWindow.SetUriBold(uri) class URLTreeEntry(Persistent):
def SetUriBold(self, uri, isBold=true): """ Sets whether or not the item representing the uri should be bold. Will also expand any ancestors of the item representing the supplied uri. Returns true if the bold state of the item was successfully set, false otherwise. """ wxWindow = app.association[id(self)] item = wxWin...
def GetItemFromUri(self, uri):
def __GetItemFromUri(self, uri):
def GetItemFromUri(self, uri): if not self.uriDictMap.has_key(uri): urlTree = app.model.URLTree if urlTree.UriExists(uri): fields = uri.split('/') self.__DoExpandUri(fields, self.model.sideBarURLTree) else: return None return self.uriDictMap[uri]
if module == 'chandler': print 'Nothing to be done for module', module log.write('Nothing to be done for module ' + module + '\n') log.write(separator) continue
if module == 'chandler' and not svnChanges['external'] and not svnChanges['internal']: makeTargets = dbgStr + " " + clean + " install purge"
def doBuild(buildmode, workingDir, log, svnChanges, clean='realclean'): # We only build external if there were changes in it # We build internal if external or internal were changed # We never build in chandler, because there is nothing to build if buildmode == "debug": dbgStr = "DEBUG=1" else: dbgStr = "" buildRoot =...
print "Doing make " + dbgStr + " " + clean + " world\n" log.write("Doing make " + dbgStr + " " + clean + " world\n") outputList = hardhatutil.executeCommandReturnOutput( [buildenv['make'], dbgStr, clean, "world"])
print "Doing make " + makeTargets + "\n" log.write("Doing make " + makeTargets + "\n") outputList = hardhatutil.executeCommandReturnOutput( [buildenv['make'], makeTargets])
def doBuild(buildmode, workingDir, log, svnChanges, clean='realclean'): # We only build external if there were changes in it # We build internal if external or internal were changed # We never build in chandler, because there is nothing to build if buildmode == "debug": dbgStr = "DEBUG=1" else: dbgStr = "" buildRoot =...