Skip to content

Commit

Permalink
Change Domain
Browse files Browse the repository at this point in the history
  • Loading branch information
cggaurav committed Jan 10, 2014
1 parent a419021 commit fe57ecf
Show file tree
Hide file tree
Showing 9 changed files with 830 additions and 3,807 deletions.
12 changes: 12 additions & 0 deletions PingMenu.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
1148067F18809A0100FE8318 /* PreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1148067D18809A0100FE8318 /* PreferencesWindowController.m */; };
1148068018809A0100FE8318 /* PreferencesWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1148067E18809A0100FE8318 /* PreferencesWindowController.xib */; };
1231FE9A179591A500CC0D12 /* PingEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 1231FE99179591A500CC0D12 /* PingEvent.m */; };
12C9F8BC13E6549300739017 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12C9F8BB13E6549300739017 /* Cocoa.framework */; };
12C9F8C613E6549300739017 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 12C9F8C413E6549300739017 /* InfoPlist.strings */; };
Expand All @@ -18,6 +20,9 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1148067C18809A0100FE8318 /* PreferencesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreferencesWindowController.h; path = ../PreferencesWindowController.h; sourceTree = "<group>"; };
1148067D18809A0100FE8318 /* PreferencesWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PreferencesWindowController.m; path = ../PreferencesWindowController.m; sourceTree = "<group>"; };
1148067E18809A0100FE8318 /* PreferencesWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PreferencesWindowController.xib; path = ../PreferencesWindowController.xib; sourceTree = "<group>"; };
1231FE98179591A500CC0D12 /* PingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingEvent.h; sourceTree = "<group>"; };
1231FE99179591A500CC0D12 /* PingEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PingEvent.m; sourceTree = "<group>"; };
12C9F8B713E6549300739017 /* PingMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PingMenu.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -88,6 +93,9 @@
12C9F8C113E6549300739017 /* PingMenu */ = {
isa = PBXGroup;
children = (
1148067C18809A0100FE8318 /* PreferencesWindowController.h */,
1148067D18809A0100FE8318 /* PreferencesWindowController.m */,
1148067E18809A0100FE8318 /* PreferencesWindowController.xib */,
12C9F8CD13E6549300739017 /* PingMenuAppDelegate.h */,
12C9F8CE13E6549300739017 /* PingMenuAppDelegate.m */,
12C9F8D013E6549300739017 /* MainMenu.xib */,
Expand Down Expand Up @@ -137,6 +145,8 @@
/* Begin PBXProject section */
12C9F8AE13E6549200739017 /* Project object */ = {
isa = PBXProject;
attributes = {
};
buildConfigurationList = 12C9F8B113E6549200739017 /* Build configuration list for PBXProject "PingMenu" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
Expand All @@ -161,6 +171,7 @@
files = (
12C9F8C613E6549300739017 /* InfoPlist.strings in Resources */,
12C9F8CC13E6549300739017 /* Credits.rtf in Resources */,
1148068018809A0100FE8318 /* PreferencesWindowController.xib in Resources */,
12C9F8D213E6549300739017 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -174,6 +185,7 @@
files = (
12C9F8C813E6549300739017 /* main.m in Sources */,
12C9F8CF13E6549300739017 /* PingMenuAppDelegate.m in Sources */,
1148067F18809A0100FE8318 /* PreferencesWindowController.m in Sources */,
12C9F8DE13E6586600739017 /* SimplePing.m in Sources */,
1231FE9A179591A500CC0D12 /* PingEvent.m in Sources */,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "12C9F8B613E6549300739017"
BuildableName = "PingMenu.app"
BlueprintName = "PingMenu"
ReferencedContainer = "container:PingMenu.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "12C9F8B613E6549300739017"
BuildableName = "PingMenu.app"
BlueprintName = "PingMenu"
ReferencedContainer = "container:PingMenu.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "12C9F8B613E6549300739017"
BuildableName = "PingMenu.app"
BlueprintName = "PingMenu"
ReferencedContainer = "container:PingMenu.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "12C9F8B613E6549300739017"
BuildableName = "PingMenu.app"
BlueprintName = "PingMenu"
ReferencedContainer = "container:PingMenu.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>PingMenu.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>12C9F8B613E6549300739017</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
5 changes: 5 additions & 0 deletions PingMenu/PingMenuAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <Cocoa/Cocoa.h>
#import "SimplePing.h"
#import "PreferencesWindowController.h"

@interface PingMenuAppDelegate : NSObject <NSApplicationDelegate,SimplePingDelegate> {
NSWindow *window;
Expand Down Expand Up @@ -52,7 +53,11 @@
@property (assign) IBOutlet NSMenuItem* menuRow7;
@property (assign) IBOutlet NSMenuItem* menuRow8;
@property (assign) IBOutlet NSMenuItem* menuRow9;
@property (retain) NSString* PING_HOST;


@property (assign, nonatomic) PreferencesWindowController *prefWindowController;
-(IBAction)quitMe:(id)sender;
-(IBAction)openPreferences:(id)sender;

@end
28 changes: 26 additions & 2 deletions PingMenu/PingMenuAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <sys/socket.h>
#include <netdb.h>

#define PING_HOST @"google.com"
//#define PING_HOST @"google.com"
#define COLOR_GOOD [NSColor blackColor]
#define COLOR_SLOW [NSColor colorWithCalibratedRed:0.755 green:0.345 blue:0.000 alpha:1.000]
#define COLOR_BAD [NSColor redColor]
Expand All @@ -37,11 +37,34 @@ @implementation PingMenuAppDelegate
@synthesize menuRow7;
@synthesize menuRow8;
@synthesize menuRow9;
@synthesize PING_HOST=_PING_HOST;

-(IBAction)quitMe:(id)sender {
exit(0);
}

- (PreferencesWindowController *) prefWindowController {
if(!_prefWindowController) {
_prefWindowController = [[PreferencesWindowController alloc] initWithWindowNibName:@"PreferencesWindowController"];
}

return _prefWindowController;
}

- (NSString *) PING_HOST {
if(!_PING_HOST){
_PING_HOST = @"google.com";
}
return _PING_HOST;

}

-(IBAction)openPreferences:(id)sender {

[self.prefWindowController showWindow:self];

}

- (void)activateStatusMenu
{
didStart = NO;
Expand All @@ -51,7 +74,7 @@ - (void)activateStatusMenu

self.pings = [[[NSMutableDictionary alloc] init] autorelease];

self.pinger = [SimplePing simplePingWithHostName:PING_HOST];
self.pinger = [SimplePing simplePingWithHostName:self.PING_HOST];
pinger.delegate = self;

self.theItem = [bar statusItemWithLength:NSVariableStatusItemLength];
Expand All @@ -65,6 +88,7 @@ - (void)activateStatusMenu

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[self activateStatusMenu];

}

-(void)updateMenuWithError:(NSString*)errString {
Expand Down
Loading

0 comments on commit fe57ecf

Please sign in to comment.