OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h" | 5 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h" |
6 | 6 |
7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/memory/scoped_nsobject.h" |
8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
402 [suggestionLabel_ setHidden:FALSE]; | 402 [suggestionLabel_ setHidden:FALSE]; |
403 [suggestionLabel_ setStringValue:base::SysUTF16ToNSString(labelText)]; | 403 [suggestionLabel_ setStringValue:base::SysUTF16ToNSString(labelText)]; |
404 textFrame.size.height += | 404 textFrame.size.height += |
405 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField: | 405 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField: |
406 suggestionLabel_]; | 406 suggestionLabel_]; |
407 [suggestionLabel_ setFrame: textFrame]; | 407 [suggestionLabel_ setFrame: textFrame]; |
408 } | 408 } |
409 } | 409 } |
410 | 410 |
411 - (void)startThrobberForRow:(NSInteger)index { | 411 - (void)startThrobberForRow:(NSInteger)index { |
412 NSLog(@"Throbberizing"); | |
Robert Sesek
2012/05/22 16:52:53
nix
groby-ooo-7-16
2012/05/22 16:58:48
Ooops - sorry for missing that, and thanks for the
| |
412 for (SingleSuggestionView* row in [self subviews]) { | 413 for (SingleSuggestionView* row in [self subviews]) { |
413 [row setEnabled:NO]; | 414 if ([row isMemberOfClass:[SingleSuggestionView class]]) { |
414 if ([row tag] == index) | 415 [row setEnabled:NO]; |
415 [row startThrobber]; | 416 if ([row tag] == index) { |
417 [row startThrobber]; | |
418 } | |
419 } | |
416 } | 420 } |
417 } | 421 } |
418 | 422 |
419 - (void)stopThrobber { | 423 - (void)stopThrobber { |
420 for (SingleSuggestionView* row in [self subviews]) { | 424 for (SingleSuggestionView* row in [self subviews]) { |
421 [row stopThrobber]; | 425 if ([row isMemberOfClass:[SingleSuggestionView class]]) { |
422 [row setEnabled:YES]; | 426 [row stopThrobber]; |
427 [row setEnabled:YES]; | |
428 } | |
423 } | 429 } |
424 } | 430 } |
425 | 431 |
426 - (IBAction)installExtension:(id)sender { | 432 - (IBAction)installExtension:(id)sender { |
427 [controller_ installExtension:sender]; | 433 [controller_ installExtension:sender]; |
428 } | 434 } |
429 | 435 |
430 | 436 |
431 - (CGFloat)addStackedView:(NSView*)view | 437 - (CGFloat)addStackedView:(NSView*)view |
432 toSubviews:(NSMutableArray*)subviews | 438 toSubviews:(NSMutableArray*)subviews |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
741 - (void)stopThrobber { | 747 - (void)stopThrobber { |
742 [closeButton_ setEnabled:YES]; | 748 [closeButton_ setEnabled:YES]; |
743 [self setIntentButtonsEnabled:YES]; | 749 [self setIntentButtonsEnabled:YES]; |
744 [suggestionView_ stopThrobber]; | 750 [suggestionView_ stopThrobber]; |
745 } | 751 } |
746 | 752 |
747 - (void)closeSheet { | 753 - (void)closeSheet { |
748 [NSApp endSheet:[self window]]; | 754 [NSApp endSheet:[self window]]; |
749 } | 755 } |
750 @end // WebIntentPickerSheetController | 756 @end // WebIntentPickerSheetController |
OLD | NEW |