-
Notifications
You must be signed in to change notification settings - Fork 15
/
QuoteFix.py
33 lines (26 loc) · 1.16 KB
/
QuoteFix.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from AppKit import NSBundle
from Foundation import NSLog
from quotefix import *
from quotefix.logger import logger
import objc
class QuoteFix(objc.runtime.MVMailBundle):
@classmethod
def initialize(cls):
# instantiate updater
updater = Updater()
# register ourselves
objc.runtime.MVMailBundle.registerBundle()
# extract plugin version from Info.plist
bundle = NSBundle.bundleWithIdentifier_('name.klep.mail.QuoteFix')
version = bundle.infoDictionary().get('CFBundleVersion', '??')
# initialize app
app = App(version, updater)
# initialize our posing classes with app instance
DocumentEditor.registerQuoteFixApplication(app)
ComposeViewController.registerQuoteFixApplication(app)
MessageHeaders.registerQuoteFixApplication(app)
MailApp.registerQuoteFixApplication(app)
QuoteFixPreferencesController.registerQuoteFixApplication(app)
CustomizedAttribution.registerQuoteFixApplication(app)
# announce that we have loaded
NSLog("QuoteFix Plugin (version %s) registered with Mail.app" % version)