Browse Source

Common Strings

v1.2.1
Abhishek Banthia 9 years ago
parent
commit
dc3b902685
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 4
      Clocker/CommonStrings.h
  3. 3
      Clocker/CommonStrings.m
  4. 10
      Clocker/PanelController.m
  5. 5
      Clocker/PreferencesWindowController.m

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

Binary file not shown.

4
Clocker/CommonStrings.h

@ -14,5 +14,7 @@ extern NSString *const CLEmptyString;
extern NSString *const CLDefaultPreferenceKey;
extern NSString *const CLTimezoneName;
extern NSString *const CLCustomLabel;
extern NSString *const CLC24hourFormatSelectedKey;
extern NSString *const CL24hourFormatSelectedKey;
extern NSString *const CLDragSessionKey;
@end

3
Clocker/CommonStrings.m

@ -14,6 +14,7 @@ NSString *const CLEmptyString = @"";
NSString *const CLDefaultPreferenceKey = @"defaultPreferences";
NSString *const CLTimezoneName = @"timezoneName";
NSString *const CLCustomLabel = @"customLabel";
NSString *const CLC24hourFormatSelectedKey = @"is24HourFormatSelected";
NSString *const CL24hourFormatSelectedKey = @"is24HourFormatSelected";
NSString *const CLDragSessionKey = @"public.text";
@end

10
Clocker/PanelController.m

@ -49,11 +49,13 @@
#pragma mark -
#import "PreferencesWindowController.h"
#import "CommonStrings.h"
NSString *const CLPanelNibIdentifier = @"Panel";
NSString *const CLRatingCellViewIdentifier = @"ratingCellView";
NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
@implementation PanelController
@ -87,7 +89,7 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
[panel setBackgroundColor:[NSColor clearColor]];
//Register for drag and drop
[self.mainTableview registerForDraggedTypes: [NSArray arrayWithObject: @"public.text"]];
[self.mainTableview registerForDraggedTypes: [NSArray arrayWithObject:CLDragSessionKey]];
}
@ -435,9 +437,9 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
{
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:rowIndexes];
[pboard declareTypes:[NSArray arrayWithObject:@"public.text"] owner:self];
[pboard declareTypes:[NSArray arrayWithObject:CLDragSessionKey] owner:self];
[pboard setData:data forType:@"public.text"];
[pboard setData:data forType:CLDragSessionKey];
[self updateCellForOldSelection:rowIndexes.firstIndex andColor:[NSColor blackColor]];
return YES;
@ -448,7 +450,7 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
{
NSPasteboard *pBoard = [info draggingPasteboard];
NSData *data = [pBoard dataForType:@"public.text"];
NSData *data = [pBoard dataForType:CLDragSessionKey];
NSIndexSet *rowIndexes = [NSKeyedUnarchiver unarchiveObjectWithData:data];

5
Clocker/PreferencesWindowController.m

@ -38,7 +38,6 @@
#import "CommonStrings.h"
NSString *const CLPredicateKey = @"SELF CONTAINS[cd]%@";
NSString *const CLDragSessionKey = @"public.text";
NSString *const CLPreferencesNibIdentifier = @"PreferencesWindow";
NSString *const CLPreferencesTimezoneNameColumnIdentifier = @"timezoneName";
NSString *const CLPreferencesAbbreviationColumnIdentifier = @"abbreviation";
@ -217,7 +216,7 @@ static PreferencesWindowController *sharedPreferences = nil;
if (self.searchField.stringValue.length > 0) {
if ([name isEqualToString:self.filteredArray[self.availableTimezoneTableView.selectedRow]])
{
self.messageLabel.stringValue = @"Timezone has already been selected!";
self.messageLabel.stringValue = NSLocalizedString(@"DuplicateTimezoneMessage", nil);
[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(clearLabel) userInfo:nil repeats:NO];
return;
}
@ -335,7 +334,7 @@ static PreferencesWindowController *sharedPreferences = nil;
NSButton *is24HourFormatSelected = (NSButton *)sender;
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:is24HourFormatSelected.state] forKey:@"is24HourFormatSelected"];
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:is24HourFormatSelected.state] forKey:CL24hourFormatSelectedKey];
[self refreshMainTableview];
}

Loading…
Cancel
Save