Skip to content

Commit

Permalink
Fix: readOnly:true is now type:readonly -_- Fixes #267
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed May 17, 2016
1 parent 4eedf82 commit 3cb41bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion syncthing_gtk/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,8 @@ def cb_syncthing_device_sync_progress(self, daemon, device_id, sync):
def cb_syncthing_folder_added(self, daemon, rid, r):
box = self.show_folder(
rid, r["label"], r["path"],
r["readOnly"], r["ignorePerms"],
r["type"] == "readonly",
r["ignorePerms"],
r["rescanIntervalS"],
sorted(
[ self.devices[n["deviceID"]] for n in r["devices"] if n["deviceID"] in self.devices ],
Expand Down
4 changes: 4 additions & 0 deletions syncthing_gtk/foldereditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def get_value(self, key):
return self.get_burried_value("versioning/params/command", self.values, "")
elif key == "versionsPath":
return self.get_burried_value("versioning/params/versionsPath", self.values, "")
elif key == "readOnly":
return self.get_burried_value("type", self.values, "") == "readonly"
elif key == "versioning":
return self.get_burried_value("versioning/type", self.values, "")
elif key == "inotify":
Expand Down Expand Up @@ -108,6 +110,8 @@ def set_value(self, key, value):
# Create structure if needed
self.create_dicts(self.values, ("versioning", "params", "versionsPath"))
self.values["versioning"]["params"]["versionsPath"] = value
elif key == "readOnly":
self.values["type"] = "readonly" if value else "readwrite"
elif key == "inotify":
id = self.id
if id is None:
Expand Down

0 comments on commit 3cb41bd

Please sign in to comment.