예제 #1
0
파일: basics.py 프로젝트: scott91e1/pypad
def pgrt(event):
    old = editor.select()
    if old == len(editor.buffers()) - 1:
        new = 0
    else:
        new = old + 1
    editor.select(new)
예제 #2
0
파일: basics.py 프로젝트: scott91e1/pypad
def pglt(event):
    old = editor.select()
    if old == 0:
        new = len(editor.buffers()) - 1
    else:
        new = old - 1
    editor.select(new)
예제 #3
0
파일: basics.py 프로젝트: Nazek42/pypad
def pglt(event):
    old = editor.select()
    if old == 0:
        new = len(editor.buffers()) - 1
    else:
        new = old - 1
    editor.select(new)
예제 #4
0
파일: basics.py 프로젝트: Nazek42/pypad
def pgrt(event):
    old = editor.select()
    if old == len(editor.buffers()) - 1:
        new = 0
    else:
        new = old + 1
    editor.select(new)
예제 #5
0
파일: basics.py 프로젝트: scott91e1/pypad
def quit():
    for i in editor.tabs():
        editor.select(i)
        buf = editor.buffer()
        #print("DEBUG: buf.path => |%s|" % buf.path)
        if buf.is_untitled and buf.text not in '\n' and _asksavep():
            save()
    root.destroy()
예제 #6
0
파일: basics.py 프로젝트: Nazek42/pypad
def quit():
    for i in editor.tabs():
        editor.select(i)
        buf = editor.buffer()
        #print("DEBUG: buf.path => |%s|" % buf.path)
        if buf.is_untitled and buf.text not in '\n' and _asksavep():
            save()
    root.destroy()
예제 #7
0
파일: basics.py 프로젝트: scott91e1/pypad
def open_(event):
    path = askopenfilename()
    # If the user clicked 'Cancel', return without changing anything
    if not path:
        return

    with open(path, 'r+t') as infile:
        editor.add(Buffer(file=infile, text=infile.read()))
        editor.select('end')
예제 #8
0
파일: basics.py 프로젝트: Nazek42/pypad
def open_(event):
    path = askopenfilename()
    # If the user clicked 'Cancel', return without changing anything
    if not path:
        return

    with open(path, 'r+t') as infile:
        editor.add(Buffer(file=infile, text=infile.read()))
        editor.select('end')
예제 #9
0
파일: basics.py 프로젝트: scott91e1/pypad
def new(event):
    editor.add(Buffer())
    editor.select('end')
예제 #10
0
파일: basics.py 프로젝트: Nazek42/pypad
def new(event):
    editor.add(Buffer())
    editor.select('end')