bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def OnStop(self, event): wxPhonyApp.inMainLoop = false self.set_quit() self.model.editor.clearAllStepPoints() self.stackView.load_stack([]) | def OnStop(self, event): self.set_quit() self.model.editor.clearAllStepPoints() self.stackView.load_stack([]) | 28,300 |
def OnStop(self, event): wxPhonyApp.inMainLoop = false self.set_quit() self.model.editor.clearAllStepPoints() self.stackView.load_stack([]) | def OnStop(self, event): wxPhonyApp.inMainLoop = false self.set_quit() self.model.editor.clearAllStepPoints() self.stackView.load_stack([]) | 28,301 |
def OnCloseWindow(self, event): try: if self.interacting: # XXX mmm self.OnStop(None) self.locs.destroy() self.globs.destroy() self.breakpts.destroy() self.watches.destroy() self.model.editor.debugger = None | def OnCloseWindow(self, event): try: if self.interacting: # XXX mmm self.OnStop(None) self.locs.destroy() self.globs.destroy() self.breakpts.destroy() self.watches.destroy() self.model.editor.debugger = None | 28,302 |
def repWX2Action(self, s, l, t): a, b, c, d = t try: newWX = self.specialNames[c] return a +newWX +d except KeyError: return a +"wx." +c +d | def repWX2Action(self, s, l, t): a, b, c, d = t try: newWX = self.specialNames[c] return a +newWX +d except KeyError: return a +"wx." +c +d | 28,303 |
def OnSaveHTML(self, event): from FileDlg import wxFileDialog dlg = wxFileDialog(self, 'Save as...', '', '', '*.html', wxSAVE | wxOVERWRITE_PROMPT) try: if dlg.ShowModal() == wxID_OK: from Explorers.Explorer import openEx trpt = openEx(dlg.GetPath()) trpt.save(trpt.currentFilename(), self.data) finally: dlg.Destroy() | def OnSaveHTML(self, event): from FileDlg import wxFileDialog dlg = wxFileDialog(self, 'Save as...', '.', '', '*.html', wxSAVE | wxOVERWRITE_PROMPT) try: if dlg.ShowModal() == wxID_OK: from Explorers.Explorer import openEx trpt = openEx(dlg.GetPath()) trpt.save(trpt.currentFilename(), self.data) finally: dlg.Destroy() | 28,304 |
def writeImports(self): return 'import wx.lib.stattext.GenStaticText' | def writeImports(self): return 'import wx.lib.stattext.GenStaticText' | 28,305 |
def OnControlResize(self, event): """ Control is resized, emulate native wxWindows layout behaviour """ dsgn = self.designer try: if event.GetId() == dsgn.GetId(): if dsgn.selection: dsgn.selection.selectCtrl(dsgn, dsgn.companion) elif dsgn.multiSelection: dsgn.clearMultiSelection() dsgn.assureSingleSelection() dsgn.se... | def OnControlResize(self, event): """ Control is resized, emulate native wxWindows layout behaviour """ dsgn = self.designer try: if event.GetId() == dsgn.GetId(): if dsgn.selection: dsgn.selection.selectCtrl(dsgn, dsgn.companion) elif dsgn.multiSelection: dsgn.clearMultiSelection() dsgn.assureSingleSelection() dsgn.se... | 28,306 |
def notifyAction(self, compn, action): # notify components for otherCompn, otherCtrl, otherPrnt in self.objects.values(): otherCompn.notification(compn, action) # notify collections for collView in self.collEditors.values(): collView.companion.notification(compn, action) | def notifyAction(self, compn, action): # notify components for otherCompn, otherCtrl, otherPrnt in self.objects.values(): otherCompn.notification(compn, action) # notify collections for collView in self.collEditors.values(): collView.companion.notification(compn, action) | 28,307 |
def setupArgs(self, ctrlName, params, dontEval, parent = None, compClass = None): """ Create a dictionary of parameters for the constructor of the control from a dictionary of string/source parameters. """ | def setupArgs(self, ctrlName, params, dontEval, parent = None, compClass = None): """ Create a dictionary of parameters for the constructor of the control from a dictionary of string/source parameters. """ | 28,308 |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | 28,309 |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | 28,310 |
def saveCtrls(self, definedCtrls): """ Generate source code for Designer """ # Remove all collection methods for oc in self.model.identifyCollectionMethods(): if len(oc) > len('_init_coll_') and oc[:11] == '_init_coll_': module = self.model.getModule() module.removeMethod(self.model.main, oc) | def saveCtrls(self, definedCtrls): """ Generate source code for Designer """ # Remove all collection methods for oc in self.model.identifyCollectionMethods(): if len(oc) > len('_init_coll_') and oc[:11] == '_init_coll_': module = self.model.getModule() module.removeMethod(self.model.main, oc) | 28,311 |
def renameCtrl(self, oldName, newName): """ Rename control, references to control and update parent tree """ prel, pref = self.buildParentRelationship() # rename other ctrl references like parent | def renameCtrl(self, oldName, newName): """ Rename control, references to control and update parent tree """ prel, pref = self.buildParentRelationship() # rename other ctrl references like parent | 28,312 |
def loadControl(self, ctrlClass, ctrlCompanion, ctrlName, params): """ Create and register given control and companion. See also: newControl """ dontEval = [ctrlCompanion.windowParentName, ctrlCompanion.windowIdName] args = self.setupArgs(ctrlName, params, dontEval, compClass = ctrlCompanion) if params[ctrlCompanion... | def loadControl(self, ctrlClass, ctrlCompanion, ctrlName, params): """ Create and register given control and companion. See also: newControl """ dontEval = [ctrlCompanion.windowParentName, ctrlCompanion.windowIdName] args = self.setupArgs(ctrlName, params, dontEval, compClass = ctrlCompanion) parent = Utils.ctrlName... | 28,313 |
## def CtrlAnchored(self, ctrl): | ## def CtrlAnchored(self, ctrl): | 28,314 |
def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectCollectionView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if self.dataView.objects[objName][1].__class__ is theClass: dataResults['self.'+objNam... | def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if self.dataView.objects[objName][1].__class__ is theClass: dataResults['self.'+objName] = self.... | 28,315 |
def getAllObjects(self): """ Overridden to also add objects from the DataView """ results = InspectableObjectCollectionView.getAllObjects(self) for objName in self.dataView.objects.keys(): if objName: results['self.'+objName] = self.dataView.objects[objName][1] else: results['self'] = self.dataView.objects[objName][1] ... | def getAllObjects(self): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getAllObjects(self) for objName in self.dataView.objects.keys(): if objName: results['self.'+objName] = self.dataView.objects[objName][1] else: results['self'] = self.dataView.objects[objName][1] return res... | 28,316 |
def getAllObjects(self): """ Overridden to also add objects from the DataView """ results = InspectableObjectCollectionView.getAllObjects(self) for objName in self.dataView.objects.keys(): if objName: results['self.'+objName] = self.dataView.objects[objName][1] else: results['self'] = self.dataView.objects[objName][1] ... | def getAllObjects(self): """ Overridden to also add objects from the DataView """ results = InspectableObjectCollectionView.getAllObjects(self) for objName in self.dataView.objects.keys(): results[Utils.srcRefFromCtrlName(objName)] = \ self.dataView.objects[objName][1] return results | 28,317 |
def deleteCtrl(self, name, parentRef = None): """ Delete a control, update selection and parent tree """ ctrlInfo = self.objects[name] if ctrlInfo[1] == self: wxMessageBox("Can't delete frame") return parRel = None # build relationship, this will only happen for the first call if not parentRef: # select parent so long,... | defdeleteCtrl(self,name,parentRef=None):"""Deleteacontrol,updateselectionandparenttree"""ctrlInfo=self.objects[name]ifctrlInfo[1]==self:wxMessageBox("Can'tdeleteframe")returnparRel=None#buildrelationship,thiswillonlyhappenforthefirstcallifnotparentRef:#selectparentsolong,prettysoonwon'tbeabletoaskwho#theparentisparentN... | 28,318 |
def deleteCtrl(self, name, parentRef = None): """ Delete a control, update selection and parent tree """ ctrlInfo = self.objects[name] if ctrlInfo[1] == self: wxMessageBox("Can't delete frame") return parRel = None # build relationship, this will only happen for the first call if not parentRef: # select parent so long,... | def deleteCtrl(self, name, parentRef = None): """ Delete a control, update selection and parent tree """ ctrlInfo = self.objects[name] if ctrlInfo[1] == self: wxMessageBox("Can't delete frame") return parRel = None # build relationship, this will only happen for the first call if not parentRef: # select parent so long,... | 28,319 |
def deleteCtrl(self, name, parentRef = None): """ Delete a control, update selection and parent tree """ ctrlInfo = self.objects[name] if ctrlInfo[1] == self: wxMessageBox("Can't delete frame") return parRel = None # build relationship, this will only happen for the first call if not parentRef: # select parent so long,... | defdeleteCtrl(self,name,parentRef=None):"""Deleteacontrol,updateselectionandparenttree"""ctrlInfo=self.objects[name]ifctrlInfo[1]==self:wxMessageBox("Can'tdeleteframe")returnparRel=None#buildrelationship,thiswillonlyhappenforthefirstcallifnotparentRef:#selectparentsolong,prettysoonwon'tbeabletoaskwho#theparentisparentN... | 28,320 |
def selectNone(self): if self.selection: self.selection.selectNone() self.selection = None elif self.multiSelection: for sel in self.multiSelection: sel.selectNone() sel.destroy() self.multiSelection = [] | def selectNone(self): if self.selection: self.selection.selectNone() elif self.multiSelection: for sel in self.multiSelection: sel.selectNone() sel.destroy() self.multiSelection = [] | 28,321 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | 28,322 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | 28,323 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | 28,324 |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else... | 28,325 |
def selectControlByPos(self, ctrl, pos, multiSelect): """ Handle selection of a control from a users click of creation of a new one if a component was selected on the palette. Some ctrls do not register clicks, the click is then picked up from the parent which checks if a click intersects any child regions. For effici... | def selectControlByPos(self, ctrl, pos, multiSelect): """ Handle selection of a control from a users click of creation of a new one if a component was selected on the palette. Some ctrls do not register clicks, the click is then picked up from the parent which checks if a click intersects any child regions. For effici... | 28,326 |
def selectControlByPos(self, ctrl, pos, multiSelect): """ Handle selection of a control from a users click of creation of a new one if a component was selected on the palette. Some ctrls do not register clicks, the click is then picked up from the parent which checks if a click intersects any child regions. For effici... | def selectControlByPos(self, ctrl, pos, multiSelect): """ Handle selection of a control from a users click of creation of a new one if a component was selected on the palette. Some ctrls do not register clicks, the click is then picked up from the parent which checks if a click intersects any child regions. For effici... | 28,327 |
def selectControlByPos(self, ctrl, pos, multiSelect): """ Handle selection of a control from a users click of creation of a new one if a component was selected on the palette. Some ctrls do not register clicks, the click is then picked up from the parent which checks if a click intersects any child regions. For effici... | def selectControlByPos(self, ctrl, pos, multiSelect): """ Handle selection of a control from a users click of creation of a new one if a component was selected on the palette.Some ctrls do not register clicks, the click is then picked up from the parent which checks if a click intersects any child regions. For efficien... | 28,328 |
def _drawLines(self, dc, col, loglFunc, sze, sg): pen1 = wxPen(col) dc.SetPen(pen1) dc.SetLogicalFunction(loglFunc) for y in range(sze.y / sg): dc.DrawLine(0, y * sg, sze.x, y * sg) for x in range(sze.x / sg): dc.DrawLine(x * sg, 0, x * sg, sze.y) | def _drawLines(self, dc, col, loglFunc, sze, sg): pen1 = wxPen(col) dc.SetPen(pen1) dc.SetLogicalFunction(loglFunc) for y in range(sze.y / sg): dc.DrawLine(0, y * sg, sze.x, y * sg) for x in range(sze.x / sg): dc.DrawLine(x * sg, 0, x * sg, sze.y) | 28,329 |
def moveUpdate(self, sel): sel.resizeCtrl() sel.setSelection(true) #sel.positionUpdate() | def moveUpdate(self, sel): sel.resizeCtrl() sel.setSelection(true) #sel.positionUpdate() | 28,330 |
def sizeUpdate(self, sel): sel.resizeCtrl() sel.setSelection(true) | defsizeUpdate(self,sel):sel.resizeCtrl()sel.setSelection(true) | 28,331 |
def OnWidthInc(self, event): sel = self.selection if sel and sel.selection != self: sel.size.x = sel.size.x + 1 sel.startSize.x = sel.startSize.x + 1 self.sizeUpdate(sel) | def OnWidthInc(self, event): sel = self.selection if sel and sel.selection != self: sel.size.x = sel.size.x + 1 self.sizeUpdate(sel) | 28,332 |
def OnWidthDec(self, event): sel = self.selection if sel and sel.selection != self and sel.size.x > 0: sel.size.x = sel.size.x - 1 sel.startSize.x = sel.startSize.x - 1 self.sizeUpdate(sel) | def OnWidthDec(self, event): sel = self.selection if sel and sel.selection != self and sel.size.x > 0: sel.size.x = sel.size.x - 1 self.sizeUpdate(sel) | 28,333 |
def OnHeightInc(self, event): sel = self.selection if sel and sel.selection != self: sel.size.y = sel.size.y + 1 sel.startSize.y = sel.startSize.y + 1 self.sizeUpdate(sel) | def OnHeightInc(self, event): sel = self.selection if sel and sel.selection != self: sel.size.y = sel.size.y + 1 self.sizeUpdate(sel) | 28,334 |
def OnHeightDec(self, event): sel = self.selection if sel and sel.selection != self and sel.size.y > 0: sel.size.y = sel.size.y - 1 sel.startSize.y = sel.startSize.y - 1 self.sizeUpdate(sel) | def OnHeightDec(self, event): sel = self.selection if sel and sel.selection != self and sel.size.y > 0: sel.size.y = sel.size.y - 1 self.sizeUpdate(sel) | 28,335 |
def __init__(self, parent, senders, inspector, designer, colour, pnlStyle): self.designer = designer self.inspSel = None self.inspector = inspector self.parent = parent self.senders = senders self.selection = None self.selCompn = None self.dragTag = None self.dragging = false self.dragOffset = wxPoint() self.colour = c... | def __init__(self, parent, senders, inspector, designer, colour, pnlStyle): self.designer = designer self.inspSel = None self.inspector = inspector self.parent = parent self.senders = senders self.selection = None self.selCompn = None self.dragTag = None self.dragging = false self.dragOffset = wxPoint() self.colour = c... | 28,336 |
def __init__(self, parent, senders, inspector, designer, colour, pnlStyle): self.designer = designer self.inspSel = None self.inspector = inspector self.parent = parent self.senders = senders self.selection = None self.selCompn = None self.dragTag = None self.dragging = false self.dragOffset = wxPoint() self.colour = c... | def __init__(self, parent, senders, inspector, designer, colour, pnlStyle): self.designer = designer self.inspSel = None self.inspector = inspector self.parent = parent self.senders = senders self.selection = None self.selCompn = None self.dragTag = None self.dragging = false self.dragOffset = wxPoint() self.colour = c... | 28,337 |
def destroy(self): | def destroy(self): | 28,338 |
def __del__(self): print '__del__ selection group' | 28,339 | |
def showTags(self): self.stTL.Show(true) self.stTR.Show(true) self.stBR.Show(true) self.stBL.Show(true) self.stT.Show(true) self.stB.Show(true) self.stL.Show(true) self.stR.Show(true) self.sfL.Show(false) self.sfR.Show(false) self.sfB.Show(false) self.sfT.Show(false) | def showTags(self): self.stTL.Show(true) self.stTR.Show(true) self.stBR.Show(true) self.stBL.Show(true) self.stT.Show(true) self.stB.Show(true) self.stL.Show(true) self.stR.Show(true) self.sfL.Show(false) self.sfR.Show(false) self.sfB.Show(false) self.sfT.Show(false) | 28,340 |
def reparentTags(self, parent): map(lambda tag, newparent = parent: tag.Reparent(newparent), self.tags) | def reparentTags(self, parent): map(lambda tag, newparent = parent: tag.Reparent(newparent), self.tags) | 28,341 |
def moveCapture(self, ctrl, compn, pos): # Put selection around control | def moveCapture(self, ctrl, compn, pos): # Put selection around control | 28,342 |
def moveCapture(self, ctrl, compn, pos): # Put selection around control | def moveCapture(self, ctrl, compn, pos): # Put selection around control | 28,343 |
def moving(self, ctrl, pos, multiDragCtrl = None):#, relCtrl = None): # Calculate relative position if it is a multiple selection drag if multiDragCtrl: dragCtrlPos = multiDragCtrl.GetPosition() movingCtrlPos = self.selection.GetPosition() pos = wxPoint(pos.x - dragCtrlPos.x + movingCtrlPos.x, pos.y - dragCtrlPos.y + m... | def moving(self, ctrl, pos, multiDragCtrl = None):#, relCtrl = None): # Calculate relative position if it is a multiple selection drag if multiDragCtrl: dragCtrlPos = multiDragCtrl.GetPosition() movingCtrlPos = self.selection.GetPosition() pos = wxPoint(pos.x - dragCtrlPos.x + movingCtrlPos.x, pos.y - dragCtrlPos.y + m... | 28,344 |
def moving(self, ctrl, pos, multiDragCtrl = None):#, relCtrl = None): # Calculate relative position if it is a multiple selection drag if multiDragCtrl: dragCtrlPos = multiDragCtrl.GetPosition() movingCtrlPos = self.selection.GetPosition() pos = wxPoint(pos.x - dragCtrlPos.x + movingCtrlPos.x, pos.y - dragCtrlPos.y + m... | def moving(self, ctrl, pos, multiDragCtrl = None):#, relCtrl = None): # Calculate relative position if it is a multiple selection drag if multiDragCtrl: dragCtrlPos = multiDragCtrl.GetPosition() movingCtrlPos = self.selection.GetPosition() pos = wxPoint(pos.x - dragCtrlPos.x + movingCtrlPos.x, pos.y - dragCtrlPos.y + m... | 28,345 |
def selectCtrl(self, ctrl, compn, selectInInspector = true): self.hideTags() if not ctrl: self.selection = None self.selCompn = None self.inspSel = None else: # XXX fix! if ctrl == self.designer: self.name = '' self.parent = ctrl cp = wxPoint(0, 0) screenPos = ctrl.ClientToScreen(cp) parentPos = self.parent.ScreenToCl... | def self.initStartVals() self.startPos = wxPoint(self.position.x, self.position.y) self.startSize = wxSize(self.size.x, self.size.y) self.updateAnchors() selectCtrl(self, self.initStartVals() self.startPos = wxPoint(self.position.x, self.position.y) self.startSize = wxSize(self.size.x, self.size.y) self.updateAncho... | 28,346 |
def resizeCtrl(self): """ Set the selected control's dimensions by granulising the current selection group's size & pos """ | def resizeCtrl(self): """ Set the selected control's dimensions by granulising the current selection group's size & pos """ | 28,347 |
def setSelection(self): position = self.position size = self.size | def setSelection(self): position = self.position size = self.size | 28,348 |
def setSelection(self): position = self.position size = self.size | def setSelection(self): position = self.position size = self.size | 28,349 |
def setSelection(self): position = self.position size = self.size | def setSelection(self): position = self.position size = self.size | 28,350 |
def setSelection(self): position = self.position size = self.size | def setSelection(self): position = self.position size = self.size | 28,351 |
def OnMouseOver(self, event): if event.Dragging(): pos = event.GetPosition() ctrl = self.senders.getObject(event) self.moving(ctrl, pos) event.Skip() | def OnMouseOver(self, event): if event.Dragging(): pos = event.GetPosition() ctrl = self.senders.getObject(event) self.moving(ctrl, pos) event.Skip() | 28,352 |
def setSelection(self): position = self.position size = self.size | def setSelection(self): position = self.position size = self.size | 28,353 |
def OnSizeBegin(self, event): self.dragTag = self.senders.getObject(event) self.showFramedTags(self.dragTag) | defself.initStartVals() OnSizeBegin(self,self.initStartVals() event):self.initStartVals() self.dragTagself.initStartVals() =self.initStartVals() self.senders.getObject(event)self.initStartVals() self.showFramedTags(self.dragTag) | 28,354 |
def selectCtrl(self, ctrl, compn): print 'MultiSelectionGroup.selectCtrl' SelectionGroup.selectCtrl(self, ctrl, compn) self.inspSel = None self.inspector.cleanup() self.inspector.multiSelectObject(None, self.designer) | def selectCtrl(self, ctrl, compn): SelectionGroup.selectCtrl(self, ctrl, compn) self.inspSel = None self.inspector.cleanup() self.inspector.multiSelectObject(None, self.designer) | 28,355 |
def setSelection(self): position = self.position size = self.size | def setSelection(self): position = self.position size = self.size | 28,356 |
def __init__(self, parent, cursor, tagSize, group, pnlStyle):# = wxSIMPLE_BORDER): wxPanel.__init__(self, parent, -1, size = wxSize(tagSize, tagSize), style = pnlStyle) self.Show(false) self.group = group self.SetBackgroundColour(group.colour) self.SetForegroundColour(wxBLACK) self.SetCursor(wxStockCursor(cursor)) self... | def __init__(self, parent, cursor, tagSize, group, pnlStyle):# = wxSIMPLE_BORDER): wxPanel.__init__(self, parent, -1, size = wxSize(tagSize, tagSize), style = pnlStyle) self.Show(false) self.group = group self.SetCursor(wxStockCursor(cursor)) self.selection = None self.position = wxSize(0, 0) | 28,357 |
def setPos(self, position, mirrorX, mirrorY, mirrorXY, oldPos = None, oldSize = None): grp = self.group if grp.size.x < 0 and grp.size.y < 0: grp.size.x, grp.size.y = 0 if oldPos and oldSize: grp.position.x = oldPos.x + oldSize.x grp.position.y = oldPos.y + oldSize.y grp.dragTag = mirrorXY elif grp.size.x < 0: grp.size... | def setPos(self, position, mirrorX, mirrorY, mirrorXY, oldPos = None, oldSize = None): grp = self.group if grp.size.x < 0 and grp.size.y < 0: grp.size.x = screenGran - grp.size.x % screenGran grp.size.y = screenGran - grp.size.y % screenGran if oldPos and oldSize: if oldPos.x != grp.position.x: grp.position.x = oldPos.... | 28,358 |
def setPos(self, position, mirrorX, mirrorY, mirrorXY, oldPos = None, oldSize = None): grp = self.group if grp.size.x < 0 and grp.size.y < 0: grp.size.x, grp.size.y = 0 if oldPos and oldSize: grp.position.x = oldPos.x + oldSize.x grp.position.y = oldPos.y + oldSize.y grp.dragTag = mirrorXY elif grp.size.x < 0: grp.size... | def setPos(self, position, mirrorX, mirrorY, mirrorXY, oldPos = None, oldSize = None): grp = self.group if grp.size.x < 0 and grp.size.y < 0: grp.size.x, grp.size.y = 0 if oldPos and oldSize: grp.position.x = oldPos.x + oldSize.x grp.position.y = oldPos.y + oldSize.y grp.dragTag = mirrorXY elif grp.size.x < 0: grp.size... | 28,359 |
def setPos(self, position, mirrorX, mirrorY, mirrorXY, oldPos = None, oldSize = None): grp = self.group if grp.size.x < 0 and grp.size.y < 0: grp.size.x, grp.size.y = 0 if oldPos and oldSize: grp.position.x = oldPos.x + oldSize.x grp.position.y = oldPos.y + oldSize.y grp.dragTag = mirrorXY elif grp.size.x < 0: grp.size... | def setPos(self, position, mirrorX, mirrorY, mirrorXY, oldPos = None, oldSize = None): grp = self.group if grp.size.x < 0 and grp.size.y < 0: grp.size.x, grp.size.y = 0 if oldPos and oldSize: grp.position.x = oldPos.x + oldSize.x grp.position.y = oldPos.y + oldSize.y grp.dragTag = mirrorXY elif grp.size.x < 0: grp.size... | 28,360 |
def setPos(self, position, mirrorX, mirrorY, mirrorXY, oldPos = None, oldSize = None): grp = self.group if grp.size.x < 0 and grp.size.y < 0: grp.size.x, grp.size.y = 0 if oldPos and oldSize: grp.position.x = oldPos.x + oldSize.x grp.position.y = oldPos.y + oldSize.y grp.dragTag = mirrorXY elif grp.size.x < 0: grp.size... | defgrp.startPos = wxPoint(grp.position.x, grp.position.y) grp.startSize = wxSize(grp.size.x, grp.size.y) setPos(self,grp.startPos = wxPoint(grp.position.x, grp.position.y) grp.startSize = wxSize(grp.size.x, grp.size.y) position,grp.startPos = wxPoint(grp.position.x, grp.position.y) grp.startSize = wxSize(grp.size.x, ... | 28,361 |
def destroy(self): del self.group self.Destroy() | def destroy(self): del self.group self.Destroy() | 28,362 |
def setPos(self, position): grp = self.group | def setPos(self, position): grp = self.group | 28,363 |
def setPos(self, position): grp = self.group | def setPos(self, position): grp = self.group | 28,364 |
def setPos(self, position): grp = self.group | def setPos(self, position): grp = self.group | 28,365 |
def setPos(self, position): grp = self.group | def setPos(self, position): grp = self.group | 28,366 |
def setPos(self, position): grp = self.group | def setPos(self, position): grp = self.group | 28,367 |
def setPos(self, position): grp = self.group | def setPos(self, position): grp = self.group | 28,368 |
def copyFromFS(self, fsNode, fn=''): if not fn: fn = os.path.basename(fsNode.resourcepath) cwd = os.getcwd() os.chdir(os.path.dirname(fsNode.resourcepath)) try: cmd = 'scp %s %s' % (os.path.basename(fsNode.resourcepath), self.remotePath(fn)) self.execSCP(cmd) finally: os.chdir(cwd) | def copyFromFS(self, fsNode, fn=''): if not fn: fn = os.path.basename(fsNode.resourcepath) cwd = os.getcwd() os.chdir(os.path.dirname(fsNode.resourcepath)) try: cmd = 'scp %s %s' % (os.path.basename(fsNode.resourcepath), self.remotePath(fn)) self.execSCP(cmd) finally: os.chdir(cwd) | 28,369 |
def deleteItems(self, names): absNames = [] for name in names: absNames.append(self.resourcepath + '/' +name) self.execCmd("rm '%s'" % string.join(absNames, ' ')) | def deleteItems(self, names): absNames = [] for name in names: absNames.append(self.resourcepath + '/' +name) self.execCmd("rm '%s'" % string.join(absNames, ' ')) | 28,370 |
def clipPaste_SSHExpClipboard(self, node, nodes, mode): for sshNode in nodes: if mode == 'cut': node.moveFileFrom(sshNode) self.clipNodes = [] elif mode == 'copy': node.copyFileFrom(sshNode) | def clipPaste_SSHExpClipboard(self, node, nodes, mode): for sshNode in nodes: if mode == 'cut': node.moveFileFrom(sshNode) self.clipNodes = [] elif mode == 'copy': node.copyFileFrom(sshNode) | 28,371 |
def pasteFileSysFolder(self, folderpath, nodepath, zopeConn): zopeConn.add_folder(os.path.basename(folderpath), nodepath) files = os.listdir(folderpath) folder = os.path.basename(folderpath) newNodepath = nodepath+'/'+folder for file in files: file = os.path.join(folderpath, file) if os.path.isdir(file): self.pasteFile... | def pasteFileSysFolder(self, folderpath, nodepath, node): node.zopeConn.add_folder(os.path.basename(folderpath), nodepath) files = os.listdir(folderpath) folder = os.path.basename(folderpath) newNodepath = nodepath+'/'+folder for file in files: file = os.path.join(folderpath, file) if os.path.isdir(file): self.paste... | 28,372 |
def pasteFileSysFolder(self, folderpath, nodepath, zopeConn): zopeConn.add_folder(os.path.basename(folderpath), nodepath) files = os.listdir(folderpath) folder = os.path.basename(folderpath) newNodepath = nodepath+'/'+folder for file in files: file = os.path.join(folderpath, file) if os.path.isdir(file): self.pasteFile... | def pasteFileSysFolder(self, folderpath, nodepath, zopeConn): zopeConn.add_folder(os.path.basename(folderpath), nodepath) files = os.listdir(folderpath) folder = os.path.basename(folderpath) newNodepath = nodepath+'/'+folder for file in files: file = os.path.join(folderpath, file) if os.path.isdir(file): self.pasteFile... | 28,373 |
def pasteFileSysFolder(self, folderpath, nodepath, zopeConn): zopeConn.add_folder(os.path.basename(folderpath), nodepath) files = os.listdir(folderpath) folder = os.path.basename(folderpath) newNodepath = nodepath+'/'+folder for file in files: file = os.path.join(folderpath, file) if os.path.isdir(file): self.pasteFile... | def pasteFileSysFolder(self, folderpath, nodepath, zopeConn): zopeConn.add_folder(os.path.basename(folderpath), nodepath) files = os.listdir(folderpath) folder = os.path.basename(folderpath) newNodepath = nodepath+'/'+folder for file in files: file = os.path.join(folderpath, file) if os.path.isdir(file): self.pasteFile... | 28,374 |
def clipPaste_FileSysExpClipboard(self, node, nodes, mode): nodepath = node.resourcepath+'/'+node.name for file in nodes: if file.isDir(): self.pasteFileSysFolder(file.resourcepath, nodepath, node.zopeConn) else: node.zopeConn.upload(file.resourcepath, nodepath) | def clipPaste_FileSysExpClipboard(self, node, nodes, mode): nodepath = node.resourcepath+'/'+node.name for file in nodes: if file.isDir(): self.pasteFileSysFolder(file.resourcepath, nodepath, node) else: node.zopeConn.upload(file.resourcepath, nodepath) | 28,375 |
def openList(self, root = None): try: wxBeginBusyCursor() try: items = self.zopeConn.dir(self.zopeObj.whole_name()) finally: wxEndBusyCursor() except ftplib.error_perm, resp: Utils.ShowMessage(None, 'Zope Error', resp) raise | def openList(self, root = None): try: wxBeginBusyCursor() try: items = self.zopeConn.dir(self.zopeObj.whole_name()) finally: wxEndBusyCursor() except ftplib.error_perm, resp: Utils.ShowMessage(None, 'Zope Error', `resp`) raise | 28,376 |
def newItem(self, name, Compn): props = self.root.properties cmp = Compn(Utils.getValidName(self.cache.keys(), name), self.zopeObj.whole_name(), props.get('localpath', '')) cmp.connect(props['host'], props['httpport'], props['username'], props['passwd']) cmp.create() return cmp.name | def newItem(self, name, Compn, getNewValidName = true): props = self.root.properties cmp = Compn(Utils.getValidName(self.cache.keys(), name), self.zopeObj.whole_name(), props.get('localpath', '')) cmp.connect(props['host'], props['httpport'], props['username'], props['passwd']) cmp.create() return cmp.name | 28,377 |
def newItem(self, name, Compn): props = self.root.properties cmp = Compn(Utils.getValidName(self.cache.keys(), name), self.zopeObj.whole_name(), props.get('localpath', '')) cmp.connect(props['host'], props['httpport'], props['username'], props['passwd']) cmp.create() return cmp.name | def newItem(self, name, Compn): props = self.root.properties if getNewValidName: name = Utils.getValidName(self.cache.keys(), name) cmp = Compn(name, self.zopeObj.whole_name(), props.get('localpath', '')) cmp.connect(props['host'], props['httpport'], props['username'], props['passwd']) cmp.create() return cmp.name | 28,378 |
def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, theToggleBitmap = wxNullBitmap): nId = wxNewId() doToggle = theToggleBitmap != wxNullBitmap print doToggle | def AddToolButtonBmpObject(frame, toolbar, thebitmap, hint, triggermeth, theToggleBitmap = wxNullBitmap): nId = wxNewId() doToggle = theToggleBitmap != wxNullBitmap print doToggle | 28,379 |
def getShellLocals(self): return {} | def getShellLocals(self): return {} | 28,380 |
def __init__(self, parent, wId): StyledTextCtrls.wxStyledTextCtrl.__init__(self, parent, wId, style = wx.CLIP_CHILDREN | wx.SUNKEN_BORDER) StyledTextCtrls.CallTipCodeHelpSTCMix.__init__(self) StyledTextCtrls.AutoCompleteCodeHelpSTCMix.__init__(self) StyledTextCtrls.PythonStyledTextCtrlMix.__init__(self, wId, ()) | def __init__(self, parent, wId): wx.stc.StyledTextCtrl.__init__(self, parent, wId, style = wx.CLIP_CHILDREN | wx.SUNKEN_BORDER) StyledTextCtrls.CallTipCodeHelpSTCMix.__init__(self) StyledTextCtrls.AutoCompleteCodeHelpSTCMix.__init__(self) StyledTextCtrls.PythonStyledTextCtrlMix.__init__(self, wId, ()) | 28,381 |
def getTipValue(self, word, lnNo): (name, argspec, tip) = wx.py.introspect.getCallTip(word, self.interp.locals) | def getTipValue(self, word, lnNo): (name, argspec, tip) = wx.py.introspect.getCallTip(word, self.interp.locals) | 28,382 |
def __init__(self, parent, message = 'Choose a file', defaultDir = '.', defaultFile = '', wildcard = '*.*', style = wxOPEN, wildcard = '*.py; *.txt', pos = wxDefaultPosition): self._init_ctrls(parent) self.SetStyle(style) self.SetWildcard(wildcard) | def __init__(self, parent, message = 'Choose a file', defaultDir = '.', defaultFile = '', style = wxOPEN, wildcard = '*.py; *.txt', pos = wxDefaultPosition): self._init_ctrls(parent) self.SetStyle(style) self.SetWildcard(wildcard) | 28,383 |
def __init__(self, parent, message = 'Choose a file', defaultDir = '.', defaultFile = '', wildcard = '*.*', style = wxOPEN, wildcard = '*.py; *.txt', pos = wxDefaultPosition): self._init_ctrls(parent) self.SetStyle(style) self.SetWildcard(wildcard) | def __init__(self, parent, message = 'Choose a file', defaultDir = '.', defaultFile = '', wildcard = '*.*', style = wxOPEN, wildcard = '*.py; *.txt', pos = wxDefaultPosition): self._init_ctrls(parent) self.SetStyle(style) self.SetWildcard(wildcard) | 28,384 |
def __init__(self, parent, dlg, filepath, pos = wxDefaultPosition, size = wxDefaultSize): import Explorer Explorer.PackageFolderList.__init__(self, parent, filepath, pos, size) self.dlg = dlg | def __init__(self, parent, dlg, filepath, pos = wxDefaultPosition, size = wxDefaultSize): from Explorers import Explorer Explorer.PackageFolderList.__init__(self, parent, filepath, pos, size) self.dlg = dlg | 28,385 |
def OnItemSelect(self, event): import Explorer Explorer.PackageFolderList.OnItemSelect(self, event) item = self.getSelection() if item: self.dlg.SelectItem(item.name) elif self.selected == 0: self.dlg.SelectItem('..') | def OnItemSelect(self, event): from Explorers import Explorer Explorer.PackageFolderList.OnItemSelect(self, event) item = self.getSelection() if item: self.dlg.SelectItem(item.name) elif self.selected == 0: self.dlg.SelectItem('..') | 28,386 |
def OnItemDeselect(self, event): import Explorer Explorer.PackageFolderList.OnItemDeselect(self, event) self.dlg.SelectItem(None) | def OnItemDeselect(self, event): from Explorers import Explorer Explorer.PackageFolderList.OnItemDeselect(self, event) self.dlg.SelectItem(None) | 28,387 |
def newFileNode(self, defaultDir): import Explorer return Explorer.PyFileNode(path.basename(defaultDir), defaultDir, None, Explorer.FolderModel.imgIdx, None) | def newFileNode(self, defaultDir): import Explorer return Explorer.PyFileNode(path.basename(defaultDir), defaultDir, None, Explorer.FolderModel.imgIdx, None) | 28,388 |
def ok(self): if self.lcFiles.selected == 0: node = self.lcFiles.node.createParentNode() if node: node.doCVS = false if node.resourcepath == self.lcFiles.node.resourcepath: from ExternalLib.ConfigParser import ConfigParser import Preferences, Explorer conf = ConfigParser() conf.read(Preferences.pyPath+'/Explorer.'+\ (w... | def ok(self): if self.lcFiles.selected == 0: node = self.lcFiles.node.createParentNode() if node: node.doCVS = false if node.resourcepath == self.lcFiles.node.resourcepath: from ExternalLib.ConfigParser import ConfigParser import Preferences from Explorers import FileExplorer conf = ConfigParser() conf.read(Preferences... | 28,389 |
def ok(self): if self.lcFiles.selected == 0: node = self.lcFiles.node.createParentNode() if node: node.doCVS = false if node.resourcepath == self.lcFiles.node.resourcepath: from ExternalLib.ConfigParser import ConfigParser import Preferences, Explorer conf = ConfigParser() conf.read(Preferences.pyPath+'/Explorer.'+\ (w... | def ok(self): if self.lcFiles.selected == 0: node = self.lcFiles.node.createParentNode() if node: node.doCVS = false if node.resourcepath == self.lcFiles.node.resourcepath: from ExternalLib.ConfigParser import ConfigParser import Preferences, Explorer conf = ConfigParser() conf.read(Preferences.pyPath+'/Explorer.'+\ (w... | 28,390 |
def __init__(self, parent, model): a1 = (('-', None, '', ''), ('Comment', self.OnComment, '-', 'Comment'), ('Uncomment', self.OnUnComment, '-', 'Uncomment'), ('Indent', self.OnIndent, '-', 'Indent'), ('Dedent', self.OnDedent, '-', 'Dedent'), ('-', None, '-', ''), ('Run to cursor', self.OnRunToCursor, self.runCrsBmp, ''... | defEVT_STC_MODIFIED(self, wxID_PYTHONSOURCEVIEW, self.OnModified) __init__(self,EVT_STC_MODIFIED(self, wxID_PYTHONSOURCEVIEW, self.OnModified) parent,EVT_STC_MODIFIED(self, wxID_PYTHONSOURCEVIEW, self.OnModified) model):EVT_STC_MODIFIED(self, wxID_PYTHONSOURCEVIEW, self.OnModified) a1EVT_STC_MODIFIED(self, wxID_PYTHONS... | 28,391 |
def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() textAdded = event.GetText() | def OnModified(self, event): modType = event.GetModificationType() linesAdded = event.GetLinesAdded() textAdded = event.GetText() | 28,392 |
def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() textAdded = event.GetText() | def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() textAdded = event.GetText() | 28,393 |
def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() textAdded = event.GetText() | def OnModified(self, event): modType = event.GetModificationType() if modType == (wxSTC_MOD_CHANGEMARKER): pass linesAdded = event.GetLinesAdded() textAdded = event.GetText() | 28,394 |
def valueAsExpr(self): if self.bmpPath: path, tpe = os.path.split(self.bmpPath) dir, name = os.path.split(path) if tpe == 'Bitmap': return 'wxBitmap(%s, %s)'%(`self.bmpPath`, self.extTypeMap[os.path.splitext(self.bmpPath)[-1].lower()]) elif tpe == 'ResourceModule': return self.getSrcForResPath(dir, name) else: raise Ex... | def valueAsExpr(self): if self.bmpPath: path, tpe = os.path.split(self.bmpPath) dir, name = os.path.split(path) if tpe == 'Bitmap': return 'wxBitmap(%s, %s)'%(`path`, self.extTypeMap[os.path.splitext(path)[-1].lower()]) elif tpe == 'ResourceModule': return self.getSrcForResPath(dir, name) else: raise Exception, 'Unhand... | 28,395 |
def splitWindow(self, window1, window2): ctrl = self.control sm = ctrl.GetSplitMode() sp = ctrl.GetSashPosition() | def splitWindow(self, window1, window2): ctrl = self.control sm = ctrl.GetSplitMode() sp = ctrl.GetSashPosition() | 28,396 |
def splitWindow(self, window1, window2): ctrl = self.control sm = ctrl.GetSplitMode() sp = ctrl.GetSashPosition() | def splitWindow(self, window1, window2): ctrl = self.control sm = ctrl.GetSplitMode() sp = ctrl.GetSashPosition() | 28,397 |
def finaliser(self): return ['', ' parent.Realize()'] | def finaliser(self): return ['', ' parent.Realize()'] | 28,398 |
def initialiser(self): return [' parent.SetFieldsCount(%d)'%self.getCount()]+CollectionDTC.initialiser(self) | def initialiser(self): return [' parent.SetFieldsCount(%d)'%self.getCount()]+CollectionDTC.initialiser(self) | 28,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.