[PyObjC-svn] r2159 - in trunk/pyobjc/pyobjc-framework-PreferencePanes: . Examples/EnvironmentPrefs

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Mon Apr 13 09:06:44 2009
New Revision: 2159

Log:
Update version to 2.2b2

Modified:
   trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/ShellEnv.py
   trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/setup.py
   trunk/pyobjc/pyobjc-framework-PreferencePanes/setup.py

Modified: trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/ShellEnv.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/ShellEnv.py	(original)
+++ trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/ShellEnv.py	Mon Apr 13 09:06:44 2009
@@ -12,28 +12,27 @@
 - Undo
 """
 import objc
-from AppKit import *
-from Foundation import *
+from Cocoa import *
 from PreferencePanes import *
-from PyObjCTools import NibClassBuilder, AppHelper
+from PyObjCTools import AppHelper
 import os
 
 # Uncomment this during development, you'll get exception tracebacks when
 # the Python code fails.
 #objc.setVerbose(1)
 
-NibClassBuilder.extractClasses("EnvironmentPane")
-
 # Location of the environment.plist
 ENVPLIST="~/.MacOSX/environment.plist"
 
 # Template for new keys
 NEWTMPL=NSLocalizedString("New_Variable_%d", "")
 
-class EnvironmentPane (NibClassBuilder.AutoBaseClass):
+class EnvironmentPane (NSPreferencePane):
     """
     The 'model/controller' for the "Shell Environment" preference pane
     """
+    deleteButton = objc.IBOutlet()
+    mainTable = objc.IBOutlet()
 
     #__slots__ = (
     #    'environ',  # The actual environment, as a NSMutableDictionary
@@ -89,6 +88,7 @@
             return NSUnselectLater
         return NSUnselectNow
 
+    @AppHelper.endSheetMethod
     def sheetDidDismiss_returnCode_contextInfo_(self, sheet, code, info):
         # Sheet handler for saving unsaved changes.
 
@@ -113,9 +113,6 @@
         self.changed = False
         self.replyToShouldUnselect_(NSUnselectNow)
 
-    sheetDidDismiss_returnCode_contextInfo_ = AppHelper.endSheetMethod(
-        sheetDidDismiss_returnCode_contextInfo_)
-
     def saveEnvironment(self):
         """
         Save the data to environment.plist
@@ -133,6 +130,7 @@
 
         return True
 
+    @objc.IBAction
     def deleteVariable_(self, sender):
         """
         Delete the selected variable
@@ -145,6 +143,7 @@
         self.mainTable.reloadData()
         self.changed = True
 
+    @objc.IBAction
     def newVariable_(self, sender):
         """
         Add a new variable

Modified: trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/setup.py	(original)
+++ trunk/pyobjc/pyobjc-framework-PreferencePanes/Examples/EnvironmentPrefs/setup.py	Mon Apr 13 09:06:44 2009
@@ -20,6 +20,7 @@
 )
 
 setup(
+    name="Shell Environment",
     plugin=['ShellEnv.py'],
     data_files=["English.lproj", "Dutch.lproj", "ShellEnv.icns"],
     options=dict(py2app=dict(

Modified: trunk/pyobjc/pyobjc-framework-PreferencePanes/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-PreferencePanes/setup.py	(original)
+++ trunk/pyobjc/pyobjc-framework-PreferencePanes/setup.py	Mon Apr 13 09:06:44 2009
@@ -18,7 +18,7 @@
 
 setup(
     name='pyobjc-framework-PreferencePanes',
-    version="2.2b1",
+    version="2.2b2",
     description = "Wrappers for the framework PreferencePanes on Mac OS X",
     long_description = __doc__,
     author = 'Ronald Oussoren',

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.