diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 03:21:40 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 03:21:40 +0000 |
commit | 50c73bd0cd9ee2dcb7e31cd08992c19a7043fe29 (patch) | |
tree | 809ab4106578beb7501a66017935356694eea115 /chrome/browser/gtk/browser_actions_toolbar_gtk.cc | |
parent | 114b1e2877f41fa84b22c7c586eac890d392e939 (diff) | |
download | chromium_src-50c73bd0cd9ee2dcb7e31cd08992c19a7043fe29.zip chromium_src-50c73bd0cd9ee2dcb7e31cd08992c19a7043fe29.tar.gz chromium_src-50c73bd0cd9ee2dcb7e31cd08992c19a7043fe29.tar.bz2 |
GTK: touch up appearance of browser actions badge.
Also don't show empty browser action tooltips.
BUG=26023
Review URL: http://codereview.chromium.org/341016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30316 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/browser_actions_toolbar_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/browser_actions_toolbar_gtk.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc index 37a3089..f6aee5f 100644 --- a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc @@ -115,8 +115,11 @@ class BrowserActionButton : public NotificationObserver, if (tab_id < 0) return; - gtk_widget_set_tooltip_text(button_.get(), - extension_->browser_action()->GetTitle(tab_id).c_str()); + std::string tooltip = extension_->browser_action()->GetTitle(tab_id); + if (tooltip.empty()) + gtk_widget_set_has_tooltip(button_.get(), FALSE); + else + gtk_widget_set_tooltip_text(button_.get(), tooltip.c_str()); SkBitmap image = extension_->browser_action()->GetIcon(tab_id); if (!image.isNull()) { |