MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / set_tree

Method set_tree

bleachbit/Options.py:539–550  ·  view source on GitHub ↗

Set an option for the tree view. The child may be None.

(self, parent, child, value)

Source from the content-addressed store, hash-verified

537 self.__schedule_flush()
538
539 def set_tree(self, parent, child, value):
540 """Set an option for the tree view. The child may be None."""
541 if not self.config.has_section("tree"):
542 self.config.add_section("tree")
543 option = parent
544 if child is not None:
545 option = option + "." + child
546 if self.config.has_option('tree', option) and not value:
547 self.config.remove_option('tree', option)
548 else:
549 self.config.set('tree', option, str(value))
550 self.__schedule_flush()
551
552 def toggle(self, key):
553 """Toggle a boolean key"""

Callers 4

test_OptionsMethod · 0.80
on_row_changedMethod · 0.80

Calls 4

__schedule_flushMethod · 0.95
add_sectionMethod · 0.80
has_optionMethod · 0.45
setMethod · 0.45

Tested by 3

test_OptionsMethod · 0.64