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
66e53854
Commit
66e53854
authored
Oct 30, 1999
by
Just van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- windowbounds() now works with multiple screens (window position prefs!)
- Minor tab behavior tweak -- jvr
parent
7171df3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
Mac/Tools/IDE/Wwindows.py
Mac/Tools/IDE/Wwindows.py
+12
-5
No files found.
Mac/Tools/IDE/Wwindows.py
View file @
66e53854
...
...
@@ -109,11 +109,13 @@ class Window(FrameWork.Window, Wbase.SelectableWidget):
for
w
in
self
.
_widgets
:
w
.
forall_frombottom
(
"open"
)
self
.
_maketabchain
()
if
self
.
_tabchain
:
self
.
_tabchain
[
0
].
select
(
1
)
if
self
.
_tabbable
:
self
.
bind
(
'tab'
,
self
.
nextwidget
)
self
.
bind
(
'shifttab'
,
self
.
previouswidget
)
else
:
self
.
_hasselframes
=
0
if
self
.
_tabchain
:
self
.
_tabchain
[
0
].
select
(
1
)
self
.
do_postopen
()
def
close
(
self
):
...
...
@@ -581,14 +583,19 @@ def getnextwindowpos():
_windowcounter
=
_windowcounter
+
1
return
l
,
t
def
windowbounds
(
preferredsize
,
minsize
=
None
):
def
windowbounds
(
preferredsize
,
minsize
=
None
):
"Return sensible window bounds"
global
_windowcounter
if
len
(
preferredsize
)
==
4
:
bounds
=
l
,
t
,
r
,
b
=
preferredsize
union
=
Qd
.
UnionRect
(
bounds
,
Qd
.
qd
.
screenBits
.
bounds
)
if
union
==
Qd
.
qd
.
screenBits
.
bounds
:
desktopRgn
=
Win
.
GetGrayRgn
()
tempRgn
=
Qd
.
NewRgn
()
Qd
.
RectRgn
(
tempRgn
,
bounds
)
union
=
Qd
.
UnionRgn
(
tempRgn
,
desktopRgn
,
tempRgn
)
equal
=
Qd
.
EqualRgn
(
tempRgn
,
desktopRgn
)
Qd
.
DisposeRgn
(
tempRgn
)
if
equal
:
return
bounds
else
:
preferredsize
=
r
-
l
,
b
-
t
...
...
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