Permalink
Browse files

small fixes

  • Loading branch information...
1 parent cfe4a97 commit 023b280cfaf927c784aee7e1088b8a4bc9a5be9c @tomcool420 committed Jul 19, 2011
Showing with 19 additions and 8 deletions.
  1. +19 −8 SMFCustomQueryMenu.m
View
@@ -14,14 +14,7 @@ @implementation SMFCustomQueryMenu
@synthesize lastSearchedQuery=_lastSearchedQuery;
@synthesize delegate=_delegate;
@synthesize spinner =_spi;
--(id)previewControlForItem:(long)item
-{
- if ([_entryControl isHidden]) {
- return [SMFMediaPreview simplePreviewWithTitle:[self titleForRow:item] withSummary:nil withImage:[[BRThemeInfo sharedTheme]appleTVIcon]];
- }
- return nil;
-
-}
+
-(id)init;
{
self=[super init];
@@ -123,6 +116,16 @@ -(long)itemCount
{
return (long)2;
}
+-(void)controlWasActivated
+{
+ long count = [self itemCount];
+ if (count==0) {
+ [_entryControl setHidden:NO];
+ [self setFocusedControl:_entryControl];
+ }
+ [super controlWasActivated];
+
+}
-(id)itemForRow:(long)row
{
SMFMenuItem *menuItem= [SMFMenuItem menuItem];
@@ -144,4 +147,12 @@ -(void)search:(NSString *)searchString
{
//Do Something
}
+-(id)previewControlForItem:(long)item
+{
+ if ([_entryControl isHidden]) {
+ return [SMFMediaPreview simplePreviewWithTitle:[self titleForRow:item] withSummary:nil withImage:[[BRThemeInfo sharedTheme]appleTVIcon]];
+ }
+ return nil;
+
+}
@end

0 comments on commit 023b280

Please sign in to comment.