Skip to content

Commit

Permalink
fix bug when updating properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Robinson committed Apr 19, 2021
1 parent 3ea3cc1 commit 1aedfa5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def get_property(self, key):
def set_property(self, key, val):
config = configparser.ConfigParser()
config.read(self.config_file)
print(config["settings"][key])
config["settings"][key] = val
print(config["settings"][key])
with open(self.config_file, "w") as f:
config.write(f)


4 changes: 2 additions & 2 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def deploy_type_toggled(self, widget):
else:
if self.conf.get_property("deploy_type") == "quick":
self.conf.set_property("deploy_type", "manual")
if self.conf.get_property("deploy_type") == "manual":
else:
self.conf.set_property("deploy_type", "quick")
self.main_info.set_text("[WARN ] Settings changed, please restart Siglo")
self.rescan_button.set_visible(False)
Expand All @@ -272,7 +272,7 @@ def mode_toggled(self, widget):
else:
if self.conf.get_property("mode") == "singleton":
self.conf.set_property("mode", "multi")
if self.conf.get_property("mode") == "multi":
else:
self.conf.set_property("mode", "singleton")
self.main_info.set_text("[WARN ] Settings changed, please restart Siglo")
self.rescan_button.set_visible(False)
Expand Down

0 comments on commit 1aedfa5

Please sign in to comment.