diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 01:45:13 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 01:45:13 +0000 |
commit | fa8e29066afa4511c44d5913752a1f2335494ed0 (patch) | |
tree | b8559ba329c3a59828aabc6cf61dab99ec18a777 /chrome/browser/ui/gtk | |
parent | da73286ddb7f59ad499dec8e989554ce6511083b (diff) | |
download | chromium_src-fa8e29066afa4511c44d5913752a1f2335494ed0.zip chromium_src-fa8e29066afa4511c44d5913752a1f2335494ed0.tar.gz chromium_src-fa8e29066afa4511c44d5913752a1f2335494ed0.tar.bz2 |
Gtk: Fix the Sync error button on the bookmarks bar.
Set the label and tooltip text.
BUG=90771
TEST=none
R=erg@chromium.org,thestig@chromium.org
Review URL: http://codereview.chromium.org/7564036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk')
-rw-r--r-- | chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc index 45d748c..b53e9c5 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc @@ -42,6 +42,7 @@ #include "grit/theme_resources.h" #include "grit/ui_resources.h" #include "ui/base/dragdrop/gtk_dnd_util.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/canvas_skia_paint.h" #include "ui/gfx/gtk_util.h" @@ -267,6 +268,11 @@ void BookmarkBarGtk::Init(Profile* profile) { gtk_box_pack_start(GTK_BOX(bookmark_hbox_), other_bookmarks_separator_, FALSE, FALSE, 0); + // Newer versions of Gtk default to not showing images on buttons if a label + // is set. Override that here. + GtkSettings* default_settings = gtk_settings_get_default(); + g_object_set(default_settings, "gtk-button-images", TRUE, NULL); + // We pack the button manually (rather than using gtk_button_set_*) so that // we can have finer control over its label. other_bookmarks_button_ = theme_service_->BuildChromeButton(); @@ -283,6 +289,12 @@ void BookmarkBarGtk::Init(Profile* profile) { sync_error_button_ = theme_service_->BuildChromeButton(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + gtk_widget_set_tooltip_text( + sync_error_button_, + l10n_util::GetStringUTF8(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC).c_str()); + gtk_button_set_label( + GTK_BUTTON(sync_error_button_), + l10n_util::GetStringUTF8(IDS_SYNC_BOOKMARK_BAR_ERROR).c_str()); gtk_button_set_image( GTK_BUTTON(sync_error_button_), gtk_image_new_from_pixbuf(rb.GetNativeImageNamed(IDR_WARNING))); |