axis: whitespace only
EDIT: fix merge conflicts 12 Dec 2018 <phillc54> Signed-off-by: Robert W. Ellenberg <rwe24g@gmail.com>
This commit is contained in:
parent
8755bc5895
commit
3b0eb77bc1
1 changed files with 29 additions and 17 deletions
|
|
@ -37,7 +37,7 @@ import array, time, atexit, tempfile, shutil, errno, thread, select, re, getopt
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
# Print Tk errors to stdout. python.org/sf/639266
|
# Print Tk errors to stdout. python.org/sf/639266
|
||||||
import Tkinter
|
import Tkinter
|
||||||
OldTk = Tkinter.Tk
|
OldTk = Tkinter.Tk
|
||||||
class Tk(OldTk):
|
class Tk(OldTk):
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
|
|
@ -601,6 +601,18 @@ class MyOpengl(GlCanonDraw, Opengl):
|
||||||
|
|
||||||
text.delete("0.0", "end")
|
text.delete("0.0", "end")
|
||||||
t = droposstrs[:]
|
t = droposstrs[:]
|
||||||
|
i = 0
|
||||||
|
for ts in t:
|
||||||
|
if i < len(homed) and homed[i]:
|
||||||
|
t[i] += "*"
|
||||||
|
else:
|
||||||
|
t[i] += " "
|
||||||
|
if i < len(homed) and limit[i]:
|
||||||
|
t[i] += "!" # !!!1!
|
||||||
|
else:
|
||||||
|
t[i] += " "
|
||||||
|
i+=1
|
||||||
|
|
||||||
text.insert("end", "\n".join(t))
|
text.insert("end", "\n".join(t))
|
||||||
|
|
||||||
window_height = text.winfo_height()
|
window_height = text.winfo_height()
|
||||||
|
|
@ -737,7 +749,7 @@ class LivePlotter:
|
||||||
|
|
||||||
def error_task(self):
|
def error_task(self):
|
||||||
error = e.poll()
|
error = e.poll()
|
||||||
while error:
|
while error:
|
||||||
kind, text = error
|
kind, text = error
|
||||||
if kind in (linuxcnc.NML_ERROR, linuxcnc.OPERATOR_ERROR):
|
if kind in (linuxcnc.NML_ERROR, linuxcnc.OPERATOR_ERROR):
|
||||||
icon = "error"
|
icon = "error"
|
||||||
|
|
@ -1261,7 +1273,7 @@ tabs_preview = str(root_window.tk.call("set", "_tabs_preview"))
|
||||||
tabs_numbers = str(root_window.tk.call("set", "_tabs_numbers"))
|
tabs_numbers = str(root_window.tk.call("set", "_tabs_numbers"))
|
||||||
pane_top = str(root_window.tk.call("set", "pane_top"))
|
pane_top = str(root_window.tk.call("set", "pane_top"))
|
||||||
pane_bottom = str(root_window.tk.call("set", "pane_bottom"))
|
pane_bottom = str(root_window.tk.call("set", "pane_bottom"))
|
||||||
widgets = nf.Widgets(root_window,
|
widgets = nf.Widgets(root_window,
|
||||||
("help_window", Toplevel, ".keys"),
|
("help_window", Toplevel, ".keys"),
|
||||||
("about_window", Toplevel, ".about"),
|
("about_window", Toplevel, ".about"),
|
||||||
("text", Text, pane_bottom + ".t.text"),
|
("text", Text, pane_bottom + ".t.text"),
|
||||||
|
|
@ -1420,7 +1432,7 @@ def set_hal_jogincrement():
|
||||||
def jogspeed_listbox_change(dummy, value):
|
def jogspeed_listbox_change(dummy, value):
|
||||||
global jogincr_index_last
|
global jogincr_index_last
|
||||||
# pdb.set_trace()
|
# pdb.set_trace()
|
||||||
# FJ: curselection is not always up to date here, so
|
# FJ: curselection is not always up to date here, so
|
||||||
# do a linear search by hand
|
# do a linear search by hand
|
||||||
iterator = root_window.call(widgets.jogincr._w, "list", "get", "0", "end")
|
iterator = root_window.call(widgets.jogincr._w, "list", "get", "0", "end")
|
||||||
idx = 0
|
idx = 0
|
||||||
|
|
@ -1460,7 +1472,7 @@ def jogspeed_incremental(dir=1):
|
||||||
jogincr_index_last -= 1
|
jogincr_index_last -= 1
|
||||||
if jogincr_index_last < 1:
|
if jogincr_index_last < 1:
|
||||||
jogincr_index_last = 1
|
jogincr_index_last = 1
|
||||||
root_window.call(widgets.jogincr._w, "select", jogincr_index_last)
|
root_window.call(widgets.jogincr._w, "select", jogincr_index_last)
|
||||||
set_hal_jogincrement()
|
set_hal_jogincrement()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1637,7 +1649,7 @@ class _prompt_float:
|
||||||
else:
|
else:
|
||||||
self.w.set(value)
|
self.w.set(value)
|
||||||
|
|
||||||
if ok:
|
if ok:
|
||||||
self.ok.configure(state="normal")
|
self.ok.configure(state="normal")
|
||||||
else:
|
else:
|
||||||
self.ok.configure(state="disabled")
|
self.ok.configure(state="disabled")
|
||||||
|
|
@ -1704,7 +1716,7 @@ class _prompt_touchoff(_prompt_float):
|
||||||
mb.configure(takefocus=1)
|
mb.configure(takefocus=1)
|
||||||
l.pack(side="left")
|
l.pack(side="left")
|
||||||
mb.pack(side="left")
|
mb.pack(side="left")
|
||||||
f.pack(side="top")
|
f.pack(side="top")
|
||||||
self.buttons.tkraise()
|
self.buttons.tkraise()
|
||||||
if not tool_only:
|
if not tool_only:
|
||||||
for i in [1,2,3,4,5,6,7,8,9]:
|
for i in [1,2,3,4,5,6,7,8,9]:
|
||||||
|
|
@ -1727,7 +1739,7 @@ class _prompt_touchoff(_prompt_float):
|
||||||
def result(self):
|
def result(self):
|
||||||
if self.u.get(): return self.v.get(), self.c.get()
|
if self.u.get(): return self.v.get(), self.c.get()
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
def prompt_touchoff(title, text, default, tool_only, system=None):
|
def prompt_touchoff(title, text, default, tool_only, system=None):
|
||||||
t = _prompt_touchoff(title=title,
|
t = _prompt_touchoff(title=title,
|
||||||
text_pattern=text,
|
text_pattern=text,
|
||||||
|
|
@ -1925,7 +1937,7 @@ class TclCommands(nf.TclCommands):
|
||||||
|
|
||||||
def toggle_tto_g11(event=None):
|
def toggle_tto_g11(event=None):
|
||||||
ap.putpref("tto_g11", vars.tto_g11.get())
|
ap.putpref("tto_g11", vars.tto_g11.get())
|
||||||
|
|
||||||
def toggle_optional_stop(event=None):
|
def toggle_optional_stop(event=None):
|
||||||
c.set_optional_stop(vars.optional_stop.get())
|
c.set_optional_stop(vars.optional_stop.get())
|
||||||
ap.putpref("optional_stop", vars.optional_stop.get())
|
ap.putpref("optional_stop", vars.optional_stop.get())
|
||||||
|
|
@ -1979,7 +1991,7 @@ class TclCommands(nf.TclCommands):
|
||||||
sum(dist(l[1][:3], l[2][:3])/mf for l in o.canon.traverse) +
|
sum(dist(l[1][:3], l[2][:3])/mf for l in o.canon.traverse) +
|
||||||
o.canon.dwell_time
|
o.canon.dwell_time
|
||||||
)
|
)
|
||||||
|
|
||||||
props['g0'] = "%f %s".replace("%f", fmt) % (from_internal_linear_unit(g0, conv), units)
|
props['g0'] = "%f %s".replace("%f", fmt) % (from_internal_linear_unit(g0, conv), units)
|
||||||
props['g1'] = "%f %s".replace("%f", fmt) % (from_internal_linear_unit(g1, conv), units)
|
props['g1'] = "%f %s".replace("%f", fmt) % (from_internal_linear_unit(g1, conv), units)
|
||||||
if gt > 120:
|
if gt > 120:
|
||||||
|
|
@ -2403,7 +2415,7 @@ class TclCommands(nf.TclCommands):
|
||||||
if history_size != -1:
|
if history_size != -1:
|
||||||
for idx in range(history_size - 1):
|
for idx in range(history_size - 1):
|
||||||
f.write("%s\n" % widgets.mdi_history.get(idx, idx))
|
f.write("%s\n" % widgets.mdi_history.get(idx, idx))
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
print >>sys.stderr, "Can't open MDI history file [%s] for writing" % file_name
|
print >>sys.stderr, "Can't open MDI history file [%s] for writing" % file_name
|
||||||
|
|
@ -2667,7 +2679,7 @@ class TclCommands(nf.TclCommands):
|
||||||
s.poll()
|
s.poll()
|
||||||
o.tkRedraw()
|
o.tkRedraw()
|
||||||
reload_file(False)
|
reload_file(False)
|
||||||
|
|
||||||
def touch_off_system(event=None, new_axis_value = None):
|
def touch_off_system(event=None, new_axis_value = None):
|
||||||
global system
|
global system
|
||||||
if not manual_ok(): return
|
if not manual_ok(): return
|
||||||
|
|
@ -2905,7 +2917,7 @@ class TclCommands(nf.TclCommands):
|
||||||
|
|
||||||
commands = TclCommands(root_window)
|
commands = TclCommands(root_window)
|
||||||
|
|
||||||
vars = nf.Variables(root_window,
|
vars = nf.Variables(root_window,
|
||||||
("linuxcnctop_command", StringVar),
|
("linuxcnctop_command", StringVar),
|
||||||
("emcini", StringVar),
|
("emcini", StringVar),
|
||||||
("mdi_command", StringVar),
|
("mdi_command", StringVar),
|
||||||
|
|
@ -3119,7 +3131,7 @@ try:
|
||||||
history_size += 1
|
history_size += 1
|
||||||
else:
|
else:
|
||||||
skip -= 1
|
skip -= 1
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
|
|
@ -3602,7 +3614,7 @@ if increments:
|
||||||
root_window.call(widgets.jogincr._w, "list", "delete", "1", "end")
|
root_window.call(widgets.jogincr._w, "list", "delete", "1", "end")
|
||||||
root_window.call(widgets.jogincr._w, "list", "insert", "end", *increments)
|
root_window.call(widgets.jogincr._w, "list", "insert", "end", *increments)
|
||||||
widgets.jogincr.configure(command= jogspeed_listbox_change)
|
widgets.jogincr.configure(command= jogspeed_listbox_change)
|
||||||
root_window.call(widgets.jogincr._w, "select", 0)
|
root_window.call(widgets.jogincr._w, "select", 0)
|
||||||
|
|
||||||
vcp = inifile.find("DISPLAY", "PYVCP")
|
vcp = inifile.find("DISPLAY", "PYVCP")
|
||||||
|
|
||||||
|
|
@ -3726,7 +3738,7 @@ def get_coordinate_font(large):
|
||||||
coordinate_font = "courier bold 20"
|
coordinate_font = "courier bold 20"
|
||||||
else:
|
else:
|
||||||
coordinate_font = "courier bold 11"
|
coordinate_font = "courier bold 11"
|
||||||
|
|
||||||
if coordinate_font not in font_cache:
|
if coordinate_font not in font_cache:
|
||||||
font_cache[coordinate_font] = \
|
font_cache[coordinate_font] = \
|
||||||
glnav.use_pango_font(coordinate_font, 0, 128)
|
glnav.use_pango_font(coordinate_font, 0, 128)
|
||||||
|
|
@ -3742,7 +3754,7 @@ init()
|
||||||
|
|
||||||
#right click menu for the program
|
#right click menu for the program
|
||||||
def rClicker(e):
|
def rClicker(e):
|
||||||
|
|
||||||
def select_run_from(e):
|
def select_run_from(e):
|
||||||
commands.task_run_line()
|
commands.task_run_line()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue