Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
df81a73d
Commit
df81a73d
authored
Aug 04, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use enable/disable for pause button instead of hide/show to not interfere with custombuttons
parent
97a530d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
pronterface.py
pronterface.py
+6
-6
No files found.
pronterface.py
View file @
df81a73d
...
@@ -131,7 +131,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -131,7 +131,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
endcb
(
self
):
def
endcb
(
self
):
print
"Print took "
+
str
(
int
(
time
.
time
()
-
self
.
starttime
)
/
60
)
+
" minutes."
print
"Print took "
+
str
(
int
(
time
.
time
()
-
self
.
starttime
)
/
60
)
+
" minutes."
wx
.
CallAfter
(
self
.
pausebtn
.
Hid
e
)
wx
.
CallAfter
(
self
.
pausebtn
.
Disabl
e
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Print"
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Print"
)
...
@@ -524,7 +524,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -524,7 +524,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
topsizer
.
Fit
(
self
)
self
.
topsizer
.
Fit
(
self
)
# disable all printer controls until we connect to a printer
# disable all printer controls until we connect to a printer
self
.
pausebtn
.
Hid
e
()
self
.
pausebtn
.
Disabl
e
()
for
i
in
self
.
printerControls
:
for
i
in
self
.
printerControls
:
i
.
Disable
()
i
.
Disable
()
...
@@ -934,7 +934,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -934,7 +934,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
"Loaded "
+
self
.
filename
+
",
%
d lines"
%
(
len
(
self
.
f
),))
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
"Loaded "
+
self
.
filename
+
",
%
d lines"
%
(
len
(
self
.
f
),))
wx
.
CallAfter
(
self
.
pausebtn
.
Hid
e
)
wx
.
CallAfter
(
self
.
pausebtn
.
Disabl
e
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Print"
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Print"
)
threading
.
Thread
(
target
=
self
.
loadviz
)
.
start
()
threading
.
Thread
(
target
=
self
.
loadviz
)
.
start
()
...
@@ -981,7 +981,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -981,7 +981,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
status
.
SetStatusText
(
"Loaded "
+
name
+
",
%
d lines"
%
(
len
(
self
.
f
),))
self
.
status
.
SetStatusText
(
"Loaded "
+
name
+
",
%
d lines"
%
(
len
(
self
.
f
),))
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Print"
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Print"
)
wx
.
CallAfter
(
self
.
pausebtn
.
SetLabel
,
"Pause"
)
wx
.
CallAfter
(
self
.
pausebtn
.
SetLabel
,
"Pause"
)
wx
.
CallAfter
(
self
.
pausebtn
.
Hid
e
)
wx
.
CallAfter
(
self
.
pausebtn
.
Disabl
e
)
if
self
.
p
.
online
:
if
self
.
p
.
online
:
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
wx
.
CallAfter
(
self
.
printbtn
.
Enable
)
threading
.
Thread
(
target
=
self
.
loadviz
)
.
start
()
threading
.
Thread
(
target
=
self
.
loadviz
)
.
start
()
...
@@ -1016,7 +1016,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1016,7 +1016,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
on_startprint
(
self
):
def
on_startprint
(
self
):
wx
.
CallAfter
(
self
.
pausebtn
.
SetLabel
,
"Pause"
)
wx
.
CallAfter
(
self
.
pausebtn
.
SetLabel
,
"Pause"
)
wx
.
CallAfter
(
self
.
pausebtn
.
Show
)
wx
.
CallAfter
(
self
.
pausebtn
.
Enable
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Restart"
)
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
"Restart"
)
def
endupload
(
self
):
def
endupload
(
self
):
...
@@ -1107,7 +1107,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1107,7 +1107,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx
.
CallAfter
(
self
.
connectbtn
.
Enable
);
wx
.
CallAfter
(
self
.
connectbtn
.
Enable
);
wx
.
CallAfter
(
self
.
printbtn
.
Disable
);
wx
.
CallAfter
(
self
.
printbtn
.
Disable
);
wx
.
CallAfter
(
self
.
pausebtn
.
Hid
e
);
wx
.
CallAfter
(
self
.
pausebtn
.
Disabl
e
);
for
i
in
self
.
printerControls
:
for
i
in
self
.
printerControls
:
wx
.
CallAfter
(
i
.
Disable
)
wx
.
CallAfter
(
i
.
Disable
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment