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
0b2ad078
Commit
0b2ad078
authored
Jun 30, 2011
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29 from k-eex/master
file path saving in settings
parents
8d92ac24
3273f5cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
pronterface.py
pronterface.py
+16
-8
No files found.
pronterface.py
View file @
0b2ad078
...
...
@@ -37,6 +37,7 @@ class Tee(object):
class
PronterWindow
(
wx
.
Frame
,
pronsole
.
pronsole
):
def
__init__
(
self
,
filename
=
None
,
size
=
winsize
):
pronsole
.
pronsole
.
__init__
(
self
)
self
.
settings
.
last_file_path
=
""
self
.
filename
=
filename
os
.
putenv
(
"UBUNTU_MENUPROXY"
,
"0"
)
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Printer Interface"
,
size
=
size
);
...
...
@@ -395,6 +396,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
gwindow
.
Show
()
def
setfeeds
(
self
,
e
):
self
.
feedrates_changed
=
True
try
:
self
.
settings
.
_set
(
"e_feedrate"
,
self
.
efeedc
.
GetValue
())
except
:
...
...
@@ -436,9 +438,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
statuscheck
=
0
self
.
p
.
recvcb
=
None
self
.
p
.
disconnect
()
self
.
save_in_rc
(
"set xy_feedrate"
,
"set xy_feedrate
%
d"
%
self
.
settings
.
xy_feedrate
)
self
.
save_in_rc
(
"set z_feedrate"
,
"set z_feedrate
%
d"
%
self
.
settings
.
z_feedrate
)
self
.
save_in_rc
(
"set e_feedrate"
,
"set e_feedrate
%
d"
%
self
.
settings
.
e_feedrate
)
if
hasattr
(
self
,
"feedrates_changed"
):
self
.
save_in_rc
(
"set xy_feedrate"
,
"set xy_feedrate
%
d"
%
self
.
settings
.
xy_feedrate
)
self
.
save_in_rc
(
"set z_feedrate"
,
"set z_feedrate
%
d"
%
self
.
settings
.
z_feedrate
)
self
.
save_in_rc
(
"set e_feedrate"
,
"set e_feedrate
%
d"
%
self
.
settings
.
e_feedrate
)
try
:
self
.
gwindow
.
Destroy
()
except
:
...
...
@@ -614,11 +617,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
thread
(
target
=
self
.
skein_monitor
)
.
start
()
def
loadfile
(
self
,
event
):
basedir
=
"."
try
:
basedir
=
os
.
path
.
split
(
self
.
filename
)[
0
]
except
:
pass
basedir
=
self
.
settings
.
last_file_path
if
not
os
.
path
.
exists
(
basedir
):
basedir
=
"."
try
:
basedir
=
os
.
path
.
split
(
self
.
filename
)[
0
]
except
:
pass
dlg
=
wx
.
FileDialog
(
self
,
"Open file to print"
,
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
.
SetWildcard
(
"STL and GCODE files (;*.gcode;*.g;*.stl;)"
)
if
(
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
...
...
@@ -626,6 +631,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
not
(
os
.
path
.
exists
(
name
)):
self
.
status
.
SetStatusText
(
"File not found!"
)
return
path
=
os
.
path
.
split
(
name
)[
0
]
if
path
!=
self
.
settings
.
last_file_path
:
self
.
set
(
"last_file_path"
,
path
)
if
name
.
endswith
(
".stl"
):
self
.
skein
(
name
)
else
:
...
...
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