Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7a16207c
Commit
7a16207c
authored
Oct 22, 2014
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #3068: Add Idle extension configuration dialog to Options menu.
Original patch by Tal Einat.
parent
ed91883b
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
278 additions
and
20 deletions
+278
-20
Lib/idlelib/Bindings.py
Lib/idlelib/Bindings.py
+2
-1
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+4
-0
Lib/idlelib/configDialog.py
Lib/idlelib/configDialog.py
+258
-15
Lib/idlelib/configHandler.py
Lib/idlelib/configHandler.py
+3
-0
Lib/idlelib/idle_test/htest.py
Lib/idlelib/idle_test/htest.py
+9
-0
Lib/idlelib/macosxSupport.py
Lib/idlelib/macosxSupport.py
+2
-4
No files found.
Lib/idlelib/Bindings.py
View file @
7a16207c
...
...
@@ -75,7 +75,8 @@ menudefs = [
(
'!_Auto-open Stack Viewer'
,
'<<toggle-jit-stack-viewer>>'
),
]),
(
'options'
,
[
(
'_Configure IDLE...'
,
'<<open-config-dialog>>'
),
(
'Configure _IDLE'
,
'<<open-config-dialog>>'
),
(
'Configure _Extensions'
,
'<<open-config-extensions-dialog>>'
),
None
,
]),
(
'help'
,
[
...
...
Lib/idlelib/EditorWindow.py
View file @
7a16207c
...
...
@@ -216,6 +216,8 @@ class EditorWindow(object):
text
.
bind
(
"<<python-docs>>"
,
self
.
python_docs
)
text
.
bind
(
"<<about-idle>>"
,
self
.
about_dialog
)
text
.
bind
(
"<<open-config-dialog>>"
,
self
.
config_dialog
)
text
.
bind
(
"<<open-config-extensions-dialog>>"
,
self
.
config_extensions_dialog
)
text
.
bind
(
"<<open-module>>"
,
self
.
open_module
)
text
.
bind
(
"<<do-nothing>>"
,
lambda
event
:
"break"
)
text
.
bind
(
"<<select-all>>"
,
self
.
select_all
)
...
...
@@ -570,6 +572,8 @@ class EditorWindow(object):
def
config_dialog
(
self
,
event
=
None
):
configDialog
.
ConfigDialog
(
self
.
top
,
'Settings'
)
def
config_extensions_dialog
(
self
,
event
=
None
):
configDialog
.
ConfigExtensionsDialog
(
self
.
top
)
def
help_dialog
(
self
,
event
=
None
):
if
self
.
root
:
...
...
Lib/idlelib/configDialog.py
View file @
7a16207c
This diff is collapsed.
Click to expand it.
Lib/idlelib/configHandler.py
View file @
7a16207c
...
...
@@ -45,6 +45,9 @@ class IdleConfParser(ConfigParser):
Get an option value for given section/option or return default.
If type is specified, return as type.
"""
# TODO Use default as fallback, at least if not None
# Should also print Warning(file, section, option).
# Currently may raise ValueError
if
not
self
.
has_option
(
section
,
option
):
return
default
if
type
==
'bool'
:
...
...
Lib/idlelib/idle_test/htest.py
View file @
7a16207c
...
...
@@ -93,6 +93,15 @@ _class_browser_spec = {
"Double clicking on items prints a traceback for an exception "
"that is ignored."
}
ConfigExtensionsDialog_spec
=
{
'file'
:
'configDialog'
,
'kwds'
:
{
'title'
:
'Test Extension Configuration'
,
'_htest'
:
True
,},
'msg'
:
"IDLE extensions dialog.
\
n
"
"
\
n
[Ok] to close the dialog.[Apply] to apply the settings and "
"and [Cancel] to revert all changes.
\
n
Re-run the test to ensure "
"changes made have persisted."
}
_color_delegator_spec
=
{
'file'
:
'ColorDelegator'
,
...
...
Lib/idlelib/macosxSupport.py
View file @
7a16207c
...
...
@@ -142,11 +142,9 @@ def overrideRootMenu(root, flist):
# Remove the 'About' entry from the help menu, it is in the application
# menu
del
Bindings
.
menudefs
[
-
1
][
1
][
0
:
2
]
# Remove the 'Configure' entry from the options menu, it is in the
# Remove the 'Configure Idle' entry from the options menu, it is in the
# application menu as 'Preferences'
del
Bindings
.
menudefs
[
-
2
][
1
][
0
:
2
]
del
Bindings
.
menudefs
[
-
2
][
1
][
0
]
menubar
=
Menu
(
root
)
root
.
configure
(
menu
=
menubar
)
menudict
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment