commit-gnue
[Top][All Lists]
Advanced

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

gnue/designer/src Instance.py


From: Arturas Kriukovas
Subject: gnue/designer/src Instance.py
Date: Wed, 03 Jul 2002 11:49:48 -0400

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Arturas Kriukovas <address@hidden>      02/07/03 11:49:48

Modified files:
        designer/src   : Instance.py 

Log message:
        Prepared strings for i18n. Minor code design changes.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/Instance.py.diff?cvsroot=OldCVS&tr1=1.52&tr2=1.53&r1=text&r2=text

Patches:
Index: gnue/designer/src/Instance.py
diff -c gnue/designer/src/Instance.py:1.52 gnue/designer/src/Instance.py:1.53
*** gnue/designer/src/Instance.py:1.52  Fri Jun 28 00:03:37 2002
--- gnue/designer/src/Instance.py       Wed Jul  3 11:49:48 2002
***************
*** 121,130 ****
        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' \
!             % location, "File Not Found", wxYES_NO|wxICON_QUESTION 
).ShowModal() == wxID_NO:
            sys.exit()
          self.Show(0)
          self.__createEmptyInstance()
--- 121,130 ----
        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') \
!             % location, _("File Not Found"), wxYES_NO|wxICON_QUESTION 
).ShowModal() == wxID_NO:
            sys.exit()
          self.Show(0)
          self.__createEmptyInstance()
***************
*** 134,143 ****
        elif not os.access (location, os.W_OK):
          self.Show(1)
          if wxMessageDialog(self, \
!           'The requested file is Read Only.\n'
!           'To save any changes, you will \n'
!           'be required to do a "Save As..."\n\nFile: %s' \
!             % location, "Read Only Warning", wxOK|wxCANCEL|wxICON_EXCLAMATION 
).ShowModal() == wxID_CANCEL:
            sys.exit()
          self.Show(0)
          self.__loadFromFile(location)
--- 134,143 ----
        elif not os.access (location, os.W_OK):
          self.Show(1)
          if wxMessageDialog(self, \
!           _('The requested file is Read Only.\n') +
!           _('To save any changes, you will \n') +
!           _('be required to do a "Save As..."\n\nFile: %s') \
!             % location, _("Read Only Warning"), 
wxOK|wxCANCEL|wxICON_EXCLAMATION ).ShowModal() == wxID_CANCEL:
            sys.exit()
          self.Show(0)
          self.__loadFromFile(location)
***************
*** 245,251 ****
      if not self._isdirty:
        self._isdirty = 1
        if self._path == "":
!         self.SetTitle( TITLE + " - <New %s> *" % self.properties.nickname)
        else:
          self.SetTitle( TITLE + " - " + self._path + " *")
  
--- 245,251 ----
      if not self._isdirty:
        self._isdirty = 1
        if self._path == "":
!         self.SetTitle( TITLE + _(" - <New %s> *") % self.properties.nickname)
        else:
          self.SetTitle( TITLE + " - " + self._path + " *")
  
***************
*** 253,259 ****
      self._isdirty = 0
      self._isnew = 0
      if self._path == "":
!       self.SetTitle( TITLE + " - <New %s>" % self.properties.nickname)
      else:
        self.SetTitle( TITLE + " - " + self._path)
  
--- 253,259 ----
      self._isdirty = 0
      self._isnew = 0
      if self._path == "":
!       self.SetTitle( TITLE + _(" - <New %s>") % self.properties.nickname)
      else:
        self.SetTitle( TITLE + " - " + self._path)
  
***************
*** 385,391 ****
        self._menubar._fileConnect.Enable(event.GetId(),0)
        self.onSetCurrentObject(self._currentObject, __name__)
      except:
!       print "Unable to connect to %s" % conn
  
  
    def OnNew(self, event):
--- 385,391 ----
        self._menubar._fileConnect.Enable(event.GetId(),0)
        self.onSetCurrentObject(self._currentObject, __name__)
      except:
!       print _("Unable to connect to %s") % conn
  
  
    def OnNew(self, event):
***************
*** 415,421 ****
             ( self.properties.fileExtensions[type], type, type)
          filterIndex.append(type)
  
!     dlg = wxFileDialog(NULL, "Save %s As..." % self.properties.description, 
defaultDir=os.getcwd(),
                             wildcard = wildcard,
                             style=wxSAVE)
  
--- 415,421 ----
             ( self.properties.fileExtensions[type], type, type)
          filterIndex.append(type)
  
!     dlg = wxFileDialog(NULL, _("Save %s As...") % 
self.properties.description, defaultDir=os.getcwd(),
                             wildcard = wildcard,
                             style=wxSAVE)
  
***************
*** 432,440 ****
    def OnClose(self, event):
      if self.isDirty():
        dlg = wxMessageDialog(NULL,
!               "This document has unsaved changes.\n"
!               "Save changes before closing?",
!               "Unsaved Changes", style=wxYES_NO|wxCANCEL|wxICON_WARNING)
        save = dlg.ShowModal()
        dlg.Destroy()
        if save == wxID_YES:
--- 432,440 ----
    def OnClose(self, event):
      if self.isDirty():
        dlg = wxMessageDialog(NULL,
!               _("This document has unsaved changes.\n") +
!               _("Save changes before closing?"),
!               _("Unsaved Changes"), style=wxYES_NO|wxCANCEL|wxICON_WARNING)
        save = dlg.ShowModal()
        dlg.Destroy()
        if save == wxID_YES:
***************
*** 448,462 ****
      self.Destroy()
  
    def OnDebugRun (self, event):
!     tmpLevel=0
!     tmpRez=0
!     tmpMessage="Please enter debugging level - integer [0..n]"
!     tmpPrompt="Level:"
!     tmpCaption="Choose debug level"
!     
tmpRez=wxGetNumberFromUser(tmpMessage,tmpPrompt,tmpCaption,tmpLevel,0,10,NULL)
!     if (tmpRez==-1):
!       tmpMessage="Debugging has been cancelled."
!       tmpCaption="Debugging..."
        wxMessageBox(tmpMessage,tmpCaption,wxOK|wxCENTRE,NULL,-1,-1)
      else:
        GDebug.setDebug(tmpRez,"");
--- 448,462 ----
      self.Destroy()
  
    def OnDebugRun (self, event):
!     tmpLevel = 0
!     tmpRez = 0
!     tmpMessage = _("Please enter debugging level - integer [0..n]")
!     tmpPrompt = _("Level:")
!     tmpCaption = _("Choose debug level")
!     tmpRez = 
wxGetNumberFromUser(tmpMessage,tmpPrompt,tmpCaption,tmpLevel,0,10,NULL)
!     if (tmpRez == -1):
!       tmpMessage = _("Debugging has been cancelled.")
!       tmpCaption = _("Debugging...")
        wxMessageBox(tmpMessage,tmpCaption,wxOK|wxCENTRE,NULL,-1,-1)
      else:
        GDebug.setDebug(tmpRez,"");



reply via email to

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