commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/designer/src base/Instance.py forms/Instan...


From: Jason Cater
Subject: gnue/designer/src base/Instance.py forms/Instan...
Date: Sun, 09 Mar 2003 15:17:40 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    03/03/09 15:17:40

Modified files:
        designer/src/base: Instance.py 
        designer/src/forms: Instance.py 

Log message:
        added dialog warning if a form definition is incomplete

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/Instance.py.diff?tr1=1.84&tr2=1.85&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/Instance.py.diff?tr1=1.32&tr2=1.33&r1=text&r2=text

Patches:
Index: gnue/designer/src/base/Instance.py
diff -c gnue/designer/src/base/Instance.py:1.84 
gnue/designer/src/base/Instance.py:1.85
*** gnue/designer/src/base/Instance.py:1.84     Mon Mar  3 19:29:17 2003
--- gnue/designer/src/base/Instance.py  Sun Mar  9 15:17:40 2003
***************
*** 145,151 ****
  
        if not os.access (location, os.R_OK):
          self.Show(1)
!         if wxMessageDialog(self, \
            _('The requested file does not exist.\n') +
            _('Do you want to create this file?') +
            _('\n\nFile: %s') \
--- 145,151 ----
  
        if not os.access (location, os.R_OK):
          self.Show(1)
!         if wxMessageDialog(self, 
            _('The requested file does not exist.\n') +
            _('Do you want to create this file?') +
            _('\n\nFile: %s') \
***************
*** 533,539 ****
  
    def save(self):
  
!     self.preSave()
  
      location = self._path
      fileHandle = None
--- 533,541 ----
  
    def save(self):
  
!     if self.preSave(): 
!       print "Not saving definition"
!       return
  
      location = self._path
      fileHandle = None
Index: gnue/designer/src/forms/Instance.py
diff -c gnue/designer/src/forms/Instance.py:1.32 
gnue/designer/src/forms/Instance.py:1.33
*** gnue/designer/src/forms/Instance.py:1.32    Thu Mar  6 12:26:54 2003
--- gnue/designer/src/forms/Instance.py Sun Mar  9 15:17:40 2003
***************
*** 205,211 ****
          logic.append(child)
        else:
          other.append(child)
! 
  
      # Reorder the children so items of same class are grouped
      self.rootObject._children = []
--- 205,225 ----
          logic.append(child)
        else:
          other.append(child)
!       
!   
!     if len(logic[0]._children): 
!       valid = 1
!     else: 
!       valid = 0
!       
!     if not valid: 
!       if wxMessageDialog(self, 
!           _('The form definition you are about to save\n') +
!           _('does not appear to be a working definition.') +
!           _('\n\nIf you save an incomplete definition, you\n') + 
!           _('may not be able to reopen it in Designer.'),
!              _("Incomplete Form Definition"), wxYES_NO|wxICON_QUESTION 
).ShowModal() == wxID_NO:
!         return 1
  
      # Reorder the children so items of same class are grouped
      self.rootObject._children = []




reply via email to

[Prev in Thread] Current Thread [Next in Thread]