Beispiel #1
0
 def attr_callback(self):
     if self.curlayout is None or self.curchannel is None:
         return
     self.toplevel.setwaiting()
     import AttrEdit
     AttrEdit.showchannelattreditor(
         self.toplevel, self.context.channeldict[self.curchannel])
Beispiel #2
0
 def edit_callback(self):
     sel = self.getgroup()
     if sel is None:
         # nothing selected
         raise 'Edit with no selection'
     trdict = self.context.paramgroups.get(sel)
     if trdict is None:
         # unknown paramgroup (internal error?)
         raise 'Edit with unknown selection'
     AttrEdit.showparamgroupattreditor(self.toplevel, sel)
Beispiel #3
0
 def new_callback(self):
     if not self.editmgr.transaction():
         return
     name = self._findfreename()
     self.editmgr.addparamgroup(name, {
         'trtype': 'fade',
         'startProgress': 0.0,
         'endProgress': 1.0,
     })
     self.editmgr.commit()
     AttrEdit.showparamgroupattreditor(self.toplevel, name)
Beispiel #4
0
    def anchoredit_callback(self, str):
        if str.focus is None:
            print 'LinkEdit: anchoredit without a focus!'
            return
        anchor = str.anchors[str.focus]
        if type(anchor) is type(''):
            # external anchor
            print 'LinkEdit: external anchor!'
            return
##         if anchor.GetType() == 'anchor':
##             node = anchor.GetParent()
##         else:
##             node = anchor
        AttrEdit.showattreditor(self.toplevel, anchor)
Beispiel #5
0
 def do_exit(self, exitcallback=None):
     # XXXX This is pretty expensive (and useless) if AttrEdit hasn't been used...
     import AttrEdit
     AttrEdit.closepreferenceattreditor()
     ok = 1
     for top in self.tops[:]:
         top.close()
     if self.tops:
         return
     if sys.platform == 'mac':
         import MacOS
         MacOS.OutputSeen()
     if exitcallback:
         rtn, arg = exitcallback
         apply(rtn, arg)
     else:
         raise SystemExit, 0
Beispiel #6
0
 def preferences_callback(self):
     import AttrEdit
     AttrEdit.showpreferenceattreditor()