Skip to content
Merged
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
515 changes: 0 additions & 515 deletions Editor.xib

This file was deleted.

148 changes: 32 additions & 116 deletions Gas Mask.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

34 changes: 0 additions & 34 deletions Source/AlertBadge.h

This file was deleted.

58 changes: 0 additions & 58 deletions Source/AlertBadge.m

This file was deleted.

2 changes: 0 additions & 2 deletions Source/ApplicationController.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@

@interface ApplicationController : NSObject {
@private
IBOutlet NSProgressIndicator *busyIndicator;
IBOutlet HostsMainController *hostsController;
IBOutlet NSMenuItem *checkForUpdatesMenuItem;
int busyThreads;
BOOL shouldQuit;
BOOL editorWindowOpened;
SPUStandardUpdaterController *_updaterController;
Expand Down
44 changes: 7 additions & 37 deletions Source/ApplicationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@interface ApplicationController ()
{
__weak NSWindow *_editorWindow;
NSArray *_editorNibTopLevelObjects; // retains top-level NIB objects (e.g. EditorController)
}
@end

Expand Down Expand Up @@ -62,7 +61,6 @@ - (id)init
return sharedInstance;
}
if (self = [super init]) {
busyThreads = 0;
shouldQuit = YES;

BOOL isTesting = NSClassFromString(@"XCTestCase") != nil;
Expand Down Expand Up @@ -118,7 +116,7 @@ -(IBAction)quit:(id)sender
- (IBAction)openEditorWindow:(id)sender
{
if (!editorWindowOpened) {
if (_editorNibTopLevelObjects) {
if (_editorWindow) {
editorWindowOpened = YES;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(editorWindowWillClose:)
Expand Down Expand Up @@ -167,22 +165,6 @@ - (BOOL)editorWindowOpened
return editorWindowOpened;
}

- (void)increaseBusyThreadsCount:(NSNotification *)notification
{
busyThreads++;
[busyIndicator startAnimation:self];
}

- (void)decreaseBusyThreadsCount:(NSNotification *)notification
{
if (busyThreads > 0) {
busyThreads--;
}
if (busyThreads == 0) {
[busyIndicator stopAnimation:self];
}
}

#pragma mark - Application Delegate

- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
Expand All @@ -195,11 +177,7 @@ - (void)applicationWillFinishLaunching:(NSNotification *)aNotification
[NSApp setServicesProvider:self];

[self initStructure];

NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self selector:@selector(increaseBusyThreadsCount:) name:ThreadBusyNotification object:nil];
[nc addObserver:self selector:@selector(decreaseBusyThreadsCount:) name:ThreadNotBusyNotification object:nil];


[hostsController load];

if (!openedAtLogin() && [Preferences showEditorWindow]) {
Expand Down Expand Up @@ -286,20 +264,12 @@ - (void)initStructure
- (void)initEditorWindow
{
logDebug(@"Initializing editor window");
NSArray *topLevelObjects = nil;
[[NSBundle mainBundle] loadNibNamed:@"Editor" owner:self topLevelObjects:&topLevelObjects];
_editorNibTopLevelObjects = topLevelObjects;
_editorWindow = [EditorWindowPresenter createEditorWindow];
editorWindowOpened = YES;
for (id obj in topLevelObjects) {
if ([obj isKindOfClass:[NSWindow class]]) {
_editorWindow = obj;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(editorWindowWillClose:)
name:NSWindowWillCloseNotification
object:obj];
break;
}
}
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(editorWindowWillClose:)
name:NSWindowWillCloseNotification
object:_editorWindow];
}

- (void)activatePreviousFile:(NSNotification *)note
Expand Down
29 changes: 0 additions & 29 deletions Source/Badge.h

This file was deleted.

51 changes: 0 additions & 51 deletions Source/Badge.m

This file was deleted.

36 changes: 0 additions & 36 deletions Source/BadgeManager.h

This file was deleted.

78 changes: 0 additions & 78 deletions Source/BadgeManager.m

This file was deleted.

Loading