Merge git://github.com/sbliven/Printrun into experimental

Should fix #359 initial issues

Conflicts:
	.gitignore
	printrun/gui.py
master
Guillaume Seguin 2013-05-16 19:30:30 +02:00
commit d2a0163a4e
8 changed files with 22 additions and 15 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
*.swp
*.bak
uploads
.DS_Store

View File

@ -25,9 +25,19 @@ You can run Printrun directly from source, as there are no packages available ye
`sudo apt-get install python-serial python-wxgtk2.8 python-pyglet`
### Fedora 15 and newer
### Fedora 17 and newer
You can run Printrun directly from source, as there are no packages available yet. Fetch and install the dependencies using
You can install Printrun from official packages. Install the whole package using
`sudo yum install printrun`
Or get only apps you need by
`sudo yum install pronsole` or `pronterface` or `plater`
Adding `--enablerepo updates-testing` option to `yum` might give you newer packages (but also not very tested).
You can also run Printrun directly from source, if the packages are too old for you anyway, or you have Fedora 15 or 16. Fetch and install the dependencies using
`sudo yum install pyserial wxpython pyglet`

View File

@ -461,12 +461,12 @@ if __name__ == '__main__':
try:
if statusreport:
p.loud = False
sys.stdout.write("Progress: 00.0%")
sys.stdout.write("Progress: 00.0%\r")
sys.stdout.flush()
while p.printing:
time.sleep(1)
if statusreport:
sys.stdout.write("%02.1f%%\r" % (100 * float(p.queueindex) / len(p.mainqueue),) )
sys.stdout.write("Progress: %02.1f%%\r" % (100 * float(p.queueindex) / len(p.mainqueue),) )
sys.stdout.flush()
p.disconnect()
sys.exit(0)

View File

@ -77,7 +77,7 @@ class BufferedCanvas(wx.Panel):
## General methods
##
def draw(self, dc):
def draw(self, dc, w, h):
"""
Stub: called when the canvas needs to be re-drawn.
"""

View File

@ -23,14 +23,13 @@ class Graph(BufferedCanvas):
'''A class to show a Graph with Pronterface.'''
def __init__(self, parent, id, pos = wx.DefaultPosition,
size = wx.DefaultSize, style = 0):
size = wx.Size(150, 80), style = 0):
# Forcing a no full repaint to stop flickering
style = style | wx.NO_FULL_REPAINT_ON_RESIZE
#call super function
#super(Graph, self).__init__(parent, id, pos, size, style)
BufferedCanvas.__init__(self, parent, id)
super(Graph, self).__init__(parent, id, pos, size, style)
#BufferedCanvas.__init__(self, parent, id)
self.SetSize(wx.Size(150, 80))
self.extruder0temps = [0]
self.extruder0targettemps = [0]

View File

@ -224,7 +224,7 @@ class MainToolbar(wx.BoxSizer):
root.serialport = wx.ComboBox(root.panel, -1,
choices = root.scanserial(),
style = wx.CB_DROPDOWN, size = (150, 25))
style = wx.CB_DROPDOWN, size = (-1, 25))
root.serialport.SetToolTip(wx.ToolTip("Select Port Printer is connected to"))
root.rescanports()
self.Add(root.serialport)

View File

@ -60,8 +60,7 @@ class XYButtons(BufferedCanvas):
self.bgcolor.SetFromName(bgcolor)
self.bgcolormask = wx.Colour(self.bgcolor.Red(), self.bgcolor.Green(), self.bgcolor.Blue(), 128)
BufferedCanvas.__init__(self, parent, ID)
self.SetSize(self.bg_bmp.GetSize())
BufferedCanvas.__init__(self, parent, ID, size=self.bg_bmp.GetSize())
# Set up mouse and keyboard event capture
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)

View File

@ -46,9 +46,7 @@ class ZButtons(BufferedCanvas):
self.bgcolor.SetFromName(bgcolor)
self.bgcolormask = wx.Colour(self.bgcolor.Red(), self.bgcolor.Green(), self.bgcolor.Blue(), 128)
BufferedCanvas.__init__(self, parent, ID)
self.SetSize(wx.Size(59, 244))
BufferedCanvas.__init__(self, parent, ID, size=wx.Size(59, 244))
# Set up mouse and keyboard event capture
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)