Exemplo n.º 1
0
 def configure(self, res):
     from pyww.dialogs import SettingsDialog
     cua = get_config_access(self.ctx, CONFIG_NODE, True)
     
     show_input_line = cua.getPropertyValue("InputLine")
     store = cua.getPropertyValue("StoreWatches")
     
     dialog = SettingsDialog(
         self.ctx, res, 
         show_input_line=show_input_line, 
         store=store, 
     )
     result = dialog.execute()
     if result:
         self.check_input = result["show_input_line"]
         self.store = result["store"]
         try:
             cua.setPropertyValue("InputLine", self.check_input)
             cua.setPropertyValue("StoreWatches", self.store)
             cua.commitChanges()
         except Exception as e:
             print(e)
         return True
     return False
Exemplo n.º 2
0
 def _load(self):
     cua = get_config_access(self.ctx, CONFIG_NODE)
     self.check_input = cua.getPropertyValue("InputLine")
     self.store = cua.getPropertyValue("StoreWatches")