Пример #1
0
 def init(self, first_time=False):
     try:
         config = get_config(self.ctx, CONFIG_NODE_SETTINGS)
         cp = config.getPropertyValue
         self.set_text("edit_dictionary", cp(NAME_DICTIONARY))
         #self.translate_labels()
         if first_time:
             self.get("btn_dictionary").addActionListener(self.ButtonListener(self))
     except Exception, e:
         print(e)
         import traceback
         traceback.print_exc()
Пример #2
0
 def confirm(self):
     config = get_config(self.ctx, CONFIG_NODE_SETTINGS, True)
     cs = config.setPropertyValue
     cs(NAME_DICTIONARY, self.get_text("edit_dictionary"))
     config.commitChanges()