def load_tlp_config(_, window: Gtk.Window, reloadtlpconfig: bool) -> None: """Load TLP configuration to UI.""" if reloadtlpconfig: init_tlp_file_config() newmainbox = create_main_box(window) children = window.get_children() for child in children: window.remove(child) window.add(newmainbox) window.show_all()
def load_tlp_config(self, window: Gtk.Window, reloadtlpconfig: bool): if reloadtlpconfig: settings.tlpconfig = read_tlp_file_config(settings.tlpconfigfile) settings.tlpconfig_original = copy.deepcopy(settings.tlpconfig) newmainbox = create_main_box(window) children = window.get_children() for child in children: window.remove(child) window.add(newmainbox) window.show_all()
def load_tlp_config(_, window: Gtk.Window, reloadtlpconfig: bool) -> None: """Load TLP configuration to UI""" if reloadtlpconfig: settings.tlpconfig = read_tlp_file_config(settings.tlpconfigfile) settings.tlpconfig_original = copy.deepcopy(settings.tlpconfig) newmainbox = create_main_box(window) children = window.get_children() for child in children: window.remove(child) window.add(newmainbox) window.show_all()