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

Unified Diff: chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc

Issue 7564036: Gtk: Fix the Sync error button on the bookmarks bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 9 years, 5 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/gtk/bookmarks/bookmark_bar_gtk.cc
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index 45d748c56e88435e1e3ab73d344fe5a04df885b0..b53e9c59310c55aff1c4432eb231206893ab3dc6 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)));
« 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