Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated git repo to latest code on bitbucket #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion JIRAConnect/JMCClasses/Base/JMCAttachmentItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ - (void)encodeWithCoder:(NSCoder*)coder {
[coder encodeObject:self.filenameFormat forKey:kFilenameFormat];
[coder encodeObject:self.name forKey:kName];
[coder encodeInt:self.type forKey:kType];
[coder encodeInt:self.dataLength forKey:kDataLength];
[coder encodeInt:(int)self.dataLength forKey:kDataLength];
[coder encodeBool:self.deleteFileWhenSent forKey:kDeleteFileWhenSent];
}

Expand Down
18 changes: 7 additions & 11 deletions JIRAConnect/JMCClasses/Core/audio/JMCRecorder.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,9 @@ + (JMCRecorder *)instance {
+ (BOOL)audioRecordingIsAvailable {
AVAudioSession *session = [AVAudioSession sharedInstance];
#ifdef __IPHONE_6_0
if ([AVAudioSession instancesRespondToSelector:@selector(isInputAvailable)]) {
return session.inputAvailable;
} else {
#endif
return session.inputIsAvailable;
#ifdef __IPHONE_6_0
}
return session.inputAvailable;
#else
return session.inputIsAvailable;
#endif
}

Expand All @@ -61,13 +57,13 @@ - (id)init {
NSError *err = nil;
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:&err];
if (err) {
JMCALog(@"audioSession: %@ %d %@", [err domain], [err code], [[err userInfo] description]);
JMCALog(@"audioSession: %@ %ld %@", [err domain], (long)[err code], [[err userInfo] description]);
return nil;
}
[audioSession setActive:YES error:&err];
err = nil;
if (err) {
JMCALog(@"audioSession: %@ %d %@", [err domain], [err code], [[err userInfo] description]);
JMCALog(@"audioSession: %@ %ld %@", [err domain], (long)[err code], [[err userInfo] description]);
return nil;
}

Expand All @@ -81,7 +77,7 @@ - (id)init {
AVAudioRecorder *recorder = [[AVAudioRecorder alloc] initWithURL:url settings:recordSetting error:&err];

if (!recorder) {
JMCALog(@"recorder: %@ %d %@", [err domain], [err code], [[err userInfo] description]);
JMCALog(@"recorder: %@ %ld %@", [err domain], (long)[err code], [[err userInfo] description]);
return nil;
}

Expand Down Expand Up @@ -123,7 +119,7 @@ - (NSData *)audioData {
NSError *err = nil;
NSData *audioData = [NSData dataWithContentsOfFile:[url path] options:0 error:&err];
if (!audioData) {
JMCALog(@"audio data: %@ %d %@", [err domain], [err code], [[err userInfo] description]);
JMCALog(@"audio data: %@ %ld %@", [err domain], (long)[err code], [[err userInfo] description]);
}
return audioData;
}
Expand Down
2 changes: 1 addition & 1 deletion JIRAConnect/JMCClasses/Core/crashes/CrashReporter.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ - (id)init
_crashReportAnalyzerStarted = 0;
} else
{
_crashReportAnalyzerStarted = [[NSUserDefaults standardUserDefaults] integerForKey:kCrashReportAnalyzerStarted];
_crashReportAnalyzerStarted = (int)[[NSUserDefaults standardUserDefaults] integerForKey:kCrashReportAnalyzerStarted];
}

testValue = nil;
Expand Down
2 changes: 1 addition & 1 deletion JIRAConnect/JMCClasses/Core/image/UIImage+JMCResize.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ - (UIImage *)jmc_resizedImageWithContentMode:(UIViewContentMode)contentMode
break;

default:
[NSException raise:NSInvalidArgumentException format:@"Unsupported content mode: %d", contentMode];
[NSException raise:NSInvalidArgumentException format:@"Unsupported content mode: %ld", contentMode];
}

CGSize newSize = CGSizeMake(self.size.width * ratio, self.size.height * ratio);
Expand Down
2 changes: 1 addition & 1 deletion JIRAConnect/JMCClasses/Core/inbox/JMCIssueStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ - (JMCIssue *) newIssueAtIndex:(NSUInteger)issueIndex {
}
return issue;
}
JMCALog(@"No issue at index = %u", issueIndex);
JMCALog(@"No issue at index = %lu", issueIndex);
return nil;
}

Expand Down
24 changes: 11 additions & 13 deletions JIRAConnect/JMCClasses/Core/inbox/JMCIssueViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (void)scrollToLastComment
- (void)viewDidLoad
{
[super viewDidLoad];
self.tableView.backgroundColor = [UIColor groupTableViewBackgroundColor];
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.separatorColor = [UIColor clearColor];
[self scrollToLastComment];
Expand Down Expand Up @@ -130,18 +130,16 @@ -(CGSize)summaryLabelSize{
CGSize size;
CGSize constrainedSize = CGSizeMake(self.tableView.bounds.size.width, self.tableView.bounds.size.height*2.f);

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
size = [self.issue.summary boundingRectWithSize:constrainedSize
options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:self.titleFont}
context:nil
].size;
else //if iOS version is below 6, use the method deprected in iOS 7
size = [self.issue.summary sizeWithFont:self.titleFont
constrainedToSize:constrainedSize
lineBreakMode:NSLineBreakByClipping
];

#ifdef __IPHONE_7_0
size = [self.issue.summary boundingRectWithSize:constrainedSize
options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:self.titleFont}
context:nil].size;
#else
size = [self.issue.summary sizeWithFont:self.titleFont
constrainedToSize:constrainedSize
lineBreakMode:NSLineBreakByClipping];
#endif
return size;

}
Expand Down
26 changes: 12 additions & 14 deletions JIRAConnect/JMCClasses/Core/inbox/JMCMessageBubble.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,18 @@ + (CGSize)detailLabelSizeForComment:(JMCComment *)comment withWidthConstraint:(C

CGSize size;

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
size = [[dateFormatter stringFromDate:comment.date]
boundingRectWithSize:CGSizeMake(widthConstraint, 20.f)
options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:[JMCMessageBubble fontDetailLabel], NSParagraphStyleAttributeName:paragraphStyle}
context:nil
].size;
else //if iOS version is below 6, use the method deprected in iOS 7
size = [[dateFormatter stringFromDate:comment.date]
sizeWithFont:[JMCMessageBubble fontDetailLabel]
constrainedToSize:CGSizeMake(widthConstraint, 20.f)
lineBreakMode:NSLineBreakByClipping
];

#ifdef __IPHONE_7_0
size = [[dateFormatter stringFromDate:comment.date]
boundingRectWithSize:CGSizeMake(widthConstraint, 20.f)
options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:[JMCMessageBubble fontDetailLabel], NSParagraphStyleAttributeName:paragraphStyle}
context:nil].size;
#else
size = [[dateFormatter stringFromDate:comment.date]
sizeWithFont:[JMCMessageBubble fontDetailLabel]
constrainedToSize:CGSizeMake(widthConstraint, 20.f)
lineBreakMode:NSLineBreakByClipping];
#endif

return CGSizeMake(ceilf(size.width), ceilf(size.height));

Expand Down
10 changes: 3 additions & 7 deletions JIRAConnect/JMCClasses/Core/inbox/JMCNotifier.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@ - (id)initWithStartFrame:(CGRect)start endFrame:(CGRect)end {
_label = [[UILabel alloc] initWithFrame:CGRectMake(0, 10, endFrame.size.width, 20)];
_label.backgroundColor = [UIColor clearColor];
#ifdef __IPHONE_6_0
if (NSTextAlignmentFromCTTextAlignment != NULL) {
_label.textAlignment = NSTextAlignmentCenter;
} else {
#endif
_label.textAlignment = UITextAlignmentCenter;
#ifdef __IPHONE_6_0
}
_label.textAlignment = NSTextAlignmentCenter;
#else
_label.textAlignment = UITextAlignmentCenter;
#endif
_label.textColor = [UIColor whiteColor];
[_toolbar addSubview:_label];
Expand Down
2 changes: 1 addition & 1 deletion JIRAConnect/JMCClasses/Core/model/JMCComment.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@implementation JMCComment

@synthesize requestId = _requestId, author = _author, systemUser = _systemUser, body = _body, date = _date ;
@synthesize requestId = _requestId, author = _author, systemUser = _systemUser, body = _body, date = _date, dateLong;


- (id) initWithAuthor:(NSString *)p_author
Expand Down
4 changes: 2 additions & 2 deletions JIRAConnect/JMCClasses/Core/sketch/JMCSketchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ - (void)viewWillAppear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:NO animated:YES];
}

#pragma mark UIScrollViewDelegate
#pragma mark - UIScrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView *)scView {

}
Expand All @@ -102,7 +102,7 @@ - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scView {

}

- (void)scrollViewDidEndZooming:(UIScrollView *)scView withView:(UIView *)view atScale:(float)scale {
- (void)scrollViewDidEndZooming:(UIScrollView *)scView withView:(UIView *)view atScale:(CGFloat)scale {

}

Expand Down
1 change: 0 additions & 1 deletion JIRAConnect/JMCClasses/Core/sketch/JMCVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
@property (nonatomic, strong) NSMutableArray *points;

- (void)addPoint:(CGPoint)point;
- (void)visitPoints;

- (void)extendPoint;
- (void)lengthOfArrowHead;
Expand Down
14 changes: 0 additions & 14 deletions JIRAConnect/JMCClasses/Core/sketch/JMCVector.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ - (id)init

- (void)drawWithContext:(CGContextRef)context
{
[self visitPoints];

[self findArrowHeadPoints];
[self findArrowBodyPoints];

Expand Down Expand Up @@ -56,18 +54,6 @@ - (void)addPoint:(CGPoint)point
[points addObject:[NSValue valueWithCGPoint:point]];
}

- (void)visitPoints
{
for (JMCVector *vector in points) {
firstValue = [points objectAtIndex:0];
firstPoint = [firstValue CGPointValue];

int i = [points count];
lastValue = [points objectAtIndex:i - 1];
lastPoint = [lastValue CGPointValue];
}
}

- (void)extendPoint
{
firstValue = [points objectAtIndex:0];
Expand Down
2 changes: 1 addition & 1 deletion JIRAConnect/JMCClasses/Core/transport/JMCTransport.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ +(void)writeMultiPartRequest:(NSArray*)parts boundary:(NSString*)boundary toFile
if (item != nil && item.filenameFormat != nil) {

NSString *filename = [NSString stringWithFormat:item.filenameFormat, attachmentIndex];
NSString *key = [item.name stringByAppendingFormat:@"-%d", attachmentIndex];
NSString *key = [item.name stringByAppendingFormat:@"-%ld", (long)attachmentIndex];
if (item.type == JMCAttachmentTypeCustom ||
item.type == JMCAttachmentTypeSystem) {
// the JIRA Plugin expects all customfields to be in the 'customfields' part.
Expand Down
4 changes: 2 additions & 2 deletions JIRAConnect/JMCClasses/Core/transport/JMCTransportOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ - (void)connection:(NSURLConnection *)aConnection didFailWithError:(NSError *)er
[[JMCRequestQueue sharedInstance] updateItem:requestId sentStatus:JMCSentStatusRetry bumpNumAttemptsBy:1];

if ([self.delegate respondsToSelector:@selector(transportDidFinishWithError:statusCode:requestId:)]) {
[self.delegate transportDidFinishWithError:error statusCode:statusCode requestId:requestId];
[self.delegate transportDidFinishWithError:error statusCode:(int)statusCode requestId:requestId];
}

#ifdef JMC_DEBUG
Expand All @@ -178,7 +178,7 @@ - (void)connection:(NSURLConnection *)aConnection didFailWithError:(NSError *)er
msg = [msg stringByAppendingString:responseString];
}
NSString *absoluteURL = [[request.URL absoluteURL] description];
JMCDLog(@"Request failed: %@ URL: %@, response code: %d", msg, absoluteURL, statusCode);
JMCDLog(@"Request failed: %@ URL: %@, response code: %ld", msg, absoluteURL, statusCode);
#endif

looping = NO;
Expand Down
Binary file not shown.
Loading