Merge pull request #1157 from mfleisz/iosfix

iOS: Fixed issue where boookmarks were saved even though cancel was presed
This commit is contained in:
Marc-André Moreau 2013-04-04 14:21:45 -07:00
commit e98fb16f52
6 changed files with 27 additions and 19 deletions

View File

@ -61,16 +61,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()
if(IOS AND MONOLITHIC_BUILD AND (NOT BUILD_SHARED_LIBS))
# generate combined library
foreach(af ${${MODULE_PREFIX}_LIBS})
get_target_property(LOC ${af} LOCATION)
if ((NOT (${LOC} MATCHES ".*libfreerdp.a$")) AND (NOT (${LOC} MATCHES ".*libwinpr.a$")))
set(ALIST ${ALIST} ${LOC})
endif()
endforeach()
get_target_property(LOC ${MODULE_NAME} LOCATION)
set(ALIST ${ALIST} ${LOC})
message(${ALIST})
add_custom_command(TARGET ${MODULE_NAME} POST_BUILD COMMAND libtool -static -o libfreerdp-client-combined.a ${ALIST})
endif()

View File

@ -32,8 +32,11 @@
if ((self = [super initWithStyle:UITableViewStyleGrouped]))
{
// set additional settings state according to bookmark data
_bookmark = [bookmark retain];
_params = [bookmark params];
if ([[bookmark uuid] length] == 0)
_bookmark = [bookmark copy];
else
_bookmark = [bookmark copyWithUUID];
_params = [_bookmark params];
// if this is a TSX Connect bookmark - disable server settings
if([_bookmark isKindOfClass:NSClassFromString(@"TSXConnectComputerBookmark")])

View File

@ -680,8 +680,18 @@
- (void)commitBookmark:(ComputerBookmark *)bookmark
{
// if we got a manual bookmark that is not in the list yet - add it
if (![_manual_bookmarks containsObject:bookmark])
// if we got a manual bookmark that is not in the list yet - add it otherwise replace it
BOOL found = NO;
for (int idx = 0; idx < [_manual_bookmarks count]; ++idx)
{
if ([[bookmark uuid] isEqualToString:[[_manual_bookmarks objectAtIndex:idx] uuid]])
{
[_manual_bookmarks replaceObjectAtIndex:idx withObject:bookmark];
found = YES;
break;
}
}
if (!found)
[_manual_bookmarks addObject:bookmark];
// remove any quick connect history entry with the same hostname

View File

@ -99,7 +99,7 @@ static int ios_receive_channel_data(freerdp* instance, int channelId, UINT8* dat
void ios_process_channel_event(rdpChannels* channels, freerdp* instance)
{
RDP_EVENT* event = freerdp_channels_pop_event(channels);
wMessage* event = freerdp_channels_pop_event(channels);
if (event)
freerdp_event_free(event);
}

View File

@ -30,6 +30,7 @@
// Creates a copy of this object, with a new UUID
- (id)copy;
- (id)copyWithUUID;
// Whether user can delete, move, or rename this entry
- (BOOL)isDeletable;

View File

@ -87,6 +87,13 @@
return copy;
}
- (id)copyWithUUID
{
ComputerBookmark* copy = [self copy];
copy->_uuid = [[self uuid] copy];
return copy;
}
- (void)encodeWithCoder:(NSCoder *)coder
{
if (![coder allowsKeyedCoding])