Exemplo n.º 1
0
def pgrt(event):
    old = editor.select()
    if old == len(editor.buffers()) - 1:
        new = 0
    else:
        new = old + 1
    editor.select(new)
Exemplo n.º 2
0
def pglt(event):
    old = editor.select()
    if old == 0:
        new = len(editor.buffers()) - 1
    else:
        new = old - 1
    editor.select(new)
Exemplo n.º 3
0
def pglt(event):
    old = editor.select()
    if old == 0:
        new = len(editor.buffers()) - 1
    else:
        new = old - 1
    editor.select(new)
Exemplo n.º 4
0
def pgrt(event):
    old = editor.select()
    if old == len(editor.buffers()) - 1:
        new = 0
    else:
        new = old + 1
    editor.select(new)
Exemplo n.º 5
0
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()
Exemplo n.º 6
0
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()
Exemplo n.º 7
0
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')
Exemplo n.º 8
0
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')
Exemplo n.º 9
0
def new(event):
    editor.add(Buffer())
    editor.select('end')
Exemplo n.º 10
0
def new(event):
    editor.add(Buffer())
    editor.select('end')