aboutsummaryrefslogtreecommitdiffstats
path: root/preferences.py
AgeCommit message (Collapse)Author
2015-12-25preferences.py: Remove commented importTeddy Wing
Not using `HotKeyItem` due to the length checking made in 1391f70d79144518dda9d0294a9e8a8fc79904ff.
2015-12-24Preferences: Always use NSUserDefaults to get & set keyTeddy Wing
This fixes the bug mentioned in 8778928a0989ea938fb06f0dd4c6639a6f9148ca, allowing us to change the preferred activation key and have it work immediately without first having to relaunch RoboFont.
2015-12-24Make hotkey preference workTeddy Wing
Separate preference handling into a new class and have the previous preferences class handle only the preferences window. We rename the old file to `preferences_window.py` and adjust the `info.plist` key for the menu item accordingly. Our new `Preference` class can now be imported from both `equalize_sidebearings.py` and `preferences_window.py` without causing confusion. I extracted it because asking for the `DEFAULT_ACTIVATION_KEY` from `preferences_window.py` from `equalize_sidebearings.py` would open the preferences window (bad). We now save the preferred key using RoboFont's extension preferences API. When the text input in the preferences window is modified, the new key preference gets saved. BUG: There's an issue with this implementation where the preferred key doesn't become active until the next launch of RoboFont because `EqualizeSidebearings` has its own instance of `Preferences` which has a stale `activation_key`.
2015-12-24preferences.py: PEP8 whitespaceTeddy Wing
2015-12-24preferences.py: Style window and controlsTeddy Wing
* Make the window a bit smaller because there's only one control * Add a text label to the editable input * Set a size for the editable input and move it into position to the right of the text label
2015-12-24Add preferences.pyTeddy Wing
Create a file for the extension's preferences window. This will be a window that opens when a menu item under the extension's menu is selected. The window will display an editable control to allow users to set a custom key to trigger sidebar equalisation.