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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 6507043: gtk: Do not show up a tooltip when hovering on the magnifying glass on NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 if (gtk_util::IsActingAsRoundedWindow(site_type_event_box_)) { 938 if (gtk_util::IsActingAsRoundedWindow(site_type_event_box_)) {
939 gtk_util::StopActingAsRoundedWindow(site_type_event_box_); 939 gtk_util::StopActingAsRoundedWindow(site_type_event_box_);
940 940
941 gtk_event_box_set_visible_window(GTK_EVENT_BOX(site_type_event_box_), 941 gtk_event_box_set_visible_window(GTK_EVENT_BOX(site_type_event_box_),
942 FALSE); 942 FALSE);
943 } 943 }
944 944
945 gtk_widget_hide(GTK_WIDGET(security_info_label_)); 945 gtk_widget_hide(GTK_WIDGET(security_info_label_));
946 } 946 }
947 947
948 if (location_entry()->IsEditingOrEmpty()) {
949 // Do not show the tooltip if the user has been editing the location
950 // bar, or the location bar is at the NTP.
951 gtk_widget_set_tooltip_text(location_icon_image_, "");
952 } else {
953 gtk_widget_set_tooltip_text(location_icon_image_,
954 l10n_util::GetStringUTF8(IDS_TOOLTIP_LOCATION_ICON).c_str());
955 }
956
948 gtk_widget_show(site_type_area()); 957 gtk_widget_show(site_type_area());
949 958
950 SetSiteTypeDragSource(); 959 SetSiteTypeDragSource();
951 } 960 }
952 961
953 void LocationBarViewGtk::UpdateEVCertificateLabelSize() { 962 void LocationBarViewGtk::UpdateEVCertificateLabelSize() {
954 // Figure out the width of the average character. 963 // Figure out the width of the average character.
955 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(security_info_label_)); 964 PangoLayout* layout = gtk_label_get_layout(GTK_LABEL(security_info_label_));
956 PangoContext* context = pango_layout_get_context(layout); 965 PangoContext* context = pango_layout_get_context(layout);
957 PangoFontMetrics* metrics = pango_context_get_metrics( 966 PangoFontMetrics* metrics = pango_context_get_metrics(
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 1558
1550 std::string badge_text = page_action_->GetBadgeText(tab_id); 1559 std::string badge_text = page_action_->GetBadgeText(tab_id);
1551 if (badge_text.empty()) 1560 if (badge_text.empty())
1552 return FALSE; 1561 return FALSE;
1553 1562
1554 gfx::CanvasSkiaPaint canvas(event, false); 1563 gfx::CanvasSkiaPaint canvas(event, false);
1555 gfx::Rect bounding_rect(widget->allocation); 1564 gfx::Rect bounding_rect(widget->allocation);
1556 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); 1565 page_action_->PaintBadge(&canvas, bounding_rect, tab_id);
1557 return FALSE; 1566 return FALSE;
1558 } 1567 }
OLDNEW
« 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