Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /XspfQT/XspfQTPreferenceWindowController.m

Parent Directory Parent Directory | Revision Log Revision Log


Revision 203 - (hide annotations) (download)
Sun Mar 29 00:57:52 2009 UTC (15 years ago) by masaki
File size: 1404 byte(s)
プリロードを開始する経過割合を設定出来るように環境設定を変更。
1 masaki 184 //
2     // XspfQTPreferenceWindowController.m
3     // XspfQT
4     //
5     // Created by Hori,Masaki on 09/03/17.
6     // Copyright 2009 masakih. All rights reserved.
7     //
8    
9     #import "XspfQTPreferenceWindowController.h"
10    
11    
12     @implementation XspfQTPreferenceWindowController
13     static XspfQTPreferenceWindowController *sharedInstance = nil;
14    
15     + (XspfQTPreferenceWindowController *)sharedInstance
16     {
17     @synchronized(self) {
18     if (sharedInstance == nil) {
19     [[self alloc] init]; // assignment not done here
20     }
21     }
22     return sharedInstance;
23     }
24    
25     + (id)allocWithZone:(NSZone *)zone
26     {
27     @synchronized(self) {
28     if (sharedInstance == nil) {
29     sharedInstance = [super allocWithZone:zone];
30     return sharedInstance; // assignment and return on first allocation
31     }
32     }
33     return nil; //on subsequent allocation attempts return nil
34     }
35    
36     - (id)copyWithZone:(NSZone *)zone
37     {
38     return self;
39     }
40    
41     - (id)retain
42     {
43     return self;
44     }
45    
46     - (unsigned)retainCount
47     {
48     return UINT_MAX; //denotes an object that cannot be released
49     }
50    
51     - (void)release
52     {
53     //do nothing
54     }
55    
56     - (id)autorelease
57     {
58     return self;
59     }
60    
61     #pragma mark-
62    
63     - (id)init
64     {
65     [super initWithWindowNibName:@"XspfQTPreference"];
66     return self;
67     }
68 masaki 203
69     - (void)awakeFromNib
70     {
71     [beginingPreloadPercentSlider setMinValue:0.01];
72     [beginingPreloadPercentSlider setMaxValue:0.99];
73     [beginingPreloadPercentSlider setAltIncrementValue:0.05];
74     }
75 masaki 184 @end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26