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

Unified Diff: chrome/browser/gtk/location_bar_view_gtk.cc

Issue 6252003: Accept keyword by pressing space. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
Index: chrome/browser/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc
index 5f95daa5278f95cc579d2f74f0cc07bc9d46aea7..c17027bffce18bbeb8d6844f137e7b468cf20496 100644
--- a/chrome/browser/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/gtk/location_bar_view_gtk.cc
@@ -613,6 +613,10 @@ std::wstring LocationBarViewGtk::GetTitle() const {
return UTF16ToWideHack(GetTabContents()->GetTitle());
}
+bool LocationBarViewGtk::IsKeywordHintVisible() const {
+ return GTK_WIDGET_VISIBLE(tab_to_search_hint_);
+}
+
void LocationBarViewGtk::ShowFirstRunBubble(FirstRun::BubbleType bubble_type) {
// We need the browser window to be shown before we can show the bubble, but
// we get called before that's happened.
@@ -1199,12 +1203,10 @@ void LocationBarViewGtk::AdjustChildrenVisibility() {
// Only one of |tab_to_search_box_| and |tab_to_search_hint_| can be visible
// at the same time.
- if (!show_selected_keyword_ && GTK_WIDGET_VISIBLE(tab_to_search_box_)) {
+ if (!show_selected_keyword_ && GTK_WIDGET_VISIBLE(tab_to_search_box_))
gtk_widget_hide(tab_to_search_box_);
- } else if (!show_keyword_hint_ && GTK_WIDGET_VISIBLE(tab_to_search_hint_)) {
+ else if (!show_keyword_hint_ && GTK_WIDGET_VISIBLE(tab_to_search_hint_))
gtk_widget_hide(tab_to_search_hint_);
- location_entry_->set_enable_tab_to_search(false);
- }
if (show_selected_keyword_) {
GtkRequisition box, full_label, partial_label;
@@ -1242,17 +1244,14 @@ void LocationBarViewGtk::AdjustChildrenVisibility() {
if (icon.width >= entry_box_width_ - kInnerPadding) {
gtk_widget_hide(tab_to_search_hint_);
- location_entry_->set_enable_tab_to_search(false);
} else if (full_width >= available_width) {
gtk_widget_hide(tab_to_search_hint_leading_label_);
gtk_widget_hide(tab_to_search_hint_trailing_label_);
gtk_widget_show(tab_to_search_hint_);
- location_entry_->set_enable_tab_to_search(true);
} else if (full_width < available_width) {
gtk_widget_show(tab_to_search_hint_leading_label_);
gtk_widget_show(tab_to_search_hint_trailing_label_);
gtk_widget_show(tab_to_search_hint_);
- location_entry_->set_enable_tab_to_search(true);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698