Wednesday, August 3, 2016

Policy Plus - POL diffing

Applying a policy file to the Registry is actually a two-step operation. One step is to be expected: take all the stuff in the current POL file and do the stuff it says to the Registry. Then, though, you have to compare the newest POL to the previous version, find the entries that are no longer present, and delete them from the Registry. Today I added a method to the PolFile class for doing just that: ApplyDiff. In the course of doing so, I also had to add a small method for checking whether a key is really a policy container (as opposed to one for non-removable preferences) by looking at its path. Those changes are live on GitHub.

Using that small function, I updated the UI just a little to flag the preference-ness of policies with an exclamation mark on the setting icon. Then I went to work on the lack of scroll bar for the policy description text area. It was shockingly difficult to get the scrollbars to only appear when needed and to make the text not get overlapped or cut off by the scrollbar when it did appear. I'm still working on getting rid of the completely unnecessary horizontal scrollbar for that pane. I'll push to GitHub again when that's ready.

No comments:

Post a Comment