aboutsummaryrefslogtreecommitdiffstats
path: root/CopyMailto
AgeCommit message (Collapse)Author
2018-09-05setDefaultURLHandler: Remove `NSLog`sTeddy Wing
These debug logs are no longer necessary now that we know that it works.
2018-09-05Remove unused `saveDefaultURLHandler`Teddy Wing
No longer planning on using this method. Ideally there would be a way to save and restore the old default "mailto" handler bundle identifier, but that's just too much of a pain and I don't want to bother.
2018-09-05Remove unused `applicationWillTerminate` methodTeddy Wing
2018-09-05Terminate app when email address is copiedTeddy Wing
Once the email is copied, the application has exhausted its usefulness and should just quit as if it were a dialog.
2018-09-05MainMenu.xib: Correctly align "Quit" button next to "Copy" buttonTeddy Wing
2018-09-05MainMenu.xib: Make title label boldTeddy Wing
Fix this warning: warning: Attribute Unavailable: System Font Weights other than Regular or Bold before OS X 10.11
2018-09-05Add a "Copy" button that copies the email address to the clipboardTeddy Wing
Thanks to these references: - https://stackoverflow.com/questions/5686958/set-string-to-pasteboard-copy-paste-in-cocoa-application/5687005#5687005 - https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/PasteboardGuide106/Articles/pbCopying.html
2018-09-05MainMenu.xib: Disable window resize and other unneeded attributesTeddy Wing
Set window height/size to be smaller, set it to centered horizontally and proportional vertical.
2018-09-05MainMenu.xib: Set "Escape" as the "Quit" button key equivalentTeddy Wing
2018-09-05MainMenu.xib: Add a "Quit" buttonTeddy Wing
2018-09-05MainMenu.xib: Add label asking to copy email address to clipboardTeddy Wing
Also: * Shorten window * Align email address label
2018-09-05Add label that displays the email address coming from `mailto`Teddy Wing
It starts with `mailto:`, so we remove that with a substring method call.
2018-09-05applicationWillFinishLaunching:: Fix `NSAppleEventManager` registrationTeddy Wing
Set correct event class and ID. I just picked a couple that seemed reasomable but it didn't work to open the app based on the URL handler because of the values I picked. Use the exact example as a reference from before: [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; from Thomas Zoechling (https://stackoverflow.com/users/100848/thomas-zoechling) on Stack Overflow: https://stackoverflow.com/questions/1991072/how-to-handle-with-a-default-url-scheme/1991162#1991162
2018-09-05MainMenu.xib: Disable Auto LayoutTeddy Wing
Uncheck the "Use Auto Layout" box as I was getting this error: Auto Layout on OS X prior to 10.7 Thanks much to these Stack Overflow answers (geez damn it Apple): - https://stackoverflow.com/questions/19612778/how-can-i-delete-the-xcode-constraints/19612829#19612829 - https://stackoverflow.com/questions/9566789/remove-autolayout-constraints-in-interface-builder/9566972#9566972
2018-09-05Turn off SandboxTeddy Wing
Turns out you can't register yourself as the default app handler when in a sandbox, which apparently is the default when creating a new Xcode project. > that’s all…. except that I’m running my application in a Sandbox > environment, and it returns the error -54 ! > > After trying to find a solution for this, and on the > devforums.apple.com forum, it seems that there is currently no > solution, Apple just decided to remove that feature since Yosemite…. > It still works on Mavericks. That of course very disappointing, and > even not mentioned in the Apple’s documentation. (https://blog.sovapps.com/make-your-application-reply-to-mailto-links/) Fuck that. Turn off sandboxing. Yay it works now.
2018-09-05MainMenu.xib: Simplify menusTeddy Wing
* Remove all menus except the application menu as no others are needed * Remove the "Preferences" item from the application menu as the app has no preferences
2018-09-05DefaultURLHandler: Add `saveDefaultURLHandler`Teddy Wing
This method is supposed to set CopyMailto as the default application for "mailto" URLs. But it keeps giving me a `-54` error, or `202` status code on the shell. WTF is going on?
2018-09-05saveDefaultURLHandler: Simplify `CFStringRef` creationTeddy Wing
Turns out `CFStringRef` can be "toll-free bridged" with `NSString`, allowing us to simplify the call.
2018-09-05Add `DefaultURLHandler`; Get current handler for `mailto` URLsTeddy Wing
Add a class to get the current bundle handler for `mailto` URLs. It will be extended to set CopyMailto as the default handler after saving the original.
2018-09-05Info.plist: Add URL handler for `mailto`Teddy Wing
2018-09-05AppDelegate: Change `window` property to instance variableTeddy Wing
Got this error: Cannot synthesize weak property because the current deployment target does not support weak references Get rid of the property and replace it with an instance variable to get rid of the error.
2018-09-05MainMenu.xib: Change data format to Xcode 8Teddy Wing
Allow the file to be opened in the previous version of Xcode. Couldn't pick anything lower.
2018-09-05Add URL Apple Event handling codeTeddy Wing
This untested code should allow the application to respond to a Launch Services URL to open the application. From Thomas Zoechling (https://stackoverflow.com/users/100848/thomas-zoechling) on Stack Overflow: https://stackoverflow.com/questions/1991072/how-to-handle-with-a-default-url-scheme/1991162#1991162
2018-09-05New Xcode 9.2 (9C40b) projectTeddy Wing
9'>369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508