rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
for oldItem in oldMenuList: | for oldItem in menuList: | def synchronizeItems(self): """ Install the menus into supplied menu list, and submenus into their menu items. """ oldMenuList = self.widget.getMenuItems () index = 0 for menuItem in self.dynamicChildren: # ensure that the menuItem has been instantiated if not hasattr (menuItem, "widget"): menuItem.widget = menuItem.i... |
count = self.__len__(True) | try: count = self.__len__(True) except: logger.exception("Length of indexed value %s installed on attribute '%s' of %s couldn't be determined because of an error", self, attribute, item._repr_()) return False | def _checkIndexes(self, logger, item, attribute, repair): |
trash = schema.ns('osaf.pim', self.itsView).trashCollection | def _sourcesChanged_(self, op): source = self.source trash = schema.ns('osaf.pim', self.itsView).trashCollection | |
elif (isinstance(source, WrapperCollection) and trash not in source.sources): | elif isinstance(source, WrapperCollection): | def _sourcesChanged_(self, op): source = self.source trash = schema.ns('osaf.pim', self.itsView).trashCollection |
set = Difference(source, trash) | trash = schema.ns('osaf.pim', self.itsView).trashCollection for item, attribute in source.iterSources(True): if item is trash and attribute == trash.__collection__: set = Set(source) break else: set = Difference(source, trash) | def _sourcesChanged_(self, op): source = self.source trash = schema.ns('osaf.pim', self.itsView).trashCollection |
self.assert_(self.alias.type(True) is None) | def testType(self): | |
self.assert_(not self.alias.recognizes(True)) | def testRecognizes(self): | |
platform = 'macosx' | if platform.processor() == 'i386': platform = 'maciosx' else: platform = 'macosx' | def UploadToStaging(nowString, log, rsyncProgram, rsyncServer): timestamp = nowString.replace("-", "") timestamp = timestamp.replace(":", "") timestamp = timestamp.replace(" ", "") if not os.path.isdir(timestamp): print "skipping rsync to staging area, no dir", timestamp log.write("skipping rsync to staging area, no d... |
self.item.removeValue(attrName, key) | self.item.removeValue(attrName, key=key) | def unapplyAssignments(self): """ Do whatever needs to be done to the item to "remove" this assignment. """ for (attrName, value, key) in self.getAssignments(): card = self.item.getAttributeAspect(attrName, "cardinality") if card == "dict": print "Reload: item %s, unassigning %s[%s] = '%s'" % \ (self.item.itsPath, attr... |
def CreateControl(self, forEditing, readOnly, parentWidget, id, parentBlock, font): panel = ScrolledPanel(parentWidget, id, style=wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER) box = wx.BoxSizer(wx.VERTICAL) bitmap = wx.StaticBitmap(panel, id, wx.NullBitmap, (0, 0)) box.Add(bitmap) panel.SetSizer(box) panel.SetAutoLayout(1) panel.... | def CreateControl(self, forEditing, readOnly, parentWidget, id, parentBlock, font): return wx.StaticBitmap(parentWidget, id, wx.NullBitmap, (0, 0)) | def CreateControl(self, forEditing, readOnly, parentWidget, id, parentBlock, font): panel = ScrolledPanel(parentWidget, id, style=wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER) box = wx.BoxSizer(wx.VERTICAL) bitmap = wx.StaticBitmap(panel, id, wx.NullBitmap, (0, 0)) box.Add(bitmap) panel.SetSizer(box) panel.SetAutoLayout(1) panel.... |
return wx.BitmapFromImage(wx.ImageFromStream(stream)) | image = wx.ImageFromStream(stream) return wx.BitmapFromImage(image) | def __getBitmapFromLob(self, attributeValue): input = attributeValue.getInputStream() data = input.read() input.close() stream = cStringIO.StringIO(data) return wx.BitmapFromImage(wx.ImageFromStream(stream)) |
if hasattr(self, "iAmInitialized"): return self.iAmInitialized = True | def BeginControlEdit(self, item, attributeName, control): | |
control.myBitmapControl.SetBitmap(bmp) control.SetupScrolling() | control.SetBitmap(bmp) | def BeginControlEdit(self, item, attributeName, control): |
self.SetSelection(-1, -1) | def SetItem(self, item, position, size, pointSize): self.item = item self.SetValue(item.displayName) | |
if ret == 'success' and not skipTests: ret = doFunctionalTests(workingDir, log) | ret = doFunctionalTests(releaseMode, workingDir, log) if ret != 'success': break | def Start(hardhatScript, workingDir, buildVersion, clobber, log, skipTests=False, upload=False, branchID=None, revID=None): global buildenv, changes try: buildenv = hardhatlib.defaults buildenv['root'] = workingDir buildenv['hardhatroot'] = whereAmI hardhatlib.init(buildenv) except hardhatlib.HardHatMissingCompilerE... |
if ret == 'success': ret = doFunctionalTests(workingDir, log) | ret = doFunctionalTests(releaseMode, workingDir, log) if ret != 'success': break | def Start(hardhatScript, workingDir, buildVersion, clobber, log, skipTests=False, upload=False, branchID=None, revID=None): global buildenv, changes try: buildenv = hardhatlib.defaults buildenv['root'] = workingDir buildenv['hardhatroot'] = whereAmI hardhatlib.init(buildenv) except hardhatlib.HardHatMissingCompilerE... |
print "a testing error" | print "a testing error", e | def doTests(hardhatScript, mode, workingDir, outputDir, buildVersion, log): testDir = os.path.join(workingDir, "chandler") os.chdir(testDir) if mode == "debug": dashT = '-dvt' else: dashT = '-vrt' try: # test print "Testing " + mode log.write(separator) log.write("Testing " + mode + " ...\n") print "hardhatScript [... |
def doFunctionalTests(workingDir, log): testDir = os.path.join(workingDir, "chandler") os.chdir(testDir) try: | def doFunctionalTests(releaseMode, workingDir, log): hardhatlib.setupEnvironment(buildenv) chandlerDir = os.path.join(workingDir, "chandler") if buildenv['os'] == 'win': runChandler = 'RunChandler.bat' else: runChandler = 'RunChandler' if releaseMode == 'debug': runChandler = os.path.join(chandlerDir, 'debug', runCh... | def doFunctionalTests(workingDir, log): testDir = os.path.join(workingDir, "chandler") os.chdir(testDir) try: # test print "Running Functional Tests" log.write(separator) log.write("Running Functional Tests ...\n") testscript = "./tools/do_tests.sh" outputList = hardhatutil.executeCommandReturnOutput([testscript, "-f... |
testscript = "./tools/do_tests.sh" outputList = hardhatutil.executeCommandReturnOutput([testscript, "-f"]) | args = [runChandler, '--create', '--stderr', '--nocatch', '--profileDir=.', '--parcelPath=tools/QATestScripts/DataFiles', '--scriptTimeout=600', '--scriptFile=tools/QATestScripts/Functional/FunctionalTestSuite.py'] outputList = hardhatutil.executeCommandReturnOutput(args) | def doFunctionalTests(workingDir, log): testDir = os.path.join(workingDir, "chandler") os.chdir(testDir) try: # test print "Running Functional Tests" log.write(separator) log.write("Running Functional Tests ...\n") testscript = "./tools/do_tests.sh" outputList = hardhatutil.executeCommandReturnOutput([testscript, "-f... |
print "a testing error" | print "functional tests failed", e | def doFunctionalTests(workingDir, log): testDir = os.path.join(workingDir, "chandler") os.chdir(testDir) try: # test print "Running Functional Tests" log.write(separator) log.write("Running Functional Tests ...\n") testscript = "./tools/do_tests.sh" outputList = hardhatutil.executeCommandReturnOutput([testscript, "-f... |
testDir = os.path.join(chandlerDir, 'util', 'QATestScripts', 'Performance') | testDir = os.path.join(chandlerDir, 'tools', 'QATestScripts', 'Performance') | def doPerformanceTests(hardhatScript, mode, workingDir, outputDir, buildVersion, log): hardhatlib.setupEnvironment(buildenv) chandlerDir = os.path.join(workingDir, "chandler") testDir = os.path.join(chandlerDir, 'util', 'QATestScripts', 'Performance') if buildenv['version'] == 'debug': python = buildenv['python_d... |
print "a testing error" | print "perf testing error", e | def doPerformanceTests(hardhatScript, mode, workingDir, outputDir, buildVersion, log): hardhatlib.setupEnvironment(buildenv) chandlerDir = os.path.join(workingDir, "chandler") testDir = os.path.join(chandlerDir, 'util', 'QATestScripts', 'Performance') if buildenv['version'] == 'debug': python = buildenv['python_d... |
if progressMonitor: progressMonitor.totalWork *= 2 | def publish(collection, account, classesToInclude=None, publishType = 'collection', attrsToExclude=None, displayName=None, updateCallback=None): """ Publish a collection, automatically determining which conduits/formats to use, and how many @type collection: pim.ContentCollection @param collection: The collection to p... | |
subShare.create() share.follows = subShare | try: subShare.create() share.follows = subShare if progressMonitor: progressMonitor.totalWork *= 2 except SharingError: subShare.delete(True) subShare = None | def publish(collection, account, classesToInclude=None, publishType = 'collection', attrsToExclude=None, displayName=None, updateCallback=None): """ Publish a collection, automatically determining which conduits/formats to use, and how many @type collection: pim.ContentCollection @param collection: The collection to p... |
XMLBinary.__init__(self, *args, **kwds) | Binary.__init__(self, *args, **kwds) | def __init__(self, view, *args, **kwds): |
displayName=u"Channel has been established", | def __init__(self, *args, **kw): super(FeedChannel, self).__init__(*args, **kw) self.addIndex('link', 'value', attribute='link') | |
displayName=u"Previous update was successful", | def __init__(self, *args, **kw): super(FeedChannel, self).__init__(*args, **kw) self.addIndex('link', 'value', attribute='link') | |
if not locQuery: | if locQuery is None: | 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... |
control.SetValue(text) | oldValue = control.GetValue() if oldValue != text: control.SetValue(text) | def __shadeBetween(shade, color1, color2): shade1 = shade(color1) shade2 = shade(color2) smaller = min(shade1, shade2) delta = abs(shade1 - shade2) return smaller + (delta / 2) |
webbrowser.open(link.GetHref()) | wx.LaunchDefaultBrowser(link.GetHref()) | def OnLinkClicked(self, link): """ Called whenever a link on the splash screen is clicked. Opens that url in the user's default web browser. """ self.linked = True webbrowser.open(link.GetHref()) |
labels = {self.cancelButton : messages.CANCEL, self.allButton : _(u'All events'), self.futureButton : _(u'All future events'), self.thisButton : _(u'Just this event')} for item, label in labels.iteritems(): item.SetLabel(label) | def __init__(self, parent, proxy, cancelCallback = None): self.proxy = proxy self.cancelCallback = cancelCallback self._init_ctrls(parent) labels = {self.cancelButton : messages.CANCEL, self.allButton : _(u'All events'), self.futureButton : _(u'All future events'), self.thisButton : _(u'Just this event')} | |
r = self.newConnection().head(unicode(self.url)) | r = self.__request('head', unicode(self.url)) | def getHeaders(self): """ Perform a HTTP HEAD operation """ r = self.newConnection().head(unicode(self.url)) if r.status == 404: raise NotFound return r |
return self.newConnection().put(unicode(self.url), body, type, None) | return self.__request('put', unicode(self.url), body, type, None) | def putResource(self, body, type='text/plain'): """ Perform a HTTP PUT operation """ return self.newConnection().put(unicode(self.url), body, type, None) # return status.. or maybe just throw an exception if the put failed |
return self.newConnection().delete(unicode(self.url)) | return self.__request('delete', unicode(self.url)) | def deleteResource(self): """ Perform a WebDAV DELETE operation """ return self.newConnection().delete(unicode(self.url)) |
r = self.newConnection().propfind(unicode(self.url), body, depth) | r = self.__request('propfind', unicode(self.url), body, depth) | def getProps(self, body, depth=0): """ Perform a WebDAV PROPFIND operation """ r = self.newConnection().propfind(unicode(self.url), body, depth) if r.status == 404: raise NotFound return r |
r = self.newConnection().setprops2(unicode(self.url), props) | r = self.__request('setprops2', unicode(self.url), props) | def setProps(self, props): """ Perform a WebDAV PROPPATCH """ r = self.newConnection().setprops2(unicode(self.url), props) log.debug('PROPPATCH returned:') log.debug(r.read()) if r.status == 404: raise NotFound return r |
if sources and sources.first() is not source: | if sources: if sources.first() is source: return | def _setSource(self, source): sources = self.sources if sources and sources.first() is not source: sources.clear() if source is not None: sources.append(source) |
_colBorderSize = 0 | def GetAttr (self, row, column, kind): attribute = self.base_GetAttr (row, column, kind) if not attribute: type = self.GetTypeName (row, column) delegate = IAttributeEditor.GetAttributeEditorSingleton (type) attribute = self.defaultROAttribute """ An apparent bug in table asks for an attribute even when there are no en... | |
self._colBorderSize = wx.SystemSettings_GetMetric(wx.SYS_BORDER_X) * 2 | def __init__(self, *arguments, **keywords): """ the borders of the column headers are not being counted towards the width of a column, so need to remember to add the left/right borders when doing certain column width calculations """ self._colBorderSize = wx.SystemSettings_GetMetric(wx.SYS_BORDER_X) * 2 """ Giant hac... | |
size = self.GetClientSize() | size = event.GetSize() | def OnSize(self, event): if not wx.GetApp().ignoreSynchronizeWidget: size = self.GetClientSize() widthMinusLastColumn = 0 |
widthMinusLastColumn += self.GetColSize (column) + self._colBorderSize | widthMinusLastColumn += self.GetColSize (column) | def OnSize(self, event): if not wx.GetApp().ignoreSynchronizeWidget: size = self.GetClientSize() widthMinusLastColumn = 0 |
lastColumnWidth -= self._colBorderSize if lastColumnWidth > 0 and lastColumnIndex > 0: | if lastColumnWidth > 0: | def OnSize(self, event): if not wx.GetApp().ignoreSynchronizeWidget: size = self.GetClientSize() widthMinusLastColumn = 0 |
self.ForceRefresh() | def OnSize(self, event): if not wx.GetApp().ignoreSynchronizeWidget: size = self.GetClientSize() widthMinusLastColumn = 0 | |
widthMinusLastColumn += self.blockItem.columnWidths[columnIndex] + self._colBorderSize | widthMinusLastColumn += self.blockItem.columnWidths[columnIndex] | def wxSynchronizeWidget(self): """ A Grid can't easily redisplay its contents, so we write the following helper function to readjust everything after the contents change """ #Trim/extend the control's rows and update all values |
remaining = self.GetClientSize().width - widthMinusLastColumn remaining -= self._colBorderSize | remaining = self.GetSize().width - widthMinusLastColumn """ Big fat hack. Since the grid is a scrolled window we set a border equal to the size of the scrollbar so the scroll bars won't show. Instead we should consider modifying grid adding a new style for not showing scrollbars. Bug """ remaining = remaining - wx.Sys... | def wxSynchronizeWidget(self): """ A Grid can't easily redisplay its contents, so we write the following helper function to readjust everything after the contents change """ #Trim/extend the control's rows and update all values |
logger.debug(_(u"Conflict during sync on item %(item)s, attribute " "%(attribute)s") % { | logger.debug("Conflict during sync on item %(item)s, attribute " "%(attribute)s" % { | def mergeFunction(code, item, attribute, value): |
updateCallback(msg=_(u"Incomplete Event Detected: '%s'") % item.getItemDisplayName()) | updateCallback(msg=_(u"Incomplete Event Detected: '%(name)s'") % { 'name': item.getItemDisplayName() } ) | def mergeFunction(code, item, attribute, value): |
if updateCallback and updateCallback(msg=_(u"Uploading to %s...") % contentsName): | if updateCallback and updateCallback(msg=_(u"Uploading to " "%(name)s...") % { 'name' : contentsName } ): | def _put(self, updateCallback=None): """ Transfer entire 'contents', transformed, to server. """ |
logger.debug(_(u'Removing an unparsable resource from the resourceList: %(path)s') % { 'path' : path }) | logger.debug('Removing an unparsable resource from the resourceList: %(path)s' % { 'path' : path }) | def _put(self, updateCallback=None): """ Transfer entire 'contents', transformed, to server. """ |
if updateCallback and updateCallback(msg=_(u"Removing item from server: '%s'") % path): | if updateCallback and updateCallback(msg=_(u"Removing item from server: '%(path)s'") % { 'path' : path }): | def _put(self, updateCallback=None): """ Transfer entire 'contents', transformed, to server. """ |
logger.debug(_(u'Item removed locally, so removing from server: %(path)s') % { 'path' : path }) | logger.debug('Item removed locally, so removing from server: %(path)s' % { 'path' : path }) | def _put(self, updateCallback=None): """ Transfer entire 'contents', transformed, to server. """ |
getPhrase = _(u"Downloading from %s...") | getPhrase = _(u"Downloading from %(name)s...") | def _get(self, previousView=None, updateCallback=None, getPhrase = None): |
contentsName): | { 'name' : contentsName } ): | def _get(self, previousView=None, updateCallback=None, getPhrase = None): |
logger.debug(_(u'Item removed locally, so not fetching from server: %(path)s') % { 'path' : path }) | logger.debug("Item removed locally, so not " "fetching from server: %(path)s" % { 'path' : path } ) | def _get(self, previousView=None, updateCallback=None, getPhrase = None): |
if updateCallback and updateCallback(msg=_(u"Removing from collection: '%s'") % item.getItemDisplayName()): | if updateCallback and updateCallback( msg=_(u"Removing from collection: '%(name)s'") % { 'name' : item.getItemDisplayName() } ): | def _get(self, previousView=None, updateCallback=None, getPhrase = None): |
getPhrase = _(u"Importing from %s...") | getPhrase = _(u"Importing from %(name)s...") | def _get(self, previousView=None, updateCallback=None, getPhrase = None): if getPhrase is None: getPhrase = _(u"Importing from %s...") return super(FileSystemConduit, self)._get(previousView, updateCallback, getPhrase) |
if updateCallback and updateCallback(msg=_(u"Checking for update: '%s'") % location): | if updateCallback and updateCallback(msg=_(u"Checking for update: '%(location)s'") % { 'location' : location } ): | def _get(self, previousView=None, updateCallback=None): |
if updateCallback and updateCallback(msg=_(u"'%s'") % location): | if updateCallback and updateCallback(msg='%s' % location): | def _get(self, previousView=None, updateCallback=None): |
logger.warning(_(u"Sharing conflict: item '%s', attr '%s', local '%s', remote '%s'") % (item.getItemDisplayName().encode('ascii', 'replace'), attribute, getattr(item, attribute, None), value)) | logger.warning("Sharing conflict: item '%s', attr '%s', " "local '%s', remote '%s'" % (item.getItemDisplayName().encode('ascii', 'replace'), attribute, getattr(item, attribute, None), value)) | def importValue(item, changes, attribute, value, previousView, updateCallback=None, setCallback=None): """ Conditionally set a value (brought in via the sharing layer) on an item, depending on whether the new value is different than the old one, and whether the value has really changed remotely since the last sync. Con... |
updateCallback(msg=_(u"Conflict for item '%s' attribute: %s '%s' vs '%s'") % (item.getItemDisplayName(), attribute, getattr(item, attribute), value)) | updateCallback( msg=_(u"Conflict for item '%(name)s' " "attribute: %(attribute)s '%(local)s' vs '%(remote)s'") % ( { 'name' : item.getItemDisplayName(), 'attribute' : attribute, 'local' : getattr(item, attribute), 'remote' : value } ) ) | def importValue(item, changes, attribute, value, previousView, updateCallback=None, setCallback=None): """ Conditionally set a value (brought in via the sharing layer) on an item, depending on whether the new value is different than the old one, and whether the value has really changed remotely since the last sync. Con... |
logger.info(_(u"Sharing change: item '%s', attr '%s', value '%s'") % (item.getItemDisplayName(), attribute, value)) | logger.info("Sharing change: item '%s', attr '%s', value '%s'" % (item.getItemDisplayName().encode('ascii', 'replace'), attribute, value)) | def importValue(item, changes, attribute, value, previousView, updateCallback=None, setCallback=None): """ Conditionally set a value (brought in via the sharing layer) on an item, depending on whether the new value is different than the old one, and whether the value has really changed remotely since the last sync. Con... |
path = self.path + os.sep + modulename + ".xrc" | path = module.__file__.split(os.sep) path = path[:-1] path = os.sep.join(path) path = path + os.sep + modulename + ".xrc" | def synchronizeView (self): wxMainFrame = app.association[id(app.model.mainFrame)] """ If it isn't in the association we need to construct it and put it in the association. """ if not app.association.has_key(id(self)): module = sys.modules[self.__class__.__module__] modulename = os.path.basename (module.__file__) modul... |
if i not in list: | if i not in localList: | def mergeList(item, attrName, nodes, nodesAreItemRefs): list = item.getAttributeValue(attrName, default=[]) serverList = [] for node in nodes: if nodesAreItemRefs: INC_OFFSET() try: value = Dav.DAV(node.content).get() except Dav.NotFound: value = None DEC_OFFSET() else: value = node.content if value: serverList.appen... |
for i in localList: if i not in serverList: item.removeValue(attrName, i) log.info('%sremoving %s from list %s' % (OFFSET(), i, item)) | def mergeList(item, attrName, nodes, nodesAreItemRefs): list = item.getAttributeValue(attrName, default=[]) serverList = [] for node in nodes: if nodesAreItemRefs: INC_OFFSET() try: value = Dav.DAV(node.content).get() except Dav.NotFound: value = None DEC_OFFSET() else: value = node.content if value: serverList.appen... | |
msgHeight = 20 gaugeHeight = 15 gaugeBorder = 1 gaugeWidth = min(300, width - 100) padding = 5 frameSize = wx.Size(width, height + msgHeight + gaugeHeight + 2*padding) wx.Frame.__init__(self, size=frameSize, parent=parent, style=wx.SIMPLE_BORDER) | padding = 7 fontsize = 12 super(StartupSplash, self).__init__(parent=parent, style=wx.SIMPLE_BORDER) sizer = wx.BoxSizer(wx.VERTICAL) self.SetSizer(sizer) | def __init__(self, parent, bmp): height = bmp.GetHeight() width = bmp.GetWidth() msgHeight = 20 gaugeHeight = 15 gaugeBorder = 1 gaugeWidth = min(300, width - 100) padding = 5 frameSize = wx.Size(width, height + msgHeight + gaugeHeight + 2*padding) wx.Frame.__init__(self, size=frameSize, parent=parent, style=wx.SIMPLE_... |
self.gaugeTicks = reduce(lambda x, y: x + y[0], self.statusTable.values(), 0) wx.StaticBitmap(self, -1, bmp, wx.Point(0, 0), wx.Size(width, height)) self.progressText = wx.StaticText(self, -1, u"", wx.Point(0, height + padding), wx.Size(width, msgHeight), wx.ALIGN_CENTRE | wx.ST_NO_AUTORESIZE) | font = wx.Font(fontsize, wx.NORMAL, wx.NORMAL, wx.NORMAL) bitmap = wx.StaticBitmap(self, -1, bmp) sizer.Add(bitmap, 0, wx.ALL, 0) self.progressText = wx.StaticText(self, -1, style=wx.ALIGN_CENTER) | def __init__(self, parent, bmp): height = bmp.GetHeight() width = bmp.GetWidth() msgHeight = 20 gaugeHeight = 15 gaugeBorder = 1 gaugeWidth = min(300, width - 100) padding = 5 frameSize = wx.Size(width, height + msgHeight + gaugeHeight + 2*padding) wx.Frame.__init__(self, size=frameSize, parent=parent, style=wx.SIMPLE_... |
gaugeBox = wx.Window(self, -1, wx.Point((width - gaugeWidth)/2, height + msgHeight + padding), wx.Size(gaugeWidth, gaugeHeight)) gaugeBox.SetBackgroundColour(wx.BLACK) self.gauge = wx.Gauge(gaugeBox, -1, range = self.gaugeTicks, style = wx.GA_HORIZONTAL, pos = (gaugeBorder, gaugeBorder), size = (gaugeWidth - 2 * gau... | progressSizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(progressSizer, 1, wx.EXPAND) progressSizer.Add((padding, padding), 1, wx.EXPAND) progressSizer.Add(self.progressText, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.BOTTOM, padding) self.progressText.SetFont(font) self.progressPercent = wx.StaticText(self, -1, style=wx.ALIGN... | def __init__(self, parent, bmp): height = bmp.GetHeight() width = bmp.GetWidth() msgHeight = 20 gaugeHeight = 15 gaugeBorder = 1 gaugeWidth = min(300, width - 100) padding = 5 frameSize = wx.Size(width, height + msgHeight + gaugeHeight + 2*padding) wx.Frame.__init__(self, size=frameSize, parent=parent, style=wx.SIMPLE_... |
self.gauge.SetValue(self.completedTicks + self.timerTicks) | self.workingTicks = self.statusTable[type][0] | def updateGauge(self, type): if type == 'timer': #currently unused if self.timerTicks < self.workingTicks: self.timerTicks += 1 self.gauge.SetValue(self.completedTicks + self.timerTicks) else: self.timerTicks = 0 self.completedTicks += self.workingTicks self.gauge.SetValue(self.completedTicks + self.timerTicks) self.pr... |
self.workingTicks = self.statusTable[type][0] | percentString = _(u"%(percent)d%%") % {'percent' : self.completedTicks + self.timerTicks} self.progressPercent.SetLabel(percentString) self.Layout() | def updateGauge(self, type): if type == 'timer': #currently unused if self.timerTicks < self.workingTicks: self.timerTicks += 1 self.gauge.SetValue(self.completedTicks + self.timerTicks) else: self.timerTicks = 0 self.completedTicks += self.workingTicks self.gauge.SetValue(self.completedTicks + self.timerTicks) self.pr... |
def onReplyOrForWardEvent(self, replyMethod): | def onReplyOrForwardEvent(self, replyMethod): | def onReplyOrForWardEvent(self, replyMethod): pim_ns = schema.ns('osaf.pim', self.itsView) main = schema.ns("osaf.views.main", self.itsView) selection = self.__getSelectedItems() replyMessage = None replyCollection = None # Note that this skips over any non-inbox items, so you # *could* select-all-reply for selectedIte... |
self.onReplyOrForWardEvent(Mail.replyToMessage) | self.onReplyOrForwardEvent(Mail.replyToMessage) | def onReplyEvent(self, event): self.onReplyOrForWardEvent(Mail.replyToMessage) |
self.onReplyOrForWardEvent(Mail.replyAllToMessage) | self.onReplyOrForwardEvent(Mail.replyAllToMessage) | def onReplyAllEvent(self, event): self.onReplyOrForWardEvent(Mail.replyAllToMessage) |
self.onReplyOrForWardEvent(Mail.forwardMessage) | self.onReplyOrForwardEvent(Mail.forwardMessage) | def onForwardEvent(self, event): self.onReplyOrForWardEvent(Mail.forwardMessage) |
event.Skip() | def OnEnterPressed(self, event): self.blockItem.Post (Globals.repository.findPath('//parcels/osaf/framework/blocks/Events/EnterPressed'), {'text':self.GetValue()}) | |
deltaMinutes = roundTo(deltaMinutes, 15) | deltaMinutes = round(float(deltaMinutes)/15)*15 | def getRelativeTimeFromPosition(self, drawInfo, position): """ Get just the hours/minutes from the canvas """ deltaHours = position.y / self.hourHeight deltaMinutes = ((position.y % self.hourHeight) * 60) / self.hourHeight deltaMinutes = roundTo(deltaMinutes, 15) return timedelta(hours=deltaHours, minutes=deltaMinutes)... |
parcelSearchPath = os.path.join(parcelSearchPath, debugParcelDir) | parcelSearchPath = parcelSearchPath + os.pathsep + debugParcelDir | def _displayHook(obj): sys.stdout.write(str(obj)) |
'Chandler') | 'Chandler', '0.7') | def _makeRandomProfileDir(pattern): chars = string.letters + string.digits name = ''.join([chars[ord(c) % len(chars)] for c in os.urandom(8)]) profileDir = pattern.replace('*', '%s') %(name) createProfileDir(profileDir) return profileDir |
profileDir = os.path.join(dataDir, '.chandler') | profileDir = os.path.join(dataDir, '.chandler', '0.7') | def _makeRandomProfileDir(pattern): chars = string.letters + string.digits name = ''.join([chars[ord(c) % len(chars)] for c in os.urandom(8)]) profileDir = pattern.replace('*', '%s') %(name) createProfileDir(profileDir) return profileDir |
script = None fileName = u"" if Globals.options.testScripts: try: for aScript in Script.iterItems(view): if aScript.test: aScript.execute(fileName=fileName) finally: schema.ns('osaf.app', view).CleanupAfterTests.execute() if Globals.options.scriptFile: scriptFileText = script_file(Globals.options.scriptFile) if scrip... | if Globals.options.testScripts: try: for aScript in Script.iterItems(view): if aScript.test: aScript.execute() finally: schema.ns('osaf.app', view).CleanupAfterTests.execute() fileName = Globals.options.scriptFile if fileName: scriptFileText = script_file(fileName) if scriptFileText: run_script(scriptFileText, fileNa... | def run_startup_script(view): script = None fileName = u"" # assume no source file if Globals.options.testScripts: try: for aScript in Script.iterItems(view): if aScript.test: aScript.execute(fileName=fileName) finally: # run the cleanup script schema.ns('osaf.app', view).CleanupAfterTests.execute() if Globals.options... |
if type_states[type].isOfValue == value: | if type_states[type]['isOfType'] == value: | 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_states = {"Mail": dict(isOfType=self.isMailMessage, button="MailMessageButton"),... |
for field in dict.keys(): | for field,value in dict.iteritems(): | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("HeadlineBlock", "display name", dict[field]) | self.CheckEditableBlock("HeadlineBlock", "display name", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditCalendarStartDate", "start date", self.formatDate(dict[field])) | self.CheckEditableBlock("EditCalendarStartDate", "start date", self.formatDate(value)) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditCalendarStartTime", "start time", dict[field]) | self.CheckEditableBlock("EditCalendarStartTime", "start time", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditCalendarEndDate", "end date", self.formatDate(dict[field])) | self.CheckEditableBlock("EditCalendarEndDate", "end date", self.formatDate(value)) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditCalendarEndTime", "end time", dict[field]) | self.CheckEditableBlock("EditCalendarEndTime", "end time", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("CalendarLocation", "location", dict[field]) | self.CheckEditableBlock("CalendarLocation", "location", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("NotesBlock", "body", dict[field]) | self.CheckEditableBlock("NotesBlock", "body", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditMailFrom", "from address", dict[field]) | self.CheckEditableBlock("EditMailFrom", "from address", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditMailTo", "to address", dict[field]) | self.CheckEditableBlock("EditMailTo", "to address", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditMailCc", "cc address", dict[field]) | self.CheckEditableBlock("EditMailCc", "cc address", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditMailBcc", "bcc address", dict[field]) | self.CheckEditableBlock("EditMailBcc", "bcc address", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckMenuBlock("EditTransparency", "status", dict[field]) | self.CheckMenuBlock("EditTransparency", "status", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckMenuBlock("EditTimeZone", "time-zone", dict[field]) | self.CheckMenuBlock("EditTimeZone", "time-zone", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckMenuBlock("EditRecurrence", "recurrence", dict[field]) | self.CheckMenuBlock("EditRecurrence", "recurrence", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditRecurrenceEnd", "recurrence end", self.formatDate(dict[field])) | self.CheckEditableBlock("EditRecurrenceEnd", "recurrence end", self.formatDate(value)) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckMenuBlock("EditReminder", "alarm", dict[field]) | self.CheckMenuBlock("EditReminder", "alarm", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckEditableBlock("EditAllDay", "all-day", dict[field]) | self.CheckEditableBlock("EditAllDay", "all-day", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckButton("MailMessageButton", "mail stamp", dict[field]) | self.CheckButton("MailMessageButton", "mail stamp", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
self.CheckButton("TaskStamp", "task stamp", dict[field]) | self.CheckButton("TaskStamp", "task stamp", value) | def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.