Changeset 698
- Timestamp:
- 02/15/10 12:36:59 (6 months ago)
- Files:
-
- packages/defcon/trunk/Lib/defcon/objects/anchor.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/base.py (modified) (3 diffs)
- packages/defcon/trunk/Lib/defcon/objects/component.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/contour.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/features.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/font.py (modified) (2 diffs)
- packages/defcon/trunk/Lib/defcon/objects/glyph.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/groups.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/info.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/kerning.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/lib.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/point.py (modified) (1 diff)
- packages/defcon/trunk/Lib/defcon/objects/uniData.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
packages/defcon/trunk/Lib/defcon/objects/anchor.py
r695 r698 15 15 """ 16 16 17 _notificationName = "Anchor.Changed"17 changeNotificationName = "Anchor.Changed" 18 18 19 19 def __init__(self): packages/defcon/trunk/Lib/defcon/objects/base.py
r697 r698 23 23 """ 24 24 25 _notificationName = "BaseObject.Changed"25 changeNotificationName = "BaseObject.Changed" 26 26 beginUndoNotificationName = "BaseObject.BeginUndo" 27 27 endUndoNotificationName = "BaseObject.EndUndo" 28 28 beginRedoNotificationName = "BaseObject.BeginRedo" 29 29 endRedoNotificationName = "BaseObject.EndRedo" 30 31 30 32 31 def __init__(self): … … 36 35 self._dataOnDiskTimeStamp = None 37 36 self._undoManager = None 37 # handle the old _notificationName attribute 38 if hasattr(self, "_notificationName"): 39 from warnings import warn 40 warn( 41 "_notificationName has been deprecated. Use changeNotificationName instead.", 42 DeprecationWarning 43 ) 44 self.changeNotificationName = self._notificationName 45 self._notificationName = self.changeNotificationName 38 46 39 47 # ------ … … 207 215 self._dirty = value 208 216 if self._dispatcher is not None: 209 self.dispatcher.postNotification(notification=self. _notificationName, observable=self)217 self.dispatcher.postNotification(notification=self.changeNotificationName, observable=self) 210 218 211 219 def _get_dirty(self): packages/defcon/trunk/Lib/defcon/objects/component.py
r695 r698 17 17 """ 18 18 19 _notificationName = "Component.Changed"19 changeNotificationName = "Component.Changed" 20 20 21 21 def __init__(self): packages/defcon/trunk/Lib/defcon/objects/contour.py
r697 r698 34 34 """ 35 35 36 _notificationName = "Contour.Changed"36 changeNotificationName = "Contour.Changed" 37 37 38 38 def __init__(self, pointClass=None): packages/defcon/trunk/Lib/defcon/objects/features.py
r695 r698 16 16 """ 17 17 18 _notificationName = "Features.Changed"18 changeNotificationName = "Features.Changed" 19 19 beginUndoNotificationName = "Features.BeginUndo" 20 20 endUndoNotificationName = "Features.EndUndo" packages/defcon/trunk/Lib/defcon/objects/font.py
r687 r698 132 132 """ 133 133 134 _notificationName = "Font.Changed"134 changeNotificationName = "Font.Changed" 135 135 136 136 def __init__(self, path=None, … … 1067 1067 glyph = self._glyphs[reference] 1068 1068 glyph.destroyAllRepresentations(None) 1069 glyph.dispatcher.postNotification(notification=glyph. _notificationName, observable=glyph)1069 glyph.dispatcher.postNotification(notification=glyph.changeNotificationName, observable=glyph) 1070 1070 referenceChanges.add(reference) 1071 1071 packages/defcon/trunk/Lib/defcon/objects/glyph.py
r697 r698 46 46 """ 47 47 48 _notificationName = "Glyph.Changed"48 changeNotificationName = "Glyph.Changed" 49 49 beginUndoNotificationName = "Glyph.BeginUndo" 50 50 endUndoNotificationName = "Glyph.EndUndo" packages/defcon/trunk/Lib/defcon/objects/groups.py
r695 r698 57 57 """ 58 58 59 _notificationName = "Groups.Changed"59 changeNotificationName = "Groups.Changed" 60 60 beginUndoNotificationName = "Groups.BeginUndo" 61 61 endUndoNotificationName = "Groups.EndUndo" packages/defcon/trunk/Lib/defcon/objects/info.py
r695 r698 24 24 """ 25 25 26 _notificationName = "Info.Changed"26 changeNotificationName = "Info.Changed" 27 27 beginUndoNotificationName = "Info.BeginUndo" 28 28 endUndoNotificationName = "Info.EndUndo" packages/defcon/trunk/Lib/defcon/objects/kerning.py
r695 r698 37 37 """ 38 38 39 _notificationName = "Kerning.Changed"39 changeNotificationName = "Kerning.Changed" 40 40 beginUndoNotificationName = "Kerning.BeginUndo" 41 41 endUndoNotificationName = "Kerning.EndUndo" packages/defcon/trunk/Lib/defcon/objects/lib.py
r695 r698 36 36 """ 37 37 38 _notificationName = "Lib.Changed"38 changeNotificationName = "Lib.Changed" 39 39 beginUndoNotificationName = "Lib.BeginUndo" 40 40 endUndoNotificationName = "Lib.EndUndo" packages/defcon/trunk/Lib/defcon/objects/point.py
r695 r698 15 15 """ 16 16 17 _notificationName = "Point.Changed"17 changeNotificationName = "Point.Changed" 18 18 19 19 __slots__ = ["_x", "_y", "_segmentType", "_smooth", "_name"] packages/defcon/trunk/Lib/defcon/objects/uniData.py
r596 r698 40 40 """ 41 41 42 _notificationName = "UnicodeData.Changed"42 changeNotificationName = "UnicodeData.Changed" 43 43 44 44 def __init__(self): … … 72 72 del self._forcedUnicodeToGlyphName[fourcedValue] 73 73 if self.dispatcher is not None: 74 self.dispatcher.postNotification(notification=self. _notificationName, observable=self)74 self.dispatcher.postNotification(notification=self.changeNotificationName, observable=self) 75 75 76 76 def addGlyphData(self, glyphName, values): … … 90 90 self._dict[value] = glyphList 91 91 if self.dispatcher is not None: 92 self.dispatcher.postNotification(notification=self. _notificationName, observable=self)92 self.dispatcher.postNotification(notification=self.changeNotificationName, observable=self) 93 93 94 94 def __delitem__(self, value): … … 104 104 del self._dict[value] 105 105 if self.dispatcher is not None: 106 self.dispatcher.postNotification(notification=self. _notificationName, observable=self)106 self.dispatcher.postNotification(notification=self.changeNotificationName, observable=self) 107 107 108 108 def __setitem__(self, value, glyphList): … … 117 117 del self._glyphNameToForcedUnicode[glyphName] 118 118 if self.dispatcher is not None: 119 self.dispatcher.postNotification(notification=self. _notificationName, observable=self)119 self.dispatcher.postNotification(notification=self.changeNotificationName, observable=self) 120 120 121 121 def clear(self): … … 143 143 self._dict[value] = list(glyphList) 144 144 if self.dispatcher is not None: 145 self.dispatcher.postNotification(notification=self. _notificationName, observable=self)145 self.dispatcher.postNotification(notification=self.changeNotificationName, observable=self) 146 146 147 147 # -------
