update
This commit is contained in:
19
.CondaPkg/env/Lib/idlelib/editor.py
vendored
19
.CondaPkg/env/Lib/idlelib/editor.py
vendored
@@ -166,8 +166,9 @@ class EditorWindow:
|
||||
text.bind("<3>",self.right_menu_event)
|
||||
|
||||
text.bind('<MouseWheel>', wheel_event)
|
||||
text.bind('<Button-4>', wheel_event)
|
||||
text.bind('<Button-5>', wheel_event)
|
||||
if text._windowingsystem == 'x11':
|
||||
text.bind('<Button-4>', wheel_event)
|
||||
text.bind('<Button-5>', wheel_event)
|
||||
text.bind('<Configure>', self.handle_winconfig)
|
||||
text.bind("<<cut>>", self.cut)
|
||||
text.bind("<<copy>>", self.copy)
|
||||
@@ -913,7 +914,7 @@ class EditorWindow:
|
||||
def ApplyKeybindings(self):
|
||||
"""Apply the virtual, configurable keybindings.
|
||||
|
||||
Alse update hotkeys to current keyset.
|
||||
Also update hotkeys to current keyset.
|
||||
"""
|
||||
# Called from configdialog.activate_config_changes.
|
||||
self.mainmenu.default_keydefs = keydefs = idleConf.GetCurrentKeySet()
|
||||
@@ -1043,7 +1044,9 @@ class EditorWindow:
|
||||
def saved_change_hook(self):
|
||||
short = self.short_title()
|
||||
long = self.long_title()
|
||||
if short and long:
|
||||
if short and long and not macosx.isCocoaTk():
|
||||
# Don't use both values on macOS because
|
||||
# that doesn't match platform conventions.
|
||||
title = short + " - " + long + _py_version
|
||||
elif short:
|
||||
title = short
|
||||
@@ -1058,6 +1061,13 @@ class EditorWindow:
|
||||
self.top.wm_title(title)
|
||||
self.top.wm_iconname(icon)
|
||||
|
||||
if macosx.isCocoaTk():
|
||||
# Add a proxy icon to the window title
|
||||
self.top.wm_attributes("-titlepath", long)
|
||||
|
||||
# Maintain the modification status for the window
|
||||
self.top.wm_attributes("-modified", not self.get_saved())
|
||||
|
||||
def get_saved(self):
|
||||
return self.undo.get_saved()
|
||||
|
||||
@@ -1748,6 +1758,7 @@ def _editor_window(parent): # htest #
|
||||
# Does not stop error, neither does following
|
||||
# edit.text.bind("<<close-window>>", edit.close_event)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unittest import main
|
||||
main('idlelib.idle_test.test_editor', verbosity=2, exit=False)
|
||||
|
||||
Reference in New Issue
Block a user