From 7ecf0d329eae1afbeee905589c2c31f3900da80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoshiki=20V=C3=A1zquez=20Baeza?= Date: Sun, 28 Jul 2019 16:42:05 -0700 Subject: [PATCH] General cleanup Removes a couple of warnings, fixes some deprecations and deletes some dead code. --- MFCore/MFMainController.h | 2 +- MacFusion2.xcodeproj/project.pbxproj | 20 ++++++++++++++++++++ Menuling/MFMenulingAppDelegate.h | 2 +- Menuling/MGFadingWindow.h | 4 ++-- Settings/MFFilesystemCell.h | 1 + Settings/MFFilesystemCell.m | 6 ++++-- Settings/MFFilesystemTableView.m | 2 +- Settings/MFSettingsController.h | 3 +-- Settings/MFSettingsController.m | 2 +- 9 files changed, 32 insertions(+), 10 deletions(-) diff --git a/MFCore/MFMainController.h b/MFCore/MFMainController.h index 7d135dd..df29822 100644 --- a/MFCore/MFMainController.h +++ b/MFCore/MFMainController.h @@ -16,7 +16,7 @@ #import -@interface MFMainController : NSObject { +@interface MFMainController : NSObject { } + (MFMainController *)sharedController; diff --git a/MacFusion2.xcodeproj/project.pbxproj b/MacFusion2.xcodeproj/project.pbxproj index cab9b25..22127ef 100644 --- a/MacFusion2.xcodeproj/project.pbxproj +++ b/MacFusion2.xcodeproj/project.pbxproj @@ -1787,6 +1787,7 @@ D42E15590CE03A8200C81814 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -1846,6 +1847,7 @@ D45B70EB0E1B3DFF0036043E /* Release-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -1919,6 +1921,7 @@ D45B70EE0E1B3DFF0036043E /* Release-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "${TARGET_BUILD_DIR}/macfusionAgent.app/Contents/MacOS/macfusionAgent"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -1988,6 +1991,7 @@ D45B70F10E1B3DFF0036043E /* Release-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -2008,6 +2012,7 @@ D45B70F20E1B3DFF0036043E /* Release-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2032,6 +2037,7 @@ D45B70F30E1B3DFF0036043E /* Release-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2114,6 +2120,7 @@ D45B70F70E1B3E050036043E /* Debug-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2187,6 +2194,7 @@ D45B70FA0E1B3E050036043E /* Debug-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "${TARGET_BUILD_DIR}/macfusionAgent.app/Contents/MacOS/macfusionAgent"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2256,6 +2264,7 @@ D45B70FD0E1B3E050036043E /* Debug-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -2276,6 +2285,7 @@ D45B70FE0E1B3E050036043E /* Debug-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2300,6 +2310,7 @@ D45B70FF0E1B3E050036043E /* Debug-Signed */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2351,6 +2362,7 @@ D48DB9820D70D7A4008A62BB /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2375,6 +2387,7 @@ D48DB9830D70D7A4008A62BB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -2400,6 +2413,7 @@ D4B14BB90CE03CC4003195A3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "${TARGET_BUILD_DIR}/macfusionAgent.app/Contents/MacOS/macfusionAgent"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2424,6 +2438,7 @@ D4B14D6F0CE19545003195A3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -2444,6 +2459,7 @@ D4DB42070D3E863200C99914 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2475,6 +2491,7 @@ D4DB42080D3E863200C99914 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -2687,6 +2704,7 @@ D4FC0DC80CF23DE30029B133 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2716,6 +2734,7 @@ D4FC0DC90CF23DE30029B133 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "${TARGET_BUILD_DIR}/macfusionAgent.app/Contents/MacOS/macfusionAgent"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; @@ -2740,6 +2759,7 @@ D4FC0DCB0CF23DE30029B133 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_LINK_OBJC_RUNTIME = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; diff --git a/Menuling/MFMenulingAppDelegate.h b/Menuling/MFMenulingAppDelegate.h index b6bd99e..162f2d8 100644 --- a/Menuling/MFMenulingAppDelegate.h +++ b/Menuling/MFMenulingAppDelegate.h @@ -20,7 +20,7 @@ @class MFClient, MFQuickMountController; -@interface MFMenulingAppDelegate : NSObject { +@interface MFMenulingAppDelegate : NSObject { NSStatusItem* statusItem; MFClient* client; MFQuickMountController* qmController; diff --git a/Menuling/MGFadingWindow.h b/Menuling/MGFadingWindow.h index 62e2c8b..3e668dc 100644 --- a/Menuling/MGFadingWindow.h +++ b/Menuling/MGFadingWindow.h @@ -15,9 +15,9 @@ // limitations under the License. #import +#import - -@interface MGFadingWindow : NSPanel { +@interface MGFadingWindow : NSPanel { BOOL closing; } diff --git a/Settings/MFFilesystemCell.h b/Settings/MFFilesystemCell.h index fe681e7..6cfe906 100644 --- a/Settings/MFFilesystemCell.h +++ b/Settings/MFFilesystemCell.h @@ -26,6 +26,7 @@ - (NSRect)progressIndicatorRectInRect:(NSRect)rect; - (void)clearImageForFS:(MFClientFS*)fs; - (NSImage*)iconToDraw; +- (NSRect)rectForIconBox; @property(readwrite) BOOL editPushed; @property(readwrite) BOOL mountPushed; diff --git a/Settings/MFFilesystemCell.m b/Settings/MFFilesystemCell.m index 2cfc2f5..cb0e46f 100644 --- a/Settings/MFFilesystemCell.m +++ b/Settings/MFFilesystemCell.m @@ -45,8 +45,6 @@ - (id)init - (NSRect)insetRectWithFrame:(NSRect)frame { return frame; - NSRect insetRect = NSInsetRect(frame, 10, 0); - return insetRect; } - (NSRect)iconBoxWithFrame:(NSRect)frame { @@ -79,6 +77,10 @@ - (void)clearImageForFS:(MFClientFS*)fs [icons removeObjectForKey: fs]; } +- (NSRect)rectForIconBox{ + return NSMakeRect(0, 0, IMAGE_SIZE, IMAGE_SIZE); +} + # pragma mark Drawing - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { diff --git a/Settings/MFFilesystemTableView.m b/Settings/MFFilesystemTableView.m index 0fdce1c..357862d 100644 --- a/Settings/MFFilesystemTableView.m +++ b/Settings/MFFilesystemTableView.m @@ -228,7 +228,7 @@ - (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)theRowIndexes NSInteger fsRowIndex = [theRowIndexes firstIndex]; MFFilesystemCell* cell = (MFFilesystemCell*)[self preparedCellAtColumn:0 row: fsRowIndex]; NSImage* icon = [cell iconToDraw]; - [icon setFlipped: NO]; + [icon drawInRect:[cell rectForIconBox] fromRect:NSZeroRect operation:NSCompositeSourceIn fraction:1.0 respectFlipped:YES hints:nil]; return icon; } diff --git a/Settings/MFSettingsController.h b/Settings/MFSettingsController.h index f1718f1..a2907f0 100644 --- a/Settings/MFSettingsController.h +++ b/Settings/MFSettingsController.h @@ -21,7 +21,7 @@ MFLogViewerController, MGActionButton; -@interface MFSettingsController : NSObject +@interface MFSettingsController : NSObject { IBOutlet NSArrayController* filesystemArrayController; IBOutlet NSArrayController* pluginArrayController; @@ -36,7 +36,6 @@ MFLogViewerController, MGActionButton; } - (IBAction)newFSPopupClicked:(id)sender; -- (IBAction)showAboutWindow:(id)sender; - (IBAction)showPreferences:(id)sender; - (IBAction)startMenuItem:(id)sender; - (IBAction)showLogViewer:(id)sender; diff --git a/Settings/MFSettingsController.m b/Settings/MFSettingsController.m index 20fd4e1..16e3a94 100644 --- a/Settings/MFSettingsController.m +++ b/Settings/MFSettingsController.m @@ -343,7 +343,7 @@ - (IBAction)toggleSelectedFS:(id)sender { - (IBAction)revealConfigForSelectedFS:(id)sender { for(MFClientFS *fs in [self selectedFilesystems]) { - [[NSWorkspace sharedWorkspace] selectFile:fs.filePath inFileViewerRootedAtPath:nil]; + [[NSWorkspace sharedWorkspace] selectFile:fs.filePath inFileViewerRootedAtPath:@""]; } }