Esempio n. 1
0
        def instr_name_printer(x):
            name = getattr(x, "name")

            if utils.name_empty(name):
                return "[UNNAMED]"
            else:
                return name
Esempio n. 2
0
    def export_instrument(self, event):
        def ok_handler(dlg, path):
            self.instrument.export_to_file(path)

        if not utils.name_empty(self.instrument.name):
            default_file = '%s.lsdinst' % (self.instrument.name)
        else:
            default_file = ''

        utils.file_dialog(
            "Save instrument as ...", "*.lsdinst", wx.SAVE, ok_handler,
            default_file=default_file)