| 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 893aee7f72b03105a89efd70e258118859c010f9..57583507893b8a8e4f172576916359d75547e081 100644
|
| --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
|
| +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
|
| @@ -451,20 +451,13 @@ void BookmarkBarGtk::Show(BookmarkBar::State old_state,
|
| }
|
| }
|
|
|
| - if (sync_ui_util::ShouldShowSyncErrorButton(sync_service_)) {
|
| - gtk_widget_show(sync_error_button_);
|
| - } else {
|
| - gtk_widget_hide(sync_error_button_);
|
| - }
|
| + gtk_widget_set_visible(
|
| + sync_error_button_,
|
| + sync_ui_util::ShouldShowSyncErrorButton(sync_service_));
|
|
|
| // Maybe show the instructions
|
| - if (show_instructions_) {
|
| - gtk_widget_hide(bookmark_toolbar_.get());
|
| - gtk_widget_show(instructions_);
|
| - } else {
|
| - gtk_widget_hide(instructions_);
|
| - gtk_widget_show(bookmark_toolbar_.get());
|
| - }
|
| + gtk_widget_set_visible(bookmark_toolbar_.get(), !show_instructions_);
|
| + gtk_widget_set_visible(instructions_, show_instructions_);
|
|
|
| SetChevronState();
|
| }
|
| @@ -509,14 +502,11 @@ void BookmarkBarGtk::CreateAllBookmarkButtons() {
|
| }
|
|
|
| void BookmarkBarGtk::SetInstructionState() {
|
| - show_instructions_ = model_->GetBookmarkBarNode()->empty();
|
| - if (show_instructions_) {
|
| - gtk_widget_hide(bookmark_toolbar_.get());
|
| - gtk_widget_show_all(instructions_);
|
| - } else {
|
| - gtk_widget_hide(instructions_);
|
| - gtk_widget_show(bookmark_toolbar_.get());
|
| - }
|
| + if (model_)
|
| + show_instructions_ = model_->GetBookmarkBarNode()->empty();
|
| +
|
| + gtk_widget_set_visible(bookmark_toolbar_.get(), !show_instructions_);
|
| + gtk_widget_set_visible(instructions_, show_instructions_);
|
| }
|
|
|
| void BookmarkBarGtk::SetChevronState() {
|
| @@ -1430,11 +1420,9 @@ void BookmarkBarGtk::OnThrobbingWidgetDestroy(GtkWidget* widget) {
|
| }
|
|
|
| void BookmarkBarGtk::OnStateChanged() {
|
| - if (sync_ui_util::ShouldShowSyncErrorButton(sync_service_)) {
|
| - gtk_widget_show(sync_error_button_);
|
| - } else {
|
| - gtk_widget_hide(sync_error_button_);
|
| - }
|
| + gtk_widget_set_visible(
|
| + sync_error_button_,
|
| + sync_ui_util::ShouldShowSyncErrorButton(sync_service_));
|
| }
|
|
|
| void BookmarkBarGtk::ShowImportDialog() {
|
|
|