@@ -421,21 +421,21 @@ def __init__(self, application, config):
421421 self .__load_int_item (
422422 setting ["label" ],
423423 setting ["id" ],
424- setting [ "safeeyes_config " ],
424+ config [ "active_plugin_config " ],
425425 setting .get ("min" , 0 ),
426426 setting .get ("max" , 120 ),
427427 )
428428 )
429429 elif setting ["type" ].upper () == "TEXT" :
430430 box_settings .append (
431431 self .__load_text_item (
432- setting ["label" ], setting ["id" ], setting [ "safeeyes_config " ]
432+ setting ["label" ], setting ["id" ], config [ "active_plugin_config " ]
433433 )
434434 )
435435 elif setting ["type" ].upper () == "BOOL" :
436436 box_settings .append (
437437 self .__load_bool_item (
438- setting ["label" ], setting ["id" ], setting [ "safeeyes_config " ]
438+ setting ["label" ], setting ["id" ], config [ "active_plugin_config " ]
439439 )
440440 )
441441
@@ -450,9 +450,7 @@ def __load_int_item(self, name, key, settings, min_value, max_value):
450450 spin_value .set_value (settings [key ])
451451 box = builder .get_object ("box" )
452452 box .set_visible (True )
453- self .property_controls .append (
454- {"key" : key , "settings" : settings , "value" : spin_value .get_value }
455- )
453+ self .property_controls .append ({"key" : key , "value" : spin_value .get_value })
456454 return box
457455
458456 def __load_text_item (self , name , key , settings ):
@@ -463,9 +461,7 @@ def __load_text_item(self, name, key, settings):
463461 txt_value .set_text (settings [key ])
464462 box = builder .get_object ("box" )
465463 box .set_visible (True )
466- self .property_controls .append (
467- {"key" : key , "settings" : settings , "value" : txt_value .get_text }
468- )
464+ self .property_controls .append ({"key" : key , "value" : txt_value .get_text })
469465 return box
470466
471467 def __load_bool_item (self , name , key , settings ):
@@ -476,17 +472,15 @@ def __load_bool_item(self, name, key, settings):
476472 switch_value .set_active (settings [key ])
477473 box = builder .get_object ("box" )
478474 box .set_visible (True )
479- self .property_controls .append (
480- {"key" : key , "settings" : settings , "value" : switch_value .get_active }
481- )
475+ self .property_controls .append ({"key" : key , "value" : switch_value .get_active })
482476 return box
483477
484478 def on_window_delete (self , * args ):
485479 """Event handler for Properties dialog close action."""
486480 for property_control in self .property_controls :
487- property_control [ "settings " ][property_control ["key" ]] = property_control [
488- "value"
489- ]( )
481+ self . config [ "active_plugin_config " ][property_control ["key" ]] = (
482+ property_control [ "value" ]()
483+ )
490484 self .window .destroy ()
491485
492486 def show (self ):
0 commit comments