Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1442)

Unified Diff: chrome/browser/ui/views/web_intent_picker_views.cc

Issue 10387142: [Views, WebIntents] Hide suggestion label if none are available. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/web_intent_picker_views.cc
diff --git a/chrome/browser/ui/views/web_intent_picker_views.cc b/chrome/browser/ui/views/web_intent_picker_views.cc
index 3ce1a084b0385797f9dd265e42c522a2fb8deafd..5b58c678b0164440a8bbc3690d0e76282559f56a 100644
--- a/chrome/browser/ui/views/web_intent_picker_views.cc
+++ b/chrome/browser/ui/views/web_intent_picker_views.cc
@@ -959,6 +959,11 @@ void WebIntentPickerViews::OnModelChanged(WebIntentPickerModel* model) {
l10n_util::GetStringUTF16(IDS_INTENT_PICKER_GET_MORE_SERVICES));
}
+ if (model->GetSuggestedExtensionCount() == 0)
Peter Kasting 2012/05/16 22:09:27 Nit: Simpler: suggestions_label_->SetVisible(mo
groby-ooo-7-16 2012/05/16 23:03:07 Done.
+ suggestions_label_->SetVisible(false);
+ else
+ suggestions_label_->SetVisible(true);
+
service_buttons_->Update();
extensions_->Update();
contents_->Layout();
@@ -1099,8 +1104,8 @@ void WebIntentPickerViews::InitContents() {
// Row with app suggestions label.
grid_layout->StartRow(0, kIndentedFullWidthColumnSet);
- suggestions_label_ = new views::Label(
- l10n_util::GetStringUTF16(IDS_INTENT_PICKER_GET_MORE_SERVICES));
+ suggestions_label_ = new views::Label();
+ suggestions_label_->SetVisible(false);
suggestions_label_->SetMultiLine(true);
suggestions_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
grid_layout->AddView(suggestions_label_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698