Skip to content

Commit

Permalink
Fix menu bar icon
Browse files Browse the repository at this point in the history
  • Loading branch information
benbaker76 committed Jun 6, 2023
1 parent 1a7341e commit 393a449
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 107 deletions.
14 changes: 4 additions & 10 deletions EFI Agent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
A2991B691B34DBE700AC2B23 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A2991B681B34DBE700AC2B23 /* AppDelegate.m */; };
A2991B6B1B34DBE700AC2B23 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A2991B6A1B34DBE700AC2B23 /* main.m */; };
A2991B6D1B34DBE700AC2B23 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2991B6C1B34DBE700AC2B23 /* Images.xcassets */; };
A2991B871B34DC9100AC2B23 /* StatusItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2991B861B34DC9100AC2B23 /* StatusItemView.m */; };
A2991B911B34E60E00AC2B23 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A2991B8F1B34E60E00AC2B23 /* MainViewController.m */; };
E2A397E72246CF4200C6D2B1 /* BarTableRowView.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A397E62246CE4C00C6D2B1 /* BarTableRowView.m */; };
E2A397EA2246E04000C6D2B1 /* DiskManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A397E92246E04000C6D2B1 /* DiskManagement.framework */; };
Expand All @@ -38,8 +37,6 @@
A2991B681B34DBE700AC2B23 /* AppDelegate.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; path = AppDelegate.m; sourceTree = "<group>"; };
A2991B6A1B34DBE700AC2B23 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
A2991B6C1B34DBE700AC2B23 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
A2991B851B34DC9100AC2B23 /* StatusItemView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatusItemView.h; sourceTree = "<group>"; };
A2991B861B34DC9100AC2B23 /* StatusItemView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StatusItemView.m; sourceTree = "<group>"; };
A2991B8E1B34E60E00AC2B23 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
A2991B8F1B34E60E00AC2B23 /* MainViewController.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = MainViewController.m; sourceTree = "<group>"; };
E2A397E52246CDE700C6D2B1 /* BarTableRowView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BarTableRowView.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -130,8 +127,6 @@
E2A78811222B204E002CA39A /* MiscTools.m */,
E2A78810222B204E002CA39A /* NVRAMXmlParser.h */,
E2A7880E222B204E002CA39A /* NVRAMXmlParser.m */,
A2991B851B34DC9100AC2B23 /* StatusItemView.h */,
A2991B861B34DC9100AC2B23 /* StatusItemView.m */,
A2991B651B34DBE700AC2B23 /* Supporting Files */,
);
path = EFIAgent;
Expand Down Expand Up @@ -240,7 +235,6 @@
buildActionMask = 2147483647;
files = (
E2A7AA362324433700D018B1 /* utils.c in Sources */,
A2991B871B34DC9100AC2B23 /* StatusItemView.m in Sources */,
E2A78813222B204F002CA39A /* MiscTools.m in Sources */,
A2991B6B1B34DBE700AC2B23 /* main.m in Sources */,
E2A7881D222B3CAE002CA39A /* LaunchOnStartup.m in Sources */,
Expand Down Expand Up @@ -367,13 +361,13 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0135;
CURRENT_PROJECT_VERSION = 0136;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "$(SRCROOT)/EFIAgent/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 1.3.5;
MARKETING_VERSION = 1.3.6;
PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.EFIAgent;
PRODUCT_NAME = "$(TARGET_NAME)";
SYSTEM_FRAMEWORK_SEARCH_PATHS = "$(inherited) $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks";
Expand All @@ -389,13 +383,13 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0135;
CURRENT_PROJECT_VERSION = 0136;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "$(SRCROOT)/EFIAgent/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 1.3.5;
MARKETING_VERSION = 1.3.6;
PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.EFIAgent;
PRODUCT_NAME = "$(TARGET_NAME)";
SYSTEM_FRAMEWORK_SEARCH_PATHS = "$(inherited) $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks";
Expand Down
26 changes: 11 additions & 15 deletions EFIAgent/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,25 @@


#import "AppDelegate.h"
#import "StatusItemView.h"

@implementation AppDelegate

- (void) applicationDidFinishLaunching:(NSNotification*)aNotification
{
// Create the NSStatusItem.
CGFloat width = 24.0;
CGFloat height = [NSStatusBar systemStatusBar].thickness;
NSRect viewFrame = NSMakeRect(0, 0, width, height);
self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
StatusItemView *statusItemView = [[StatusItemView alloc] initWithFrame:viewFrame];
[self.statusItem setView:statusItemView];
NSImage *image = [NSImage imageNamed:@"IconStatusBar"];
[image setTemplate:YES];
[((StatusItemView *)self.statusItem.view) setImage:image];

// Create our main view.
_mainView = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil];

// Hook up status item to main view.
[statusItemView setTarget:_mainView];
[statusItemView setAction:@selector(toggleWindow:)];
NSStatusBar *systemStatusBar = [NSStatusBar systemStatusBar];

// Create the NSStatusItem.
self.statusItem = [systemStatusBar statusItemWithLength:NSSquareStatusItemLength];

NSImage *image = [NSImage imageNamed:@"IconStatusBar"];
[image setTemplate:YES];
[image setSize:NSMakeSize(systemStatusBar.thickness, systemStatusBar.thickness)];
[self.statusItem setImage:image];
[self.statusItem setTarget:_mainView];
[self.statusItem setAction:@selector(toggleWindow:)];
}

- (void)dealloc
Expand Down
4 changes: 3 additions & 1 deletion EFIAgent/Images.xcassets/IconMount.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
"images" : [
{
"idiom" : "universal",
"filename" : "IconMount.png",
"filename" : "IconMount@1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "IconMount@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "IconMount@3x.png",
"scale" : "3x"
}
],
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 1 addition & 10 deletions EFIAgent/Images.xcassets/IconStatusBar.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
"images" : [
{
"filename" : "IconStatusBar.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file modified EFIAgent/Images.xcassets/IconStatusBar.imageset/IconStatusBar.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion EFIAgent/Images.xcassets/IconUnmount.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
"images" : [
{
"idiom" : "universal",
"filename" : "IconUnmount.png",
"filename" : "IconUnmount@1x.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "IconUnmount@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "IconUnmount@3x.png",
"scale" : "3x"
}
],
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion EFIAgent/MainView.xib
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
</menu>
</objects>
<resources>
<image name="IconMount" width="128" height="128"/>
<image name="IconMount" width="28" height="28"/>
<image name="IconOpen" width="128" height="128"/>
<image name="NSActionTemplate" width="19" height="19"/>
</resources>
Expand Down
20 changes: 0 additions & 20 deletions EFIAgent/StatusItemView.h

This file was deleted.

49 changes: 0 additions & 49 deletions EFIAgent/StatusItemView.m

This file was deleted.

0 comments on commit 393a449

Please sign in to comment.