mirror of https://github.com/FreeRDP/FreeRDP
commit
7cf638a20b
|
@ -21,7 +21,6 @@ jboolean jni_attach_thread(JNIEnv** env);
|
|||
void jni_detach_thread(void);
|
||||
void freerdp_callback(const char * callback, const char * signature, ...);
|
||||
jboolean freerdp_callback_bool_result(const char * callback, const char * signature, ...);
|
||||
void tsxconnect_callback(const char * callback, const char * signature, ...);
|
||||
|
||||
#endif /* FREERDP_ANDROID_JNI_CALLBACK_H */
|
||||
|
||||
|
|
|
@ -39,11 +39,7 @@
|
|||
_bookmark = [bookmark copyWithUUID];
|
||||
_params = [_bookmark params];
|
||||
|
||||
// if this is a TSX Connect bookmark - disable server settings
|
||||
if([_bookmark isKindOfClass:NSClassFromString(@"TSXConnectComputerBookmark")])
|
||||
_display_server_settings = NO;
|
||||
else
|
||||
_display_server_settings = YES;
|
||||
_display_server_settings = YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -348,20 +344,17 @@
|
|||
[[self view] endEditing:NO];
|
||||
|
||||
// verify that bookmark is complete (only for manual bookmarks)
|
||||
if (![_bookmark isKindOfClass:NSClassFromString(@"TSXConnectComputerBookmark")])
|
||||
if ([[_bookmark label] length] == 0 || [[_params StringForKey:@"hostname"] length] == 0 || [_params intForKey:@"port"] == 0)
|
||||
{
|
||||
if ([[_bookmark label] length] == 0 || [[_params StringForKey:@"hostname"] length] == 0 || [_params intForKey:@"port"] == 0)
|
||||
{
|
||||
BlockAlertView* alertView = [BlockAlertView alertWithTitle:NSLocalizedString(@"Cancel without saving?", @"Incomplete bookmark error title") message:NSLocalizedString(@"Press 'Cancel' to abort!\nPress 'Continue' to specify the required fields!", @"Incomplete bookmark error message")];
|
||||
[alertView setCancelButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel Button") block:^{
|
||||
// cancel bookmark editing and return to previous view controller
|
||||
[[self navigationController] popViewControllerAnimated:YES];
|
||||
}];
|
||||
[alertView addButtonWithTitle:NSLocalizedString(@"Continue", @"Continue Button") block:nil];
|
||||
[alertView show];
|
||||
return;
|
||||
}
|
||||
}
|
||||
BlockAlertView* alertView = [BlockAlertView alertWithTitle:NSLocalizedString(@"Cancel without saving?", @"Incomplete bookmark error title") message:NSLocalizedString(@"Press 'Cancel' to abort!\nPress 'Continue' to specify the required fields!", @"Incomplete bookmark error message")];
|
||||
[alertView setCancelButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel Button") block:^{
|
||||
// cancel bookmark editing and return to previous view controller
|
||||
[[self navigationController] popViewControllerAnimated:YES];
|
||||
}];
|
||||
[alertView addButtonWithTitle:NSLocalizedString(@"Continue", @"Continue Button") block:nil];
|
||||
[alertView show];
|
||||
return;
|
||||
}
|
||||
|
||||
// commit bookmark
|
||||
if ([[self delegate] respondsToSelector:@selector(commitBookmark:)])
|
||||
|
|
|
@ -26,12 +26,10 @@
|
|||
|
||||
// array with search results (or nil if no search active)
|
||||
NSMutableArray* _manual_search_result;
|
||||
NSMutableArray* _tsxconnect_search_result;
|
||||
NSMutableArray* _history_search_result;
|
||||
|
||||
// bookmark arrays
|
||||
NSMutableArray* _manual_bookmarks;
|
||||
NSMutableArray* _tsxconnect_bookmarks;
|
||||
|
||||
// bookmark star images
|
||||
UIImage* _star_on_img;
|
||||
|
@ -45,9 +43,6 @@
|
|||
|
||||
// temporary bookmark when asking if the user wants to store a bookmark for a session initiated by a quick connect
|
||||
ComputerBookmark* _temporary_bookmark;
|
||||
|
||||
// reachability notification helper for tsx connect
|
||||
Reachability* _tsxconnect_reachability;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UISearchBar* searchBar;
|
||||
|
|
|
@ -87,11 +87,6 @@
|
|||
|
||||
// set edit button to allow bookmark list editing
|
||||
[[self navigationItem] setRightBarButtonItem:[self editButtonItem]];
|
||||
|
||||
/*
|
||||
if (![[InAppPurchaseManager sharedInAppPurchaseManager] isProVersion])
|
||||
[[self navigationItem] setLeftBarButtonItem:[[UIBarButtonItem alloc] initWithTitle:@"Go Pro" style:UIBarButtonItemStyleDone target:self action:@selector(goProButtonPressed:)]];
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -139,19 +134,14 @@
|
|||
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_tsxconnect_reachability stopNotifier];
|
||||
[_tsxconnect_reachability release];
|
||||
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[_temporary_bookmark release];
|
||||
[_connection_history release];
|
||||
[_active_sessions release];
|
||||
[_tsxconnect_search_result release];
|
||||
[_manual_search_result release];
|
||||
[_manual_bookmarks release];
|
||||
[_tsxconnect_bookmarks release];
|
||||
|
||||
[_star_on_img release];
|
||||
[_star_off_img release];
|
||||
|
@ -242,8 +232,6 @@
|
|||
RDPSession* session = [_active_sessions objectAtIndex:[indexPath row]];
|
||||
[[cell title] setText:[session sessionName]];
|
||||
[[cell server] setText:[[session params] StringForKey:@"hostname"]];
|
||||
if([[[cell server] text] length] == 0)
|
||||
[[cell server] setText:@"TSX Connect"];
|
||||
[[cell username] setText:[[session params] StringForKey:@"username"]];
|
||||
[[cell screenshot] setImage:[session getScreenshotWithSize:[[cell screenshot] bounds].size]];
|
||||
[[cell disconnectButton] setTag:[indexPath row]];
|
||||
|
@ -390,7 +378,7 @@
|
|||
// - the quick connect/quick create bookmark cell
|
||||
// - any item while a search is applied
|
||||
if([proposedDestinationIndexPath row] == 0 || ([sourceIndexPath section] != [proposedDestinationIndexPath section]) ||
|
||||
_manual_search_result != nil || _tsxconnect_search_result != nil)
|
||||
_manual_search_result != nil)
|
||||
{
|
||||
return sourceIndexPath;
|
||||
}
|
||||
|
@ -579,8 +567,6 @@
|
|||
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar
|
||||
{
|
||||
// clear search result
|
||||
[_tsxconnect_search_result release];
|
||||
_tsxconnect_search_result = nil;
|
||||
[_manual_search_result release];
|
||||
_manual_search_result = nil;
|
||||
|
||||
|
@ -619,14 +605,13 @@
|
|||
RDPSession* session = (RDPSession*)[notification object];
|
||||
[_active_sessions removeObject:session];
|
||||
|
||||
// if this view is currently active refresh tsxconnect entries
|
||||
// if this view is currently active refresh entries
|
||||
if([[self navigationController] visibleViewController] == self)
|
||||
[_tableView reloadSections:[NSIndexSet indexSetWithIndex:SECTION_SESSIONS] withRowAnimation:UITableViewRowAnimationNone];
|
||||
|
||||
// if session's bookmark is not in the bookmark list ask the user if he wants to add it
|
||||
// (this happens if the session is created using the quick connect feature)
|
||||
if (![[session bookmark] isKindOfClass:NSClassFromString(@"TSXConnectComputerBookmark")] &&
|
||||
![_manual_bookmarks containsObject:[session bookmark]])
|
||||
if (![_manual_bookmarks containsObject:[session bookmark]])
|
||||
{
|
||||
// retain the bookmark in case we want to save it later
|
||||
_temporary_bookmark = [[session bookmark] retain];
|
||||
|
@ -711,7 +696,7 @@
|
|||
|
||||
- (BOOL)hasNoBookmarks
|
||||
{
|
||||
return ([_manual_bookmarks count] == 0 && [_tsxconnect_bookmarks count] == 0);
|
||||
return ([_manual_bookmarks count] == 0);
|
||||
}
|
||||
|
||||
- (UIButton*)disclosureButtonWithImage:(UIImage*)image
|
||||
|
@ -728,18 +713,15 @@
|
|||
- (void)performSearch:(NSString*)searchText
|
||||
{
|
||||
[_manual_search_result autorelease];
|
||||
[_tsxconnect_search_result autorelease];
|
||||
|
||||
if([searchText length] > 0)
|
||||
{
|
||||
_manual_search_result = [FilterBookmarks(_manual_bookmarks, [searchText componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]) retain];
|
||||
_tsxconnect_search_result = [FilterBookmarks(_tsxconnect_bookmarks, [searchText componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]) retain];
|
||||
_history_search_result = [FilterHistory(_connection_history, searchText) retain];
|
||||
}
|
||||
else
|
||||
{
|
||||
_history_search_result = nil;
|
||||
_tsxconnect_search_result = nil;
|
||||
_manual_search_result = nil;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ extern NSString* TSXSessionDidFailToConnectNotification;
|
|||
- (void)sessionBitmapContextDidChange:(RDPSession*)session;
|
||||
- (void)session:(RDPSession*)session needsRedrawInRect:(CGRect)rect;
|
||||
- (CGSize)sizeForFitScreenForSession:(RDPSession*)session;
|
||||
- (void)showGoProScreen:(RDPSession*)session;
|
||||
|
||||
- (void)session:(RDPSession*)session requestsAuthenticationWithParams:(NSMutableDictionary*)params;
|
||||
- (void)session:(RDPSession*)session verifyCertificateWithParams:(NSMutableDictionary*)params;
|
||||
|
|
|
@ -430,12 +430,6 @@ NSString* TSXSessionDidFailToConnectNotification = @"TSXSessionDidFailToConnect"
|
|||
[[self delegate] sessionBitmapContextDidChange:self];
|
||||
}
|
||||
|
||||
- (void)showGoProScreen
|
||||
{
|
||||
if ([[self delegate] respondsToSelector:@selector(showGoProScreen:)])
|
||||
[[self delegate] showGoProScreen:self];
|
||||
}
|
||||
|
||||
- (void)sessionRequestsAuthenticationWithParams:(NSMutableDictionary*)params
|
||||
{
|
||||
if ([[self delegate] respondsToSelector:@selector(session:requestsAuthenticationWithParams:)])
|
||||
|
|
Loading…
Reference in New Issue