Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ad9419

Browse files
committed
minor fixes, removed obsolete warning
1 parent 6b7d69d commit 2ad9419

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

Mac/Tools/IDE/PyEdit.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from Carbon import Win
1111
from Carbon import Res
1212
from Carbon import Evt
13+
from Carbon import Qd
1314
import os
1415
import imp
1516
import sys
@@ -365,7 +366,6 @@ def setinfotext(self):
365366
def close(self):
366367
if self.editgroup.editor.changed:
367368
import EasyDialogs
368-
from Carbon import Qd
369369
Qd.InitCursor()
370370
save = EasyDialogs.AskYesNoCancel('Save window "%s" before closing?' % self.title,
371371
default=1, no="Don\xd5t save")
@@ -509,7 +509,7 @@ def _run(self):
509509
if self.run_with_interpreter:
510510
if self.editgroup.editor.changed:
511511
import EasyDialogs
512-
import Qd; Qd.InitCursor()
512+
Qd.InitCursor()
513513
save = EasyDialogs.AskYesNoCancel('Save "%s" before running?' % self.title, 1)
514514
if save > 0:
515515
if self.domenu_save():
@@ -520,16 +520,9 @@ def _run(self):
520520
raise W.AlertError, "Can't run unsaved file"
521521
self._run_with_interpreter()
522522
elif self.run_with_cl_interpreter:
523-
# Until universal newline support
524-
if self._eoln != '\n':
525-
import EasyDialogs
526-
ok = EasyDialogs.AskYesNoCancel('Warning: "%s" does not have Unix line-endings'
527-
% self.title, 1, yes='OK', no='')
528-
if not ok:
529-
return
530523
if self.editgroup.editor.changed:
531524
import EasyDialogs
532-
import Qd; Qd.InitCursor()
525+
Qd.InitCursor()
533526
save = EasyDialogs.AskYesNoCancel('Save "%s" before running?' % self.title, 1)
534527
if save > 0:
535528
if self.domenu_save():

0 commit comments

Comments
 (0)