Closed
Conversation
Member
|
Tests are failing due to your lack of access. I need to investigate or just duplicate your PR and see if the full test completes. |
Member
|
See #30 |
Contributor
Author
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docklib 1.3.0 release includes:
Added
A new
findExistingEntryfunction that can find dock items based on several attributes.The default behavior of
findExistingEntryis to match the provided string on (in order of preference):The
match_onparameter can be specified to select only one of those attributes to match, if desired. See thefindExistingEntryfunction docstring for available parameters and values.Changed
The
findExistingLabelfunction is now simply a pointer to the newfindExistingEntryfunction.findExistingLabelwill be maintained for backward-compatibility.The
removeDockEntryfunction has a newmatch_onparameter that mirrors the same parameter infindExistingEntry. Default behavior is to match on the same attributes listed above, in the same order of preference. (This is a change in behavior from previous versions of docklib. If you prefer to continue removing items solely based on label, you should specifymatch_on="label"in your function call.)The
replaceDockEntryfunction has two new parameters:match_str, which allows specifying the item intended to be replaced in the dock (replaces the now deprecatedlabelparameter).match_on, which mirrors the same parameter infindExistingEntry. Default behavior is to match on the same attributes listed above, in the same order of preference.Deprecated
The
labelparameter ofreplaceDockEntryis deprecated, and it's encouraged to usematch_strinstead. This allows existing items to be replaced based on multiple attributes rather than just label. As stated above, this makes dock customization scripts more reliable in multilingual environments.A warning has been added that alerts administrators to this deprecation.
This is the last release of docklib that will support Python 2. Future releases will only be tested in Python 3.
If you haven't started bundling a Python 3 runtime for your management tools, this blog article from @scriptingosx is a good read. Also: a reminder that docklib is already included in the "recommended" flavor of the macadmins/python packages.