dev.stuconnolly.com / svn / safaritabs

  1. /*
  2.  *  NSPreferences+SafariTabs.m
  3.  *
  4.  *  SafariTabs
  5.  *
  6.  *  Copyright (c) 2007 Stuart Connolly. All rights reserved.
  7.  *
  8.  *  This program is free software; you can redistribute it and/or
  9.  *  modify it under the terms of the GNU General Public License
  10.  *  as published by the Free Software Foundation; either version 2
  11.  *  of the License, or (at your option) any later version.
  12.  *
  13.  *  This program is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16.  *  GNU General Public License for more details.
  17.  *
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with this program; if not, write to the Free Software
  20.  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  21.  */
  22.  
  23. #import "NSPreferences+SafariTabs.h"
  24. #import "STPreferences.h"
  25.  
  26. @implementation NSPreferences_SafariTabs
  27.  
  28.  
  29. ////////////////////////////////////////////// *** load
  30.  
  31. + (void)load
  32. {
  33.     [NSPreferences_SafariTabs poseAsClass:[NSPreferences class]];
  34. }
  35.  
  36.  
  37. ////////////////////////////////////////////// *** sharedPreferences
  38.  
  39. + (id)sharedPreferences
  40. {
  41.     static BOOL added = NO;
  42.     id preferences = [super sharedPreferences];
  43.    
  44.     if((preferences != nil) && (!added)) {
  45.         added = YES;
  46.         [preferences addPreferenceNamed:@"SafariTabs" owner:[STPreferences sharedInstance]];
  47.     }
  48.    
  49.     return preferences;
  50. }
  51.  
  52. @end