~laszlok/jokosher/pyintrospection-gtk3

« back to all changes in this revision

Viewing changes to Jokosher/CompactMixView.py

  • Committer: Laszlo Pandy
  • Date: 2011-02-04 13:42:28 UTC
  • Revision ID: bzr@laszlopandy.com-20110204134228-k0qhcg9gk9jbk3n9
Widget.parent => Widget.get_parent()

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
                        if not strip.instrument is instrument:
128
128
                                continue
129
129
 
130
 
                        if visib and not strip.parent:
 
130
                        if visib and strip.get_parent() is None:
131
131
                                self.mixerBox.pack_start(strip, False, False, 0)
132
132
                                strip.show_all()
133
 
                        elif not visib and strip.parent:
 
133
                        elif not visib and strip.get_parent() is not None:
134
134
                                self.mixerBox.remove(strip)
135
135
 
136
136
                        break
139
139
                        if not instr is instrument:
140
140
                                continue
141
141
 
142
 
                        if not visib and not toolButton.parent:
 
142
                        if not visib and toolButton.get_parent() is None:
143
143
                                self.instrumentBar.insert(toolButton, -1)
144
144
                                toolButton.show_all()
145
 
                        elif visib and toolButton.parent:
 
145
                        elif visib and toolButton.get_parent() is not None:
146
146
                                self.instrumentBar.remove(toolButton)
147
147
 
148
148
                        break
149
149
 
150
150
                # Only show the instrument bar if there is something minimized
151
151
                minimisedInstrs = [x for x in self.project.instruments if not x.isVisible]
152
 
                if minimisedInstrs and not self.instrumentBar.parent:
 
152
                if minimisedInstrs and self.instrumentBar.get_parent() is None:
153
153
                        self.vbox.pack_end(self.instrumentBar, False, False, 0)
154
154
                        self.instrumentBar.show_all()
155
 
                elif not minimisedInstrs and self.instrumentBar.parent:
 
155
                elif not minimisedInstrs and self.instrumentBar.get_parent() is not None:
156
156
                        self.vbox.remove(self.instrumentBar)
157
157
 
158
158
        #_____________________________________________________________________
200
200
 
201
201
                for strip in self.mixerStripList:
202
202
                        if strip.instrument is instrument:
203
 
                                if strip.parent:
 
203
                                if strip.get_parent() is not None:
204
204
                                        self.mixerBox.remove(strip)
205
205
                                strip.Destroy()
206
206
                                self.mixerStripList.remove(strip)
208
208
 
209
209
                for instr, toolButton in self.minimisedButtonList:
210
210
                        if instr is instrument:
211
 
                                if toolButton.parent:
 
211
                                if toolButton.get_parent() is not None:
212
212
                                        self.instrumentBar.remove(toolButton)
213
213
                                self.minimisedButtonList.remove( (instr, toolButton) )
214
214
                                break
229
229
                visibleInstrs = [x for x in self.project.instruments if x.isVisible]
230
230
                for strip in self.mixerStripList:
231
231
                        if strip.instrument is instrument:
232
 
                                if strip.parent:
 
232
                                if strip.get_parent() is not None:
233
233
                                        pos = visibleInstrs.index(instrument)
234
234
                                        self.mixerBox.reorder_child(strip, pos + 1)
235
235
                                break