[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer/src/base Instance.py
From: |
Jason Cater |
Subject: |
gnue/designer/src/base Instance.py |
Date: |
Fri, 04 Apr 2003 23:03:17 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 03/04/04 23:03:16
Modified files:
designer/src/base: Instance.py
Log message:
warn user if file already exists when 'saving as'.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/Instance.py.diff?tr1=1.89&tr2=1.90&r1=text&r2=text
Patches:
Index: gnue/designer/src/base/Instance.py
diff -c gnue/designer/src/base/Instance.py:1.89
gnue/designer/src/base/Instance.py:1.90
*** gnue/designer/src/base/Instance.py:1.89 Fri Apr 4 22:41:55 2003
--- gnue/designer/src/base/Instance.py Fri Apr 4 23:03:16 2003
***************
*** 618,626 ****
style=wxSAVE)
if dlg.ShowModal() == wxID_OK:
! self._path = dlg.GetPath()
! if len(self._path) < 4 or not (self._path[-4] == '.' and
string.lower(self._path[-3:]) in self.properties.fileExtensions.keys()):
! self._path += "." + filterIndex[dlg.GetFilterIndex()]
self.SetTitle (TITLE + " - " + self._path)
self.save()
--- 618,639 ----
style=wxSAVE)
if dlg.ShowModal() == wxID_OK:
! path = dlg.GetPath()
! if len(path) < 4 or not (path[-4] == '.' and string.lower(path[-3:]) in
self.properties.fileExtensions.keys()):
! path += "." + filterIndex[dlg.GetFilterIndex()]
!
! if os.path.isfile(path):
! dlg = wxMessageDialog(NULL,
! _('The file "%s".\n' % path) +
! _("exists. Overwrite?"),
! _("Unsaved Changes"), style=wxYES_NO|wxICON_WARNING)
! save = dlg.ShowModal()
! dlg.Destroy()
! if save == wxID_NO:
! self.OnSaveAs(event)
! return
!
! self._path = path
self.SetTitle (TITLE + " - " + self._path)
self.save()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer/src/base Instance.py,
Jason Cater <=