コード例 #1
0
ファイル: account.py プロジェクト: AGProjects/blink-cocoa
class LDAPSettingsExtension(SettingsGroup):
    enabled = Setting(type=bool, default=False)
    hostname = Setting(type=Hostname, default=None, nillable=True)
    username = Setting(type=LDAPusername, default='', nillable=True)
    password = Setting(
        type=str, default='',
        nillable=True) if memory_stick_mode() else KeychainPasswordSetting(
            type=str, default='', nillable=True, label='LDAP')
    transport = Setting(type=MSRPTransport, default='tls')
    port = Setting(type=NonNegativeInteger, default=636)
    dn = Setting(type=LDAPdn, default='', nillable=True)
    extra_fields = Setting(type=str, default='', nillable=True)
コード例 #2
0
ファイル: account.py プロジェクト: AGProjects/blink-cocoa
class ChatSettingsExtension(SettingsGroup):
    disable_replication = Setting(type=bool, default=False)
    replication_password = Setting(
        type=str,
        default='') if memory_stick_mode() else KeychainPasswordSetting(
            type=str, default='', label='ChatReplication')
コード例 #3
0
ファイル: account.py プロジェクト: AGProjects/blink-cocoa
class AuthSettingsExtension(AuthSettings):
    username = Setting(type=str, default=None, nillable=True)
    password = Setting(
        type=str,
        default='') if memory_stick_mode() else KeychainPasswordSetting(
            type=str, default='')
コード例 #4
0
ファイル: account.py プロジェクト: AGProjects/blink-cocoa
class ServerSettings(SettingsGroup):
    settings_url = Setting(type=HTTPURL, default=None, nillable=True)
    web_password = Setting(
        type=str, default='',
        nillable=True) if memory_stick_mode() else KeychainPasswordSetting(
            type=str, default='', nillable=True, label='WEB')
コード例 #5
0
ファイル: Main.py プロジェクト: bitsworking/blink-cocoa
        elif not isinstance(text, buffer):
            raise TypeError("write() argument must be a string or read-only buffer")
        Foundation.NSLog("%@", text)
    def writelines(self, lines):
        pool= Foundation.NSAutoreleasePool.alloc().init()
        for line in lines:
            if isinstance(line, basestring):
                line = line.rstrip()
            elif not isinstance(line, buffer):
                raise TypeError("writelines() argument must be a sequence of strings")
            Foundation.NSLog("%@", line)

sys.stdout = NSLogger()
sys.stderr = NSLogger()

if memory_stick_mode():
    from resources import ApplicationData
    from Foundation import NSBundle
    ApplicationData._cached_directory = os.path.join(os.path.dirname(NSBundle.mainBundle().bundlePath()), 'Data')

# import modules containing classes required to start application and load MainMenu.nib
import BlinkAppDelegate
import ContactWindowController
import growl

import signal
signal.signal(signal.SIGPIPE, signal.SIG_IGN)

# pass control to AppKit
from PyObjCTools import AppHelper
AppHelper.runEventLoop()