Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MFAdvancedViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ - (IBAction)chooseIcon:(id)sender {
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setAllowsMultipleSelection:NO];
[panel setAllowedFileTypes:[NSArray arrayWithObject: @"icns"]];
NSInteger returnValue = [panel runModalForTypes:[NSArray arrayWithObject: @"icns"]];
if (returnValue == NSOKButton && [[panel filenames] count] > 0) {
NSString *filename = [[panel filenames] objectAtIndex:0];
NSInteger returnValue = [panel runModal];
if (returnValue == NSOKButton && [[panel URLs] count] > 0) {
NSString *filename = [[[panel URLs] objectAtIndex:0] path];
NSImage *iconImage = [[NSImage alloc] initWithContentsOfFile:filename];
if (iconImage) {
[(MFClientFS*)[self representedObject] setIconImage:iconImage];
Expand Down
18 changes: 6 additions & 12 deletions MFCore.m
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,12 @@ void mfcCheckIntegrity() {

// Kill all Macfusion Processes other than me
void mfcKaboomMacfusion() {
NSPredicate *macfusionAppsPredicate = [NSPredicate
predicateWithFormat:
@"self.NSApplicationBundleIdentifier CONTAINS \
org.mgorbach.macfusion2 AND self.NSApplicationPath != %@",
mfcMainBundlePath()];

NSArray *macfusionApps = [[[NSWorkspace sharedWorkspace] launchedApplications] filteredArrayUsingPredicate:
macfusionAppsPredicate];
NSArray *macfusionAppsPIDs = [macfusionApps valueForKey: @"NSApplicationProcessIdentifier"];
for(NSNumber *pid in macfusionAppsPIDs) {
kill( [pid intValue], SIGKILL );
}
NSArray *runningApps = [[NSWorkspace sharedWorkspace] runningApplications];
for (NSRunningApplication *app in runningApps) {
if ([app.bundleIdentifier isEqualToString:kMFMainBundleIdentifier] &&
![app.bundleURL.path isEqualToString:mfcMainBundlePath()])
[app terminate];
}
}

# pragma mark Trashing
Expand Down
2 changes: 1 addition & 1 deletion MFServerPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
}

+ (MFServerPlugin *)pluginFromBundleAtPath:(NSString *)path;

- (MFPlugin *)initWithPath:(NSString *)path;
@end
Loading