46 |
if self.object._type == 'GFEntry': |
if self.object._type == 'GFEntry': |
47 |
GDebug.printMesg(4,'Adding a new entry property manager') |
GDebug.printMesg(4,'Adding a new entry property manager') |
48 |
self.addPage(FieldInspectorPanel(self, self.notebook), "Field") |
self.addPage(FieldInspectorPanel(self, self.notebook), "Field") |
49 |
|
if self.object._block: |
50 |
|
self.addPage(EntryBlockInspectorPanel(self, self.notebook), "Block") |
51 |
|
|
52 |
|
# Block? |
53 |
|
if self.object.findParentOfType('GFBlock',includeSelf=0): |
54 |
|
self.addPage(BlockInspectorPanel(self, self.notebook), "Block") |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
# |
# |
59 |
# Field properties (when Entry is selected) |
# Field properties (when Entry is selected) |
63 |
def setCurrent(self, object): |
def setCurrent(self, object): |
64 |
self._setCurrent(object._field) |
self._setCurrent(object._field) |
65 |
|
|
66 |
|
# |
67 |
|
# Block properties (when Entry/Field is selected) |
68 |
|
# |
69 |
|
class BlockInspectorPanel(BaseInspectorPanel): |
70 |
|
|
71 |
|
def setCurrent(self, object): |
72 |
|
self._setCurrent(object.findParentOfType('GFBlock')) |
73 |
|
|
74 |
|
class EntryBlockInspectorPanel(BaseInspectorPanel): |
75 |
|
def setCurrent(self, object): |
76 |
|
self._setCurrent(object._block) |
77 |
|
|