diff options
| author | Teddy Wing | 2016-11-18 22:54:19 -0500 |
|---|---|---|
| committer | Teddy Wing | 2016-11-18 22:54:19 -0500 |
| commit | 678f8ca1a961eb9125aa82b7d2277fda4db7f146 (patch) | |
| tree | aad4444f63e18aa9b8e10e05874f0612c4f93e7a /Low Battery Yup d/AppDelegate.h | |
| parent | 7677b59543a8d2edc9a28f77f26ebb02492e2b5c (diff) | |
| download | Low-Battery-Yup-678f8ca1a961eb9125aa82b7d2277fda4db7f146.tar.bz2 | |
Use hard-coded hotkey to invoke battery dialog dismisser
* Add DDHotKey library to the project. Just copy the files in from the
latest HEAD@e0481f648e0bc7e55d183622b00510b6721152d8.
* Only add DDHotKeyCenter.{h,m} & DDHotKeyUtilities.{h,m} to the "Low
Battery Yup.d" target as the *TextField file is only useful for a UI
to choose a hotkey, and we don't have a UI in this target.
* Set the DDHotKey* files to use ARC when compiling since they require
it. This was done by going to Build Phases -> Compile Sources and
adding this flag for both files:
-fobj-arc
this I figured out thanks to the following SO post:
http://stackoverflow.com/questions/6448874/disable-automatic-reference-counting-for-some-files/10255815#10255815
* Link Carbon.framework because DDHotKey depends on it to register
global hotkeys
* Move our mouse moving & clicking code to a new method that gets used
as the global hotkey action
* Fix a runtime error caused by MainMenu.xib not being available (as a
result of f0e8b5188e6fb984511eb01849380669e69632a6). To do this, we
modify `main.m` to bypass the check for MainMenu.xib as described in
this SO post:
http://stackoverflow.com/questions/6945872/cocoa-app-without-a-mainmenu-xib/6946016#6946016
* Delete the `window` `IBOutlet` since we no longer have a MainMenu.xib
and don't have a window in this app.
Diffstat (limited to 'Low Battery Yup d/AppDelegate.h')
| -rw-r--r-- | Low Battery Yup d/AppDelegate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Low Battery Yup d/AppDelegate.h b/Low Battery Yup d/AppDelegate.h index ab9467b..10f6e4b 100644 --- a/Low Battery Yup d/AppDelegate.h +++ b/Low Battery Yup d/AppDelegate.h @@ -10,6 +10,6 @@ @interface AppDelegate : NSObject <NSApplicationDelegate> -@property (assign) IBOutlet NSWindow *window; +- (void)dismissLowBatteryWarning:(NSEvent *)hotKeyEvent; @end |
