ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/PrefsEditor.mm
(Generate patch)

Comparing BasiliskII/src/MacOSX/PrefsEditor.mm (file contents):
Revision 1.11 by nigel, 2003-08-16T02:51:46Z vs.
Revision 1.13 by cebix, 2004-01-12T15:29:24Z

# Line 4 | Line 4
4   *
5   *      $Id$
6   *
7 < *  Basilisk II (C) 1997-2003 Christian Bauer
7 > *  Basilisk II (C) 1997-2004 Christian Bauer
8   *
9   *  This program is free software; you can redistribute it and/or modify
10   *  it under the terms of the GNU General Public License as published by
# Line 298 | Line 298 | extern string UserPrefsPath;   // from pre
298   - (IBAction) ChangeKeyboard: (NSPopUpButton *)sender
299   {
300          // Deselest current item
301 <        int             val = PrefsFindInt32("keyboardtype");
302 <        int             current = [keyboard indexOfItemWithTag: val];
303 <
304 <        if ( current )
301 >        int  current = [keyboard indexOfItemWithTag: PrefsFindInt32("keyboardtype")];
302 >        if ( current != -1 )
303                  [[keyboard itemAtIndex: current] setState: FALSE];
304  
305          PrefsReplaceInt32("keyboardtype", [[sender selectedItem] tag]);
# Line 774 | Line 772 | shouldProceedAfterError: (NSDictionary *
772          // Lists of thingies:
773  
774          val = PrefsFindInt32("keyboardtype");
775 <        [keyboard selectItemAtIndex: [keyboard indexOfItemWithTag: val]];
775 >        tmp = [keyboard indexOfItemWithTag: val];
776 >        if ( tmp != -1 )
777 >                [keyboard selectItemAtIndex: tmp];
778          for ( tmp = 0; tmp < [keyboard numberOfItems]; ++tmp )
779          {
780                  NSMenuItem      *type = [keyboard itemAtIndex: tmp];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines