Merge lp:~elementary-apps/pantheon-files/props-dialog-perm-button-update into lp:~elementary-apps/pantheon-files/trunk
Status: | Merged |
---|---|
Approved by: | Danielle Foré |
Approved revision: | 2419 |
Merged at revision: | 2424 |
Proposed branch: | lp:~elementary-apps/pantheon-files/props-dialog-perm-button-update |
Merge into: | lp:~elementary-apps/pantheon-files/trunk |
Diff against target: |
84 lines (+31/-14) 2 files modified
src/Dialogs/PropertiesWindow.vala (+3/-12) src/View/Widgets/PermissionButton.vala (+28/-2) |
To merge this branch: | bzr merge lp:~elementary-apps/pantheon-files/props-dialog-perm-button-update |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeremy Wootten | code | Approve | |
Review via email: mp+313868@code.launchpad.net |
Commit message
Move update_
Description of the change
This duplicates the array vfs_perms, but I'm thinking that's a little less clumsy than trying to access it across the classes. I think maybe a way to move forward more cleanly is to have a utility class instead of having these things in the properties dialog and permissions button
I changed the foreach to a set of if/else statements so that this method doesn't rely on widgets been read in a certain order
Since the permissionbutton widget knows about itself (and its permission type), we only need to pass the new permissions int, which I think really helps with clarity here
The update buttons function assumes the children are returned in a certain order. This is probably OK, but you could make use of the data set on the buttons (PermissionType and PermissionValue) to index into the vfs_perm array to avoid this.