Bugfixes against python3 updates.
Everything appears wo be working as normal in Python2 Python3 is still only partially functional.
This commit is contained in:
parent
8a9557cff1
commit
c34d1cbff8
@ -51,7 +51,7 @@ def readConfigFile(fname):
|
||||
try:
|
||||
#os.chdir(newDir) ## bad.
|
||||
fd = open(fname)
|
||||
s = asUnicode(fd.read(), 'UTF-8')
|
||||
s = asUnicode(fd.read())
|
||||
fd.close()
|
||||
s = s.replace("\r\n", "\n")
|
||||
s = s.replace("\r", "\n")
|
||||
|
@ -64,6 +64,12 @@ class Dock(QtGui.QWidget, DockDrop):
|
||||
|
||||
self.setStretch(*size)
|
||||
|
||||
def implements(self, name=None):
|
||||
if name is None:
|
||||
return ['dock']
|
||||
else:
|
||||
return name == 'dock'
|
||||
|
||||
def setStretch(self, x=None, y=None):
|
||||
#print "setStretch", self, x, y
|
||||
#self._stretch = (x, y)
|
||||
|
@ -20,7 +20,8 @@ class DockDrop(object):
|
||||
self.overlay.raise_()
|
||||
|
||||
def dragEnterEvent(self, ev):
|
||||
if isinstance(ev.source(), Dock.Dock):
|
||||
src = ev.source()
|
||||
if hasattr(src, 'implements') and src.implements('dock'):
|
||||
#print "drag enter accept"
|
||||
ev.accept()
|
||||
else:
|
||||
@ -125,5 +126,3 @@ class DropAreaOverlay(QtGui.QWidget):
|
||||
p.setBrush(QtGui.QBrush(QtGui.QColor(100, 100, 255, 50)))
|
||||
p.setPen(QtGui.QPen(QtGui.QColor(50, 50, 150), 3))
|
||||
p.drawRect(rgn)
|
||||
|
||||
from . import Dock
|
Loading…
Reference in New Issue
Block a user