Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
bones
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Franck Pommereau
2015-03-19 14:30:56 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
02622a0682c4305806792fddfeef49ac45141575
02622a06
1 parent
013f0ab3
cleaner machine stop
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
bones_machine.py
bones_machine.py
View file @
02622a0
...
...
@@ -51,7 +51,9 @@ class Bones :
button
.
set_sensitive
(
sensitive
)
def
update
(
self
,
*
args
)
:
time
.
sleep
(
0.01
)
if
self
.
view
.
queue
.
can_do
()
and
not
self
.
_autorun
:
if
self
.
view
is
None
:
return
gtk
.
FALSE
elif
self
.
view
.
queue
.
can_do
()
and
not
self
.
_autorun
:
self
.
control_set_sensitive
(
gtk
.
TRUE
)
else
:
self
.
control_set_sensitive
(
gtk
.
FALSE
)
...
...
@@ -68,6 +70,8 @@ class Bones :
except
:
pass
def
do_run
(
self
,
*
args
)
:
if
self
.
gui
is
None
:
return
gtk
.
FALSE
try
:
self
.
do
()
speed
=
(
101
-
int
(
self
.
gui
.
control
.
speed
.
get_value
()))
*
10
...
...
@@ -82,7 +86,7 @@ class Bones :
self
.
_remove_id
()
self
.
update
()
def
do
(
self
,
cycle
=
False
)
:
while
Tru
e
:
while
self
.
view
is
not
Non
e
:
try
:
if
cycle
==
self
.
view
.
queue
.
do
(
self
.
gui
.
cursor
)
:
break
...
...
@@ -110,6 +114,11 @@ class Bones :
self
.
gui
.
run
(
self
)
def
quit
(
self
)
:
self
.
machine
.
quit
()
try
:
self
.
gui
.
destroy
()
except
:
pass
self
.
gui
=
self
.
view
=
None
if
__name__
==
"__main__"
:
warnings
.
filterwarnings
(
"ignore"
,
category
=
DeprecationWarning
)
...
...
Please
register
or
login
to post a comment