Browse Source

Final touch-ups!

v1.2.4 v1.2.3.1
Abhishek Banthia 9 years ago
parent
commit
0d88969610
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 21
      Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 3
      Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme
  4. 2
      Clocker/Appearance Tab/CLAppearanceViewController.m
  5. 4
      Clocker/ApplicationDelegate.m
  6. 6
      Clocker/Floating Window/CLFloatingWindowController.h
  7. 23
      Clocker/Floating Window/CLFloatingWindowController.m
  8. 8
      Clocker/Model/CLTimezoneData.m

BIN
Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

21
Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -45,5 +45,26 @@
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]"
moduleName = "">
<Locations>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]"
moduleName = "Foundation"
usesParentBreakpointCondition = "Yes"
offsetFromSymbolStart = "0">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

3
Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme

@ -51,7 +51,8 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
showNonLocalizedStrings = "YES">
showNonLocalizedStrings = "YES"
region = "DE">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference

2
Clocker/Appearance Tab/CLAppearanceViewController.m

@ -85,6 +85,8 @@
{
sharedDelege.floatingWindow = [CLFloatingWindowController sharedFloatingWindow];
[sharedDelege.floatingWindow showWindow:nil];
[sharedDelege.floatingWindow.mainTableview reloadData];
[sharedDelege.floatingWindow startWindowTimer];
[NSApp activateIgnoringOtherApps:YES];
}
else

4
Clocker/ApplicationDelegate.m

@ -146,6 +146,9 @@ void *kContextActivePanel = &kContextActivePanel;
{
self.floatingWindow = [CLFloatingWindowController sharedFloatingWindow];
[self.floatingWindow showWindow:nil];
[self.floatingWindow.mainTableview reloadData];
[self.floatingWindow startWindowTimer];
[NSApp activateIgnoringOtherApps:YES];
}
@ -177,6 +180,7 @@ void *kContextActivePanel = &kContextActivePanel;
{
self.floatingWindow = [CLFloatingWindowController sharedFloatingWindow];
[self.floatingWindow showWindow:nil];
[self.floatingWindow startWindowTimer];
[NSApp activateIgnoringOtherApps:YES];
return;
}

6
Clocker/Floating Window/CLFloatingWindowController.h

@ -9,9 +9,13 @@
#import <Cocoa/Cocoa.h>
#import "CLParentPanelController.h"
@interface CLFloatingWindowController : CLParentPanelController <NSTableViewDataSource>
@interface CLFloatingWindowController : CLParentPanelController <NSTableViewDataSource, NSWindowDelegate>
@property (strong, nonatomic) NSTimer *floatingWindowTimer;
+ (instancetype)sharedFloatingWindow;
- (void)updatePanelColor;
- (void)startWindowTimer;
@end

23
Clocker/Floating Window/CLFloatingWindowController.m

@ -144,6 +144,7 @@ NSString *const CLTimezoneCellIdentifier = @"timeZoneCell";
cell.customName.stringValue = [dataObject formatStringShouldContainCity:YES];
NSNumber *displayFutureSlider = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplayFutureSliderKey];
if ([displayFutureSlider isEqualToNumber:[NSNumber numberWithInteger:1]])
{
self.futureSlider.hidden = YES;
@ -299,6 +300,28 @@ NSString *const CLTimezoneCellIdentifier = @"timeZoneCell";
[NSApp postEvent:newEvent atStart:NO];
}
-(void)windowWillClose:(NSNotification *)notification
{
self.futureSliderValue = 0;
if (self.floatingWindowTimer)
{
[self.floatingWindowTimer invalidate];
self.floatingWindowTimer = nil;
}
}
- (void)startWindowTimer
{
if (!self.floatingWindowTimer)
{
self.floatingWindowTimer = [NSTimer scheduledTimerWithTimeInterval:2.0
target:self
selector:@selector(updateTime) userInfo:nil
repeats:YES];
}
}
- (void)updatePanelColor
{
[super updatePanelColor];

8
Clocker/Model/CLTimezoneData.m

@ -218,10 +218,7 @@
}
- (NSString *)compareSystemDate:(NSString *)systemDate toTimezoneDate:(NSString *)date
{
NSParameterAssert(systemDate);
NSParameterAssert(date);
{
NSDateFormatter *formatter = [NSDateFormatter new];
formatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"MM/dd/yyyy"
options:0
@ -230,9 +227,6 @@
NSDate *localDate = [formatter dateFromString:systemDate];
NSDate *timezoneDate = [formatter dateFromString:date];
NSAssert(localDate != nil, @"Local date cannot be nil");
NSAssert(timezoneDate != nil, @"Local date cannot be nil");
// Specify which units we would like to use
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
NSInteger weekday = [calendar component:NSCalendarUnitWeekday fromDate:localDate];

Loading…
Cancel
Save