commit-gnue
[Top][All Lists]
Advanced

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

gnue/designer/src PropertyEditor.py


From: Jason Cater
Subject: gnue/designer/src PropertyEditor.py
Date: Thu, 20 Dec 2001 17:31:18 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Branch:         designer-0-1-0-patches
Changes by:     Jason Cater <address@hidden>    01/12/20 17:31:18

Modified files:
        designer/src   : PropertyEditor.py 

Log message:
        fixed a wx-2.3.1 specific reference

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/PropertyEditor.py.diff?only_with_tag=designer-0-1-0-patches&tr1=1.18&tr2=1.18.2.1&r1=text&r2=text

Patches:
Index: gnue/designer/src/PropertyEditor.py
diff -c gnue/designer/src/PropertyEditor.py:1.17 
gnue/designer/src/PropertyEditor.py:1.18
*** gnue/designer/src/PropertyEditor.py:1.17    Mon Nov 19 18:07:46 2001
--- gnue/designer/src/PropertyEditor.py Mon Nov 19 21:00:16 2001
***************
*** 27,44 ****
  #
  
  
! import sys, os, time, string
  from wxPython.wx import *
  from wxPython.grid import *
  from gnue.common import GDebug, GConfig, GTypecast
- from gnue.forms import GFForm, GFInstance, GFParser, \
-                        GFObjects, GFTrigger, GFLibrary, UIwxpython
- from GFDesigner import *
- from Incubator import elements
  from ToolFrame import ToolFrame
  
! class PropertyEditor (wxPanel): 
!   def __init__(self, parent, instance, form): 
      wxPanel.__init__(self,parent,-1,pos=wxPoint(0,0))
      self.panel = wxPanel(self,-1,style=wxSIMPLE_BORDER, pos=wxPoint(6,6))
  
--- 27,41 ----
  #
  
  
! import sys, os, string
  from wxPython.wx import *
  from wxPython.grid import *
  from gnue.common import GDebug, GConfig, GTypecast
  from ToolFrame import ToolFrame
+ from Incubator import elements
  
! class PropertyEditor (wxPanel):
!   def __init__(self, parent, instance, form):
      wxPanel.__init__(self,parent,-1,pos=wxPoint(0,0))
      self.panel = wxPanel(self,-1,style=wxSIMPLE_BORDER, pos=wxPoint(6,6))
  
***************
*** 60,73 ****
  
  
    def onSetCurrentObject (self, object, handler):
!     if object == None: 
        return
      if handler != __name__:
        self.object = object
  
        try:       
          self.attributes = 
elements[string.lower(object.getObjectType()[2:])]['Attributes']
!       except KeyError: 
          self.attributes = {}
  
        self.elements = elements[string.lower(object.getObjectType()[2:])]
--- 57,70 ----
  
  
    def onSetCurrentObject (self, object, handler):
!     if object == None:
        return
      if handler != __name__:
        self.object = object
  
        try:       
          self.attributes = 
elements[string.lower(object.getObjectType()[2:])]['Attributes']
!       except KeyError:
          self.attributes = {}
  
        self.elements = elements[string.lower(object.getObjectType()[2:])]
***************
*** 89,95 ****
  
        # Only show properties for nondeprecated values (unless set)
        i = 0
!       while i < len(self.rowList):   
          key = self.rowList[i]
          if self.attributes[key].has_key ('Deprecated') and \
             self.attributes[key]['Deprecated'] and \
--- 86,92 ----
  
        # Only show properties for nondeprecated values (unless set)
        i = 0
!       while i < len(self.rowList):
          key = self.rowList[i]
          if self.attributes[key].has_key ('Deprecated') and \
             self.attributes[key]['Deprecated'] and \
***************
*** 124,130 ****
            self.grid.SetCellEditor(i, 0, 
RestrictedCellEditor(self.grid,self.attributes[key]))
          elif self.attributes[key]['Typecast'] == GTypecast.boolean: 
            self.grid.SetCellEditor(i, 0, 
BoolCellEditor(self.grid,self.attributes[key]))
!         elif self.attributes[key]['Typecast'] in (GTypecast.integer, 
                  GTypecast.number, GTypecast.whole):
            self.grid.SetCellEditor(i, 0, 
IntCellEditor(self.grid,self.attributes[key]))
          else: 
--- 121,127 ----
            self.grid.SetCellEditor(i, 0, 
RestrictedCellEditor(self.grid,self.attributes[key]))
          elif self.attributes[key]['Typecast'] == GTypecast.boolean: 
            self.grid.SetCellEditor(i, 0, 
BoolCellEditor(self.grid,self.attributes[key]))
!         elif self.attributes[key]['Typecast'] in (GTypecast.integer,
                  GTypecast.number, GTypecast.whole):
            self.grid.SetCellEditor(i, 0, 
IntCellEditor(self.grid,self.attributes[key]))
          else: 
***************
*** 145,151 ****
          i = i + 1
  
  
!       # Redraw the grid      
        self.grid.EndBatch()
        try: 
          self.grid.ForceRefresh()  # Added in 2.3.1
--- 142,148 ----
          i = i + 1
  
  
!       # Redraw the grid
        self.grid.EndBatch()
        try: 
          self.grid.ForceRefresh()  # Added in 2.3.1
***************
*** 173,179 ****
        pass
  
  
!   def onSize(self, event): 
      x,y = self.GetClientSizeTuple()
      self.panel.SetSize((x-12,y-12))
      self.grid.SetSize(self.panel.GetClientSizeTuple())
--- 170,176 ----
        pass
  
  
!   def onSize(self, event):
      x,y = self.GetClientSizeTuple()
      self.panel.SetSize((x-12,y-12))
      self.grid.SetSize(self.panel.GetClientSizeTuple())
***************
*** 566,572 ****
  #
  #
  #
! class PropertyToolFrame(ToolFrame): 
    def __init__(self, instance, title): 
      ToolFrame.__init__(self, instance, "Property Editor")
  
--- 563,569 ----
  #
  #
  #
! class PropertyToolFrame(ToolFrame):
    def __init__(self, instance, title): 
      ToolFrame.__init__(self, instance, "Property Editor")
  



reply via email to

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