ソースを参照

Renamed from ProxySwitcher to ToggleProxy

--HG--
rename : ProxySwitcher.py => ToggleProxy.py
tags/v1.0.0
Robert Klep 12年前
コミット
f46378309c
2個のファイルの変更5行の追加6行の削除
  1. +4
    -4
      ToggleProxy.py
  2. +1
    -2
      setup.py

ProxySwitcher.py → ToggleProxy.py ファイルの表示

@@ -5,7 +5,7 @@ from AppKit import *
from SystemConfiguration import *
import commands, re, time

class ProxySwitcher(NSObject):
class ToggleProxy(NSObject):

def applicationDidFinishLaunching_(self, notification):
# make status bar item
@@ -33,7 +33,7 @@ class ProxySwitcher(NSObject):
self.services[device] = service

def watchForProxyChanges(self):
store = SCDynamicStoreCreate(None, "name.klep.proxyswitcher", self.proxyStateChanged, None)
store = SCDynamicStoreCreate(None, "name.klep.toggleproxy", self.proxyStateChanged, None)
SCDynamicStoreSetNotificationKeys(store, None, [ 'State:/Network/Global/Proxies' ])

source = SCDynamicStoreCreateRunLoopSource(None, store, 0)
@@ -80,6 +80,6 @@ class ProxySwitcher(NSObject):

if __name__ == '__main__':
sharedapp = NSApplication.sharedApplication()
switcher = ProxySwitcher.alloc().init()
sharedapp.setDelegate_(switcher)
toggler = ToggleProxy.alloc().init()
sharedapp.setDelegate_(toggler)
sharedapp.run()

+ 1
- 2
setup.py ファイルの表示

@@ -2,9 +2,8 @@ from distutils.core import setup
from glob import glob
import py2app, sys, os, commands

# define distutils setup structure
setup(
app = [ 'ProxySwitcher.py' ],
app = [ 'ToggleProxy.py' ],
options = dict(py2app = dict(
plist = dict(
LSBackgroundOnly = True


読み込み中…
キャンセル
保存