Example #1
0
File: amele.py Project: osa1/amele
 def update_cmd(self, format, cmd):
     item = self.ui.commandTree.currentItem()
     old_format = item.parent().text(0)
     old_cmd = item.text(0)
     if format == old_format and cmd != old_cmd:
         monitor.remove_command(str(format), str(old_cmd))
         monitor.add_command(str(format), str(cmd))
     elif format != old_format and cmd == old_cmd:
         monitor.remove_command(str(old_format), str(cmd))
         monitor.add_command(str(format), str(cmd))
     elif format != old_format and cmd != old_cmd:
         monitor.remove_command(str(old_format), str(old_cmd))
         monitor.add_command(str(format), str(cmd))
     self.__init_commands()
     print monitor.commands
Example #2
0
File: amele.py Project: osa1/amele
 def add_cmd(self, format, cmd):
     monitor.add_command(format, cmd)
     self.__init_commands()