Skip to content

Commit

Permalink
Merge pull request #36 from rcarmo/master
Browse files Browse the repository at this point in the history
Merging changes from @rcarmo
  • Loading branch information
peelman committed May 13, 2013
2 parents 46546d9 + 3d0de0d commit 29849be
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
2 changes: 0 additions & 2 deletions Cord.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,6 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
CODE_SIGN_IDENTITY = "ѣ";
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
Expand All @@ -909,7 +908,6 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
CODE_SIGN_IDENTITY = "ѣ";
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
Expand Down
6 changes: 3 additions & 3 deletions Source/AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,7 @@ - (void)listUpdated

for (inst in connectedServers)
{
menuItem = [[NSMenuItem alloc] initWithTitle:[inst label] action:@selector(performServerMenuItem:) keyEquivalent:[NSString stringWithFormat:@"%i", [inst hotkey]]];
menuItem = [[NSMenuItem alloc] initWithTitle:[inst label] action:@selector(performServerMenuItem:) keyEquivalent:[NSString stringWithFormat:@"%i", (int)[inst hotkey]]];
[menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
[menuItem setRepresentedObject:inst];
[gui_serversMenu addItem:menuItem];
Expand All @@ -1897,7 +1897,7 @@ - (void)listUpdated

for (inst in savedServers)
{
menuItem = [[NSMenuItem alloc] initWithTitle:[inst label] action:@selector(performServerMenuItem:) keyEquivalent:[NSString stringWithFormat:@"%i", [inst hotkey]]];
menuItem = [[NSMenuItem alloc] initWithTitle:[inst label] action:@selector(performServerMenuItem:) keyEquivalent:[NSString stringWithFormat:@"%i", (int)[inst hotkey]]];
[menuItem setKeyEquivalentModifierMask:NSCommandKeyMask];
[menuItem setRepresentedObject:inst];
[gui_serversMenu addItem:menuItem];
Expand Down Expand Up @@ -2126,7 +2126,7 @@ - (void)setInspectorSettings:(CRDSession *)newSettings
screenHeight = CRDDefaultScreenHeight;
}
// If the user opens an .rdc file with a resolution that the user doesn't have, nothing will be selected. We're not adding it to the array controller, because we don't want resolutions from .rdc files to be persistent in CoRD prefs
NSString *resolutionLabel = [NSString stringWithFormat:@"%dx%d", screenWidth, screenHeight];
NSString *resolutionLabel = [NSString stringWithFormat:@"%ix%i", (int)screenWidth, (int)screenHeight];
[gui_screenResolution selectItemWithTitle:resolutionLabel];
}

Expand Down
2 changes: 1 addition & 1 deletion Source/CRDServerCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ - (void)drawWithFrame:(NSRect)frame inView:(NSView *)controlView
if ([inst hotkey] > -1) {

// Set up badge string and size.
NSString *badge = [NSString stringWithFormat:@"%@%d", [NSString stringWithUTF8String:"\xE2\x8C\x98"], [inst hotkey]];
NSString *badge = [NSString stringWithFormat:@"%@%i", [NSString stringWithUTF8String:"\xE2\x8C\x98"], (int)[inst hotkey]];
NSSize badgeNumSize = [badge sizeWithAttributes:nil];

// Calculate the badge's coordinates.
Expand Down
18 changes: 9 additions & 9 deletions Source/CRDSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -605,15 +605,15 @@ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)atomicFlag updateFilenames
write_int(@"disable menu anims", !windowAnimation);
write_int(@"disable themes", !themes);
write_int(@"disable font smoothing", !fontSmoothing);
write_int(@"audiomode", forwardAudio);
write_int(@"desktopwidth", screenWidth);
write_int(@"desktopheight", screenHeight);
write_int(@"session bpp", screenDepth);
write_int(@"audiomode", (int)forwardAudio);
write_int(@"desktopwidth", (int)screenWidth);
write_int(@"desktopheight", (int)screenHeight);
write_int(@"session bpp", (int)screenDepth);
write_int(@"cord save password", savePassword);
write_int(@"cord fullscreen", fullscreen);
write_int(@"cord row index", preferredRowIndex);
write_int(@"cord hotkey", hotkey);
write_int(@"cord displayMode", displayMode);
write_int(@"cord row index", (int)preferredRowIndex);
write_int(@"cord hotkey", (int)hotkey);
write_int(@"cord displayMode", (int)displayMode);

write_string(@"full address", CRDJoinHostNameAndPort(hostName, port));
write_string(@"username", username);
Expand All @@ -625,7 +625,7 @@ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)atomicFlag updateFilenames
{
id value = [otherAttributes objectForKey:key];
if ([value isKindOfClass:[NSNumber class]])
write_int(key, [value integerValue]);
write_int(key, (int)[value integerValue]);
else
write_string(key, value);
}
Expand Down Expand Up @@ -672,7 +672,7 @@ - (void)updateCellData
return [self performSelectorOnMainThread:@selector(updateCellData) withObject:nil waitUntilDone:NO];

// Update the text
NSString *fullHost = (port && port != CRDDefaultPort) ? [NSString stringWithFormat:@"%@:%d", hostName, port] : hostName;
NSString *fullHost = (port && port != CRDDefaultPort) ? [NSString stringWithFormat:@"%@:%i", hostName, (int)port] : hostName;
[cellRepresentation setDisplayedText:label username:username address:fullHost];

// Update the image
Expand Down
4 changes: 2 additions & 2 deletions Source/CRDShared.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

inline NSString * CRDJoinHostNameAndPort(NSString *host, NSInteger port)
{
return (port && port != CRDDefaultPort) ? [NSString stringWithFormat:@"%@:%d", host, port] : [[host copy] autorelease];
return (port && port != CRDDefaultPort) ? [NSString stringWithFormat:@"%@:%i", host, (int)port] : [[host copy] autorelease];
}

void CRDSplitHostNameAndPort(NSString *address, NSString **host, NSInteger *port)
Expand Down Expand Up @@ -284,7 +284,7 @@ inline CRDInputEvent CRDMakeInputEvent(unsigned int time, unsigned short type, u
if (baseDir == nil)
baseDir = @"/tmp";

return [baseDir stringByAppendingPathComponent:[NSString stringWithFormat:@"CoRD-TemporaryFile-%u-%u", time(NULL), rand()]];
return [baseDir stringByAppendingPathComponent:[NSString stringWithFormat:@"CoRD-TemporaryFile-%lu-%u", time(NULL), rand()]];
}

BOOL CRDPathIsHidden(NSString *path)
Expand Down

0 comments on commit 29849be

Please # to comment.