コード例 #1
0
ファイル: basics.py プロジェクト: scott91e1/pypad
def close(event):
    if len(editor.buffers()) == 1:
        quit()
    else:
        for buf in editor.buffers():
            if buf.is_untitled and buf.text not in '\n' and _asksavep():
                save()
            editor.forget(buf)
    editor.update_titlebar()
コード例 #2
0
ファイル: basics.py プロジェクト: Nazek42/pypad
def close(event):
    if len(editor.buffers()) == 1:
        quit()
    else:
        for buf in editor.buffers():
            if buf.is_untitled and buf.text not in '\n' and _asksavep():
                save()
            editor.forget(buf)
    editor.update_titlebar()
コード例 #3
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)
コード例 #4
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)
コード例 #5
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)
コード例 #6
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)