/[ascend]/trunk/pygtk/modelview.py
ViewVC logotype

Diff of /trunk/pygtk/modelview.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 843 by johnpye, Thu Aug 31 05:39:14 2006 UTC revision 844 by johnpye, Mon Sep 11 08:31:21 2006 UTC
# Line 8  from properties import * Line 8  from properties import *
8    
9  BROWSER_FIXED_COLOR = "#008800"  BROWSER_FIXED_COLOR = "#008800"
10  BROWSER_FREE_COLOR = "#000088"  BROWSER_FREE_COLOR = "#000088"
11    BROWSER_SETTING_COLOR = "#4444AA"
12    
13  BROWSER_ACTIVE_COLOR = "black"  BROWSER_ACTIVE_COLOR = "black"
14  BROWSER_INACTIVE_COLOR = "#888888"  BROWSER_INACTIVE_COLOR = "#888888"
# Line 140  class ModelView: Line 141  class ModelView:
141          elif instance.isBool() or instance.isReal() or instance.isInt():          elif instance.isBool() or instance.isReal() or instance.isInt():
142              # TODO can't edit constants that have already been refined              # TODO can't edit constants that have already been refined
143              _editable = True              _editable = True
144                _fgcolor = BROWSER_SETTING_COLOR
145                _fontweight = pango.WEIGHT_BOLD
146            elif instance.isSymbol() and not instance.isConst():
147                _editable = True
148                _fgcolor = BROWSER_SETTING_COLOR
149                _fontweight = pango.WEIGHT_BOLD
150                
151          #if(len(_value) > 80):          #if(len(_value) > 80):
152          #   _value = _value[:80] + "..."          #   _value = _value[:80] + "..."
153                    
# Line 213  class ModelView: Line 220  class ModelView:
220                      self.browser.reporter.reportNote("Integer atom '%s' was not altered" % _instance.getName())                      self.browser.reporter.reportNote("Integer atom '%s' was not altered" % _instance.getName())
221                      return                      return
222                  _instance.setIntValue(_val)                  _instance.setIntValue(_val)
223                elif _instance.isSymbol():
224                    _val = str(newtext)
225                    if _val == _instance.getValue():
226                        self.browser.reporter.reportNote("Symbol atom '%s' was not altered" % _instance.getName())
227                        return
228                    _instance.setSymbolValue(ascpy.SymChar(_val))
229                            
230              else:              else:
231                  self.browser.reporter.reportError("Attempt to set a non-real, non-boolean, non-integer value!")                  self.browser.reporter.reportError("Attempt to set a non-real, non-boolean, non-integer value!")
232                  return                  return

Legend:
Removed from v.843  
changed lines
  Added in v.844

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22