commit-gnue
[Top][All Lists]
Advanced

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

gnue/designer/src Designer.py base/Instance.py ...


From: James Thompson
Subject: gnue/designer/src Designer.py base/Instance.py ...
Date: Fri, 04 Apr 2003 15:56:55 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     James Thompson <address@hidden> 03/04/04 15:56:55

Modified files:
        designer/src   : Designer.py 
        designer/src/base: Instance.py MRUManager.py 
        designer/src/forms/LayoutEditor: LayoutEditor.py 

Log message:
        removed extra not saved warning on file->exit
        file->exit now exits if more than 1 form open
        replace some pop() logic w/ remove()

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/Designer.py.diff?tr1=1.67&tr2=1.68&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/Instance.py.diff?tr1=1.87&tr2=1.88&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/MRUManager.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/LayoutEditor/LayoutEditor.py.diff?tr1=1.68&tr2=1.69&r1=text&r2=text

Patches:
Index: gnue/designer/src/Designer.py
diff -c gnue/designer/src/Designer.py:1.67 gnue/designer/src/Designer.py:1.68
*** gnue/designer/src/Designer.py:1.67  Thu Mar  6 14:44:54 2003
--- gnue/designer/src/Designer.py       Fri Apr  4 15:56:55 2003
***************
*** 129,138 ****
  
  
    def removeInstance(self, instance):
!     for i in range(0, len(self._instances)):
!       if self._instances[i] == instance:
!         self._instances.pop(i)
!         break
  
    # Do we have unsaved files?
    def isDirty(self):
--- 129,139 ----
  
  
    def removeInstance(self, instance):
!     self._instances.remove(instance)
!     #for i in range(0, len(self._instances)):
!     #  if self._instances[i] == instance:
!     #    self._instances.pop(i)
!     #    break
  
    # Do we have unsaved files?
    def isDirty(self):
***************
*** 196,212 ****
  
  
    def OnExit(self, event=None):
-     if self.isDirty():
-       dlg = wxMessageDialog(NULL,
-               _("There are open documents with unsaved changes.\n")+
-               _("Exit anyway?"),
-               _("Unsaved Changes"), style=wxYES_NO|wxICON_WARNING)
-       save = dlg.ShowModal()
-       dlg.Destroy()
-       if save == wxID_NO:
-         return
  
!     for instance in self._instances:
        instance.Close()
        #
        # If this Close() causes issues you can replace
--- 197,214 ----
  
  
    def OnExit(self, event=None):
  
! ##     if self.isDirty():
! ##       dlg = wxMessageDialog(NULL,
! ##               _("There are open documents with unsaved changes.\n")+
! ##               _("Exit anyway?"),
! ##               _("Unsaved Changes"), style=wxYES_NO|wxICON_WARNING)
! ##       save = dlg.ShowModal()
! ##       dlg.Destroy()
! ##       if save == wxID_NO:
! ##        return
! 
!     for instance in self._instances[:]:
        instance.Close()
        #
        # If this Close() causes issues you can replace
Index: gnue/designer/src/base/Instance.py
diff -c gnue/designer/src/base/Instance.py:1.87 
gnue/designer/src/base/Instance.py:1.88
*** gnue/designer/src/base/Instance.py:1.87     Tue Apr  1 01:00:10 2003
--- gnue/designer/src/base/Instance.py  Fri Apr  4 15:56:55 2003
***************
*** 487,493 ****
      object = event.object
  
      # Delete the actual object from its parent
!     object._parent._children.pop(object._parent._children.index(object))
  
      self.makeDirty()
  
--- 487,494 ----
      object = event.object
  
      # Delete the actual object from its parent
!     object._parent._children.remove(object)
!     ##object._parent._children.pop(object._parent._children.index(object))
  
      self.makeDirty()
  
***************
*** 625,630 ****
--- 626,632 ----
  
  
    def OnClose(self, event):
+     print self
      if self.isDirty():
        dlg = wxMessageDialog(NULL,
                _("This document has unsaved changes.\n") +
Index: gnue/designer/src/base/MRUManager.py
diff -c gnue/designer/src/base/MRUManager.py:1.6 
gnue/designer/src/base/MRUManager.py:1.7
*** gnue/designer/src/base/MRUManager.py:1.6    Mon Feb 17 02:32:50 2003
--- gnue/designer/src/base/MRUManager.py        Fri Apr  4 15:56:55 2003
***************
*** 58,67 ****
  
    def addLocation(self, location): 
      absloc = os.path.normcase(os.path.abspath(location))
!     for i in range(len(self._locations)): 
!       if self._locations[i] == absloc: 
!         self._locations.pop(i)
!         break
  
      self._locations.insert(0, absloc)
  
--- 58,68 ----
  
    def addLocation(self, location): 
      absloc = os.path.normcase(os.path.abspath(location))
!     self._locations.remove(absloc)
!     ## for i in range(len(self._locations)): 
! ##       if self._locations[i] == absloc: 
! ##         self._locations.pop(i)
! ##         break
  
      self._locations.insert(0, absloc)
  
Index: gnue/designer/src/forms/LayoutEditor/LayoutEditor.py
diff -c gnue/designer/src/forms/LayoutEditor/LayoutEditor.py:1.68 
gnue/designer/src/forms/LayoutEditor/LayoutEditor.py:1.69
*** gnue/designer/src/forms/LayoutEditor/LayoutEditor.py:1.68   Fri Apr  4 
13:30:45 2003
--- gnue/designer/src/forms/LayoutEditor/LayoutEditor.py        Fri Apr  4 
15:56:55 2003
***************
*** 353,363 ****
        if object in self._currentSelection:
          object._widgetHandler.setSelected(0)
          del self._currentSelection[self._currentSelection.index(object)]
! 
!       for i in range(len(self.widgetList)):
!         if self.widgetList[i] == object:
!           self.widgetList.pop(i)
!           break
  
  ##      object._widget.cleanup(object)
        object._widget._object = None
--- 353,364 ----
        if object in self._currentSelection:
          object._widgetHandler.setSelected(0)
          del self._currentSelection[self._currentSelection.index(object)]
!         
!       self.widgetList.remove(object)
!       ##for i in range(len(self.widgetList)):
!       ##  if self.widgetList[i] == object:
!       ##    self.widgetList.pop(i)
!       ##    break
  
  ##      object._widget.cleanup(object)
        object._widget._object = None




reply via email to

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