[Python-checkins] python/dist/src/Mac/OSX/PythonLauncher FileSettings.h,1.2,1.3 FileSettings.m,1.4,1.5 PreferencesWindowController.h,1.1,1.2 PreferencesWindowController.m,1.2,1.3 factorySettings.plist,1.1,1.2

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Thu, 26 Dec 2002 14:10:55 -0800


Update of /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher
In directory sc8-pr-cvs1:/tmp/cvs-serv2846/PythonLauncher

Modified Files:
	FileSettings.h FileSettings.m PreferencesWindowController.h 
	PreferencesWindowController.m factorySettings.plist 
Log Message:
Changed the input field for the interpreter to use (in the preferences
window) to a combobox listing the known interpreters.


Index: FileSettings.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/FileSettings.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FileSettings.h	25 Nov 2002 13:11:03 -0000	1.2
--- FileSettings.h	26 Dec 2002 22:10:53 -0000	1.3
***************
*** 24,27 ****
--- 24,28 ----
  {
      NSString *interpreter;	// The pathname of the interpreter to use
+     NSArray *interpreters;	// List of known interpreters
      BOOL debug;			// -d option: debug parser
      BOOL verbose;		// -v option: verbose import
***************
*** 55,58 ****
--- 56,60 ----
  - (void)applyValuesFromDict: (NSDictionary *)dict;
  - (void)reset;
+ - (NSArray *) interpreters;
  
  @end

Index: FileSettings.m
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/FileSettings.m,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FileSettings.m	25 Nov 2002 13:11:05 -0000	1.4
--- FileSettings.m	26 Dec 2002 22:10:53 -0000	1.5
***************
*** 105,109 ****
      NSString *filename;
      NSDictionary *dict;
-     NSArray *interpreters;
      static NSDictionary *factorySettings;
      
--- 105,108 ----
***************
*** 164,167 ****
--- 163,167 ----
      self = [self initWithFileSettings: fsdefaults];
      if (!self) return self;
+     interpreters = [fsdefaults->interpreters retain];
      [self applyUserDefaults: filetype];
      prefskey = [filetype retain];
***************
*** 248,253 ****
          others,
          script,
!         with_terminal? "&& exit" : " &"];
  }
  
  // FileSettingsSource protocol 
--- 248,255 ----
          others,
          script,
!         with_terminal? "&& echo Exit status: $? && exit 1" : " &"];
  }
+ 
+ - (NSArray *) interpreters { return interpreters;};
  
  // FileSettingsSource protocol 

Index: PreferencesWindowController.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/PreferencesWindowController.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PreferencesWindowController.h	29 Jul 2002 21:36:35 -0000	1.1
--- PreferencesWindowController.h	26 Dec 2002 22:10:53 -0000	1.2
***************
*** 30,32 ****
--- 30,37 ----
  - (void)controlTextDidChange:(NSNotification *)aNotification;
  
+ - (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString;
+ - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
+ - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
+ 
+ 
  @end

Index: PreferencesWindowController.m
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/PreferencesWindowController.m,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PreferencesWindowController.m	25 Nov 2002 13:11:05 -0000	1.2
--- PreferencesWindowController.m	26 Dec 2002 22:10:53 -0000	1.3
***************
*** 91,94 ****
--- 91,110 ----
  };
  
+ // NSComboBoxDataSource protocol
+ - (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString
+ {
+     return [[settings interpreters] indexOfObjectIdenticalTo: aString];
+ }
+ 
+ - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index
+ {
+     return [[settings interpreters] objectAtIndex: index];
+ }
+ 
+ - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
+ {
+     return [[settings interpreters] count];
+ }
+ 
  
  @end

Index: factorySettings.plist
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/factorySettings.plist,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** factorySettings.plist	25 Nov 2002 13:11:06 -0000	1.1
--- factorySettings.plist	26 Dec 2002 22:10:53 -0000	1.2
***************
*** 40,43 ****
--- 40,48 ----
                      <string>/Library/Frameworks/Python.framework/Versions/Current/bin/python</string>
                      <string>/usr/bin/python</string>
+                     <string>/usr/local/bin/pythonw</string>
+                     <string>/sw/bin/pythonw</string>
+                     <string>/Library/Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/python</string>
+                     <string>/usr/bin/pythonw</string>
+                     <string>/Applications/MacPython-OSX/python-additions/Python.app/Contents/MacOS/python</string>
                  </array>
                  <key>nosite</key>