Commit 1e91e807 authored by Cyril Laguilhon-Debat's avatar Cyril Laguilhon-Debat

Removing Tab chars, adding "Clear" button, and resizing translations

parent b03443cc
...@@ -343,11 +343,11 @@ msgstr "Charger un fichier" ...@@ -343,11 +343,11 @@ msgstr "Charger un fichier"
#: pronterface.py:426 #: pronterface.py:426
msgid "SD Upload" msgid "SD Upload"
msgstr "Copier sur la carte SD" msgstr "Copier sur SD"
#: pronterface.py:430 #: pronterface.py:430
msgid "SD Print" msgid "SD Print"
msgstr "Imprimer depuis la carte SD" msgstr "Imprimer depuis SD"
#: pronterface.py:438 #: pronterface.py:438
#: pronterface.py:1021 #: pronterface.py:1021
...@@ -359,10 +359,14 @@ msgstr "Imprimer depuis la carte SD" ...@@ -359,10 +359,14 @@ msgstr "Imprimer depuis la carte SD"
msgid "Pause" msgid "Pause"
msgstr "Pause" msgstr "Pause"
#: pronterface.py:452 #: pronterface.py:458
msgid "Send" msgid "Send"
msgstr "Envoyer" msgstr "Envoyer"
#: pronterface.py:462
msgid "Clear"
msgstr "Effacer"
#: pronterface.py:460 #: pronterface.py:460
#: pronterface.py:518 #: pronterface.py:518
msgid "mm/min" msgid "mm/min"
......
#!/usr/bin/env python #!/usr/bin/env python
# Set up Internationalization using gettext # Set up Internationalization using gettext
import gettext # searching for installed locales on /usr/share; uses relative folder if not found (windows)
gettext.install('pronterface', './locale', unicode=1) import os, gettext
if os.path.exists('/usr/share/pronterface/locale'):
gettext.install('pronterface', '/usr/share/pronterface/locale', unicode=1)
else:
gettext.install('pronterface', './locale', unicode=1)
try: try:
import wx import wx
except: except:
print _("WX is not installed. This program requires WX to run.") print _("WX is not installed. This program requires WX to run.")
raise raise
import printcore, os, sys, glob, time, threading, traceback, StringIO, gviz, traceback, cStringIO import printcore, sys, glob, time, threading, traceback, StringIO, gviz, traceback, cStringIO
try: try:
os.chdir(os.path.split(__file__)[0]) os.chdir(os.path.split(__file__)[0])
except: except:
...@@ -285,6 +290,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -285,6 +290,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
m.AppendSubMenu(self.macros_menu, _("&Macros")) m.AppendSubMenu(self.macros_menu, _("&Macros"))
self.Bind(wx.EVT_MENU, self.new_macro, self.macros_menu.Append(-1, _("<&New...>"))) self.Bind(wx.EVT_MENU, self.new_macro, self.macros_menu.Append(-1, _("<&New...>")))
self.Bind(wx.EVT_MENU, lambda *e:options(self), m.Append(-1,_("&Options"),_(" Options dialog"))) self.Bind(wx.EVT_MENU, lambda *e:options(self), m.Append(-1,_("&Options"),_(" Options dialog")))
if sys.platform != 'darwin': if sys.platform != 'darwin':
self.Bind(wx.EVT_MENU, lambda x:threading.Thread(target=lambda :self.do_skein("set")).start(), m.Append(-1,_("SFACT Settings"),_(" Adjust SFACT settings"))) self.Bind(wx.EVT_MENU, lambda x:threading.Thread(target=lambda :self.do_skein("set")).start(), m.Append(-1,_("SFACT Settings"),_(" Adjust SFACT settings")))
try: try:
...@@ -445,14 +451,17 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -445,14 +451,17 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.logbox.SetEditable(0) self.logbox.SetEditable(0)
lrs.Add(self.logbox) lrs.Add(self.logbox)
lbrs=wx.BoxSizer(wx.HORIZONTAL) lbrs=wx.BoxSizer(wx.HORIZONTAL)
self.commandbox=wx.TextCtrl(self.panel,size=(250,30),pos=(440,420),style = wx.TE_PROCESS_ENTER) self.commandbox=wx.TextCtrl(self.panel,size=(240,30),pos=(440,420),style = wx.TE_PROCESS_ENTER)
self.commandbox.Bind(wx.EVT_TEXT_ENTER,self.sendline) self.commandbox.Bind(wx.EVT_TEXT_ENTER,self.sendline)
#self.printerControls.append(self.commandbox) #self.printerControls.append(self.commandbox)
lbrs.Add(self.commandbox) lbrs.Add(self.commandbox)
self.sendbtn=wx.Button(self.panel,-1,_("Send"),pos=(700,420)) self.sendbtn=wx.Button(self.panel,-1,_("Send"),size=(55,28), pos=(700,420))
self.sendbtn.Bind(wx.EVT_BUTTON,self.sendline) self.sendbtn.Bind(wx.EVT_BUTTON,self.sendline)
#self.printerControls.append(self.sendbtn) #self.printerControls.append(self.sendbtn)
lbrs.Add(self.sendbtn) lbrs.Add(self.sendbtn)
self.clearbtn=wx.Button(self.panel,-1,_("Clear"),size=(55,28), pos=(750,420))
self.clearbtn.Bind(wx.EVT_BUTTON,self.clearOutput)
lbrs.Add(self.clearbtn)
lrs.Add(lbrs) lrs.Add(lbrs)
#left pane #left pane
...@@ -820,6 +829,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -820,6 +829,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.onecmd(str(command)) self.onecmd(str(command))
self.commandbox.SetSelection(0,len(command)) self.commandbox.SetSelection(0,len(command))
def clearOutput(self,e):
self.logbox.Clear()
def statuschecker(self): def statuschecker(self):
try: try:
while(self.statuscheck): while(self.statuscheck):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment