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
ab7c2782
Commit
ab7c2782
authored
Sep 06, 2012
by
Kliment Yanev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental' of github.com:kliment/Printrun into experimental
parents
1581ab0b
04878084
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
printrun_utils.py
printrun/printrun_utils.py
+8
-4
pronterface_widgets.py
printrun/pronterface_widgets.py
+2
-1
No files found.
printrun/printrun_utils.py
View file @
ab7c2782
import
os
import
os
,
sys
import
gettext
# Set up Internationalization using gettext
...
...
@@ -16,17 +16,21 @@ def imagefile(filename):
candidate
=
os
.
path
.
join
(
prefix
,
filename
)
if
os
.
path
.
exists
(
candidate
):
return
candidate
local_candidate
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"images"
,
filename
)
local_candidate
=
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
argv
[
0
]
),
"images"
,
filename
)
if
os
.
path
.
exists
(
local_candidate
):
return
local_candidate
else
:
return
os
.
path
.
join
(
os
.
path
.
split
(
os
.
path
.
split
(
__file__
)[
0
])[
0
],
"images"
,
filename
)
return
os
.
path
.
join
(
"images"
,
filename
)
def
lookup_file
(
filename
,
prefixes
):
for
prefix
in
prefixes
:
candidate
=
os
.
path
.
join
(
prefix
,
filename
)
if
os
.
path
.
exists
(
candidate
):
return
candidate
local_candidate
=
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
argv
[
0
]),
filename
)
if
os
.
path
.
exists
(
local_candidate
):
return
local_candidate
else
:
return
filename
def
pixmapfile
(
filename
):
...
...
printrun/pronterface_widgets.py
View file @
ab7c2782
...
...
@@ -14,6 +14,7 @@
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
import
wx
import
re
class
macroed
(
wx
.
Dialog
):
"""Really simple editor to edit macro definitions"""
...
...
@@ -43,7 +44,7 @@ class macroed(wx.Dialog):
titlesizer
.
Add
(
self
.
cancelb
)
topsizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
topsizer
.
Add
(
titlesizer
,
0
,
wx
.
EXPAND
)
self
.
e
=
wx
.
TextCtrl
(
self
.
panel
,
style
=
wx
.
TE_MULTILINE
+
wx
.
HSCROLL
,
size
=
(
400
,
400
))
self
.
e
=
wx
.
TextCtrl
(
self
.
panel
,
style
=
wx
.
HSCROLL
|
wx
.
TE_MULTILINE
|
wx
.
TE_RICH2
,
size
=
(
400
,
400
))
if
not
self
.
gcode
:
self
.
e
.
SetValue
(
self
.
unindent
(
definition
))
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