allow to show custom activity text

This commit is contained in:
matthias.ringwald 2010-04-25 18:14:53 +00:00
parent 86fccfd62b
commit 9ef40a1964
2 changed files with 7 additions and 1 deletions

View File

@ -52,10 +52,12 @@ typedef enum {
int remoteNameIndex;
BOOL showIcons;
int connectingIndex;
NSString *customActivityText;
}
-(void) markConnecting:(int)index; // use -1 for no connection active
@property (nonatomic, assign) NSObject<BTDiscoveryDelegate> * delegate;
@property (nonatomic, assign) BOOL showIcons;
@property (nonatomic, retain) NSString *customActivityText;
@end
@protocol BTDiscoveryDelegate

View File

@ -47,6 +47,7 @@
@implementation BTDiscoveryViewController
@synthesize showIcons;
@synthesize delegate = _delegate;
@synthesize customActivityText;
- (id) init {
self = [super initWithStyle:UITableViewStyleGrouped];
@ -195,7 +196,10 @@
int idx = [indexPath indexAtPosition:1];
if (idx >= [bt numberOfDevicesFound]) {
if ([bt isActivating]){
if (customActivityText) {
theLabel = customActivityText;
cell.accessoryView = bluetoothActivity;
} else if ([bt isActivating]){
theLabel = @"Activating BTstack...";
cell.accessoryView = bluetoothActivity;
} else if (![bt isActive]){