Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b00d0c49
Kaydet (Commit)
b00d0c49
authored
May 12, 2011
tarafından
Kurt B. Kaiser
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge from 3.1
üst
0ef3e399
0a429823
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
31 deletions
+31
-31
IOBinding.py
Lib/idlelib/IOBinding.py
+22
-22
NEWS.txt
Lib/idlelib/NEWS.txt
+2
-0
ScriptBinding.py
Lib/idlelib/ScriptBinding.py
+7
-9
No files found.
Lib/idlelib/IOBinding.py
Dosyayı görüntüle @
b00d0c49
...
@@ -309,17 +309,20 @@ class IOBinding:
...
@@ -309,17 +309,20 @@ class IOBinding:
return
"yes"
return
"yes"
message
=
"Do you want to save
%
s before closing?"
%
(
message
=
"Do you want to save
%
s before closing?"
%
(
self
.
filename
or
"this untitled document"
)
self
.
filename
or
"this untitled document"
)
m
=
tkMessageBox
.
Message
(
confirm
=
tkMessageBox
.
askyesnocancel
(
title
=
"Save On Close"
,
title
=
"Save On Close"
,
message
=
message
,
message
=
message
,
icon
=
tkMessageBox
.
QUESTION
,
default
=
tkMessageBox
.
YES
,
type
=
tkMessageBox
.
YESNOCANCEL
,
master
=
self
.
text
)
master
=
self
.
text
)
if
confirm
:
reply
=
m
.
show
()
reply
=
"yes"
if
reply
==
"yes"
:
self
.
save
(
None
)
self
.
save
(
None
)
if
not
self
.
get_saved
():
if
not
self
.
get_saved
():
reply
=
"cancel"
reply
=
"cancel"
elif
confirm
is
None
:
reply
=
"cancel"
else
:
reply
=
"no"
self
.
text
.
focus_set
()
self
.
text
.
focus_set
()
return
reply
return
reply
...
@@ -328,7 +331,7 @@ class IOBinding:
...
@@ -328,7 +331,7 @@ class IOBinding:
self
.
save_as
(
event
)
self
.
save_as
(
event
)
else
:
else
:
if
self
.
writefile
(
self
.
filename
):
if
self
.
writefile
(
self
.
filename
):
self
.
set_saved
(
1
)
self
.
set_saved
(
True
)
try
:
try
:
self
.
editwin
.
store_file_breaks
()
self
.
editwin
.
store_file_breaks
()
except
AttributeError
:
# may be a PyShell
except
AttributeError
:
# may be a PyShell
...
@@ -420,15 +423,12 @@ class IOBinding:
...
@@ -420,15 +423,12 @@ class IOBinding:
self
.
text
.
insert
(
"end-1c"
,
"
\n
"
)
self
.
text
.
insert
(
"end-1c"
,
"
\n
"
)
def
print_window
(
self
,
event
):
def
print_window
(
self
,
event
):
m
=
tkMessageBox
.
Message
(
confirm
=
tkMessageBox
.
askokcancel
(
title
=
"Print"
,
title
=
"Print"
,
message
=
"Print to Default Printer"
,
message
=
"Print to Default Printer"
,
icon
=
tkMessageBox
.
QUESTION
,
default
=
tkMessageBox
.
OK
,
type
=
tkMessageBox
.
OKCANCEL
,
master
=
self
.
text
)
default
=
tkMessageBox
.
OK
,
if
not
confirm
:
master
=
self
.
text
)
reply
=
m
.
show
()
if
reply
!=
tkMessageBox
.
OK
:
self
.
text
.
focus_set
()
self
.
text
.
focus_set
()
return
"break"
return
"break"
tempfilename
=
None
tempfilename
=
None
...
@@ -443,8 +443,8 @@ class IOBinding:
...
@@ -443,8 +443,8 @@ class IOBinding:
if
not
self
.
writefile
(
tempfilename
):
if
not
self
.
writefile
(
tempfilename
):
os
.
unlink
(
tempfilename
)
os
.
unlink
(
tempfilename
)
return
"break"
return
"break"
platform
=
os
.
name
platform
=
os
.
name
printPlatform
=
1
printPlatform
=
True
if
platform
==
'posix'
:
#posix platform
if
platform
==
'posix'
:
#posix platform
command
=
idleConf
.
GetOption
(
'main'
,
'General'
,
command
=
idleConf
.
GetOption
(
'main'
,
'General'
,
'print-command-posix'
)
'print-command-posix'
)
...
@@ -452,7 +452,7 @@ class IOBinding:
...
@@ -452,7 +452,7 @@ class IOBinding:
elif
platform
==
'nt'
:
#win32 platform
elif
platform
==
'nt'
:
#win32 platform
command
=
idleConf
.
GetOption
(
'main'
,
'General'
,
'print-command-win'
)
command
=
idleConf
.
GetOption
(
'main'
,
'General'
,
'print-command-win'
)
else
:
#no printing for this platform
else
:
#no printing for this platform
printPlatform
=
0
printPlatform
=
False
if
printPlatform
:
#we can try to print for this platform
if
printPlatform
:
#we can try to print for this platform
command
=
command
%
filename
command
=
command
%
filename
pipe
=
os
.
popen
(
command
,
"r"
)
pipe
=
os
.
popen
(
command
,
"r"
)
...
@@ -466,7 +466,7 @@ class IOBinding:
...
@@ -466,7 +466,7 @@ class IOBinding:
output
=
"Printing command:
%
s
\n
"
%
repr
(
command
)
+
output
output
=
"Printing command:
%
s
\n
"
%
repr
(
command
)
+
output
tkMessageBox
.
showerror
(
"Print status"
,
output
,
master
=
self
.
text
)
tkMessageBox
.
showerror
(
"Print status"
,
output
,
master
=
self
.
text
)
else
:
#no printing for this platform
else
:
#no printing for this platform
message
=
"Printing is not enabled for this platform:
%
s"
%
platform
message
=
"Printing is not enabled for this platform:
%
s"
%
platform
tkMessageBox
.
showinfo
(
"Print status"
,
message
,
master
=
self
.
text
)
tkMessageBox
.
showinfo
(
"Print status"
,
message
,
master
=
self
.
text
)
if
tempfilename
:
if
tempfilename
:
os
.
unlink
(
tempfilename
)
os
.
unlink
(
tempfilename
)
...
...
Lib/idlelib/NEWS.txt
Dosyayı görüntüle @
b00d0c49
...
@@ -3,6 +3,8 @@ What's New in IDLE 3.2.1?
...
@@ -3,6 +3,8 @@ What's New in IDLE 3.2.1?
*Release date: 15-May-11*
*Release date: 15-May-11*
- Issue #11896: Save on Close failed despite selecting "Yes" in dialog.
- Issue #1028: Ctrl-space binding to show completions was causing IDLE to exit.
- Issue #1028: Ctrl-space binding to show completions was causing IDLE to exit.
Tk < 8.5 was sending invalid Unicode null; replaced with valid null.
Tk < 8.5 was sending invalid Unicode null; replaced with valid null.
...
...
Lib/idlelib/ScriptBinding.py
Dosyayı görüntüle @
b00d0c49
...
@@ -174,9 +174,9 @@ class ScriptBinding:
...
@@ -174,9 +174,9 @@ class ScriptBinding:
if
autosave
and
filename
:
if
autosave
and
filename
:
self
.
editwin
.
io
.
save
(
None
)
self
.
editwin
.
io
.
save
(
None
)
else
:
else
:
reply
=
self
.
ask_save_dialog
()
confirm
=
self
.
ask_save_dialog
()
self
.
editwin
.
text
.
focus_set
()
self
.
editwin
.
text
.
focus_set
()
if
reply
==
"ok"
:
if
confirm
:
self
.
editwin
.
io
.
save
(
None
)
self
.
editwin
.
io
.
save
(
None
)
filename
=
self
.
editwin
.
io
.
filename
filename
=
self
.
editwin
.
io
.
filename
else
:
else
:
...
@@ -185,13 +185,11 @@ class ScriptBinding:
...
@@ -185,13 +185,11 @@ class ScriptBinding:
def
ask_save_dialog
(
self
):
def
ask_save_dialog
(
self
):
msg
=
"Source Must Be Saved
\n
"
+
5
*
' '
+
"OK to Save?"
msg
=
"Source Must Be Saved
\n
"
+
5
*
' '
+
"OK to Save?"
mb
=
tkMessageBox
.
Message
(
title
=
"Save Before Run or Check"
,
confirm
=
tkMessageBox
.
askokcancel
(
title
=
"Save Before Run or Check"
,
message
=
msg
,
message
=
msg
,
icon
=
tkMessageBox
.
QUESTION
,
default
=
tkMessageBox
.
OK
,
type
=
tkMessageBox
.
OKCANCEL
,
master
=
self
.
editwin
.
text
)
default
=
tkMessageBox
.
OK
,
return
confirm
master
=
self
.
editwin
.
text
)
return
mb
.
show
()
def
errorbox
(
self
,
title
,
message
):
def
errorbox
(
self
,
title
,
message
):
# XXX This should really be a function of EditorWindow...
# XXX This should really be a function of EditorWindow...
...
...
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