My hands are typing code

This commit is contained in:
Skyler Lehmkuhl 2013-12-12 01:35:06 -05:00
parent 270982cce8
commit 24100e20ca
4 changed files with 19 additions and 5 deletions

View File

@ -4,6 +4,10 @@
from GUI import Application, ScrollableView, Window, Font, Colors from GUI import Application, ScrollableView, Window, Font, Colors
from pygments import highlight from pygments import highlight
from pygments.lexers import ActionScriptLexer from pygments.lexers import ActionScriptLexer
# from pygments.lexers import *
if False:
from pygments.lexers import text, templates, math, dotnet, parsers, hdl, asm, foxpro, special
from pygments.styles import default
from pygments.formatter import Formatter from pygments.formatter import Formatter
from pygments.filters import NameHighlightFilter from pygments.filters import NameHighlightFilter
from pygments.token import Token from pygments.token import Token

View File

@ -74,6 +74,7 @@ class maybe:
return self.edit return self.edit
svlgui.undo_stack = undo_stack svlgui.undo_stack = undo_stack
svlgui.redo_stack = redo_stack
svlgui.edit = edit svlgui.edit = edit
svlgui.maybe = maybe svlgui.maybe = maybe
svlgui.clear = clear svlgui.clear = clear

View File

@ -16,8 +16,11 @@ ez_setup.use_setuptools()
import sys import sys
import shutil import shutil
import pygments import pygments
from pygments.lexers import *
from setuptools import setup from setuptools import setup
# if sys.platform == 'darwin':
# shutil.copytree("/".join(pygments.__file__.split("/")[:-1]), "pygments")
mainscript = 'lightningbeam.py' mainscript = 'lightningbeam.py'

View File

@ -1768,6 +1768,11 @@ class Shape (object):
return retval return retval
class Text (object): class Text (object):
def __getstate__(self):
dict = self.__dict__.copy()
dict['font'] = None
print dict
return dict
def __init__(self,text="",x=0,y=0): def __init__(self,text="",x=0,y=0):
global SITER global SITER
global Library global Library
@ -2811,8 +2816,9 @@ class TemporaryGroup(Group):
if key in ("delete", "backspace"): if key in ("delete", "backspace"):
del self1.parent[self1.parent.index(self1)] # Need to clean up deletion del self1.parent[self1.parent.index(self1)] # Need to clean up deletion
elif key in [" ", "s", "r", "e", "b", "p"]: elif key in [" ", "s", "r", "e", "b", "p"]:
svlgui.MODE=key global MODE
svlgui.set_cursor({" ":"arrow","s":"arrow","r":"crosshair","e":"crosshair", MODE=key
set_cursor({" ":"arrow","s":"arrow","r":"crosshair","e":"crosshair",
"b":"arrow","p":"arrow"}[key], MainWindow.stage) "b":"arrow","p":"arrow"}[key], MainWindow.stage)
misc_funcs.update_tooloptions() misc_funcs.update_tooloptions()
elif key=="F6": elif key=="F6":
@ -3046,7 +3052,7 @@ class ColorSelectionWindow:
undo_stack.append(edit("fill", root.descendItem().activelayer.currentselect, \ undo_stack.append(edit("fill", root.descendItem().activelayer.currentselect, \
{"filled":root.descendItem().activelayer.currentselect.filled, \ {"filled":root.descendItem().activelayer.currentselect.filled, \
"fillcolor":root.descendItem().activelayer.currentselect.fillcolor}, "fillcolor":root.descendItem().activelayer.currentselect.fillcolor},
{"filled":True, "fillcolor":svlgui.FILLCOLOR})) {"filled":True, "fillcolor":FILLCOLOR}))
clear(redo_stack) clear(redo_stack)
root.descendItem().activelayer.currentselect.fillcolor = FILLCOLOR root.descendItem().activelayer.currentselect.fillcolor = FILLCOLOR
root.descendItem().activelayer.currentselect.filled = True root.descendItem().activelayer.currentselect.filled = True