~ubuntu-branches/ubuntu/raring/vice/raring

« back to all changes in this revision

Viewing changes to src/arch/unix/macosx/cocoa/dialog/viceresourcewindowcontroller.m

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2009-03-31 00:37:15 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090331003715-mzclchtl0dp7fcl0
Tags: upstream-2.1.dfsg
ImportĀ upstreamĀ versionĀ 2.1.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
                                               object:nil];
40
40
}
41
41
 
 
42
-(void)triggerResourceUpdate:(id)sender
 
43
{
 
44
    // post notification in our UI thread's default notification center
 
45
    [[NSNotificationCenter defaultCenter] postNotificationName:VICEChangedResourcesNotification
 
46
                                                        object:sender];
 
47
}
 
48
 
 
49
// ----- Int Resources -----
 
50
 
42
51
-(int)getIntResource:(NSString *)name
43
52
{
44
53
    NSNumber *number = [[VICEApplication theMachineController] 
67
76
    return [self setIntResource:formatString toValue:value];
68
77
}
69
78
 
 
79
// ----- String Resources -----
 
80
 
 
81
-(NSString *)getStringResource:(NSString *)name
 
82
{
 
83
    return [[VICEApplication theMachineController] getStringResource:name];
 
84
}
 
85
 
 
86
-(NSString *)getStringResource:(NSString *)format withNumber:(int)number
 
87
{
 
88
    NSString *formatString = [NSString stringWithFormat:format,number];
 
89
    return [self getStringResource:formatString];
 
90
}
 
91
 
 
92
-(BOOL)setStringResource:(NSString *)name toValue:(NSString *)string
 
93
{
 
94
    return [[VICEApplication theMachineController] setStringResource:name
 
95
                                                               value:string];
 
96
}
 
97
 
 
98
-(BOOL)setStringResource:(NSString *)format withNumber:(int)number toValue:(NSString *)string
 
99
{
 
100
    NSString *formatString = [NSString stringWithFormat:format,number];
 
101
    return [self setStringResource:formatString toValue:string];
 
102
}
 
103
 
 
104
// ----- File Tools -----
 
105
 
 
106
- (NSString *)pickOpenFileWithTitle:(NSString *)title types:(NSArray *)types
 
107
{
 
108
    return [[VICEApplication theAppController] pickOpenFileWithTitle:title types:types];
 
109
}
 
110
 
 
111
- (NSString *)pickSaveFileWithTitle:(NSString *)title types:(NSArray *)types
 
112
{
 
113
    return [[VICEApplication theAppController] pickSaveFileWithTitle:title types:types];
 
114
}
 
115
 
 
116
- (NSString *)pickDirectoryWithTitle:(NSString *)title
 
117
{
 
118
    return [[VICEApplication theAppController] pickDirectoryWithTitle:title];
 
119
}
 
120
 
70
121
@end