| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/browser_toolbar_gtk.h" | 5 #include "chrome/browser/gtk/browser_toolbar_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #include <X11/XF86keysym.h> | 9 #include <X11/XF86keysym.h> |
| 10 | 10 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 FALSE, 0); | 169 FALSE, 0); |
| 170 | 170 |
| 171 gtk_box_pack_start(GTK_BOX(toolbar_left_), back_forward_hbox_, FALSE, | 171 gtk_box_pack_start(GTK_BOX(toolbar_left_), back_forward_hbox_, FALSE, |
| 172 FALSE, kToolbarWidgetSpacing); | 172 FALSE, kToolbarWidgetSpacing); |
| 173 | 173 |
| 174 reload_.reset(new ReloadButtonGtk(location_bar_.get(), browser_)); | 174 reload_.reset(new ReloadButtonGtk(location_bar_.get(), browser_)); |
| 175 gtk_box_pack_start(GTK_BOX(toolbar_left_), reload_->widget(), FALSE, FALSE, | 175 gtk_box_pack_start(GTK_BOX(toolbar_left_), reload_->widget(), FALSE, FALSE, |
| 176 0); | 176 0); |
| 177 | 177 |
| 178 home_.reset(new CustomDrawButton(GtkThemeProvider::GetFrom(profile_), | 178 home_.reset(new CustomDrawButton(GtkThemeProvider::GetFrom(profile_), |
| 179 IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, | 179 IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, GTK_STOCK_HOME, |
| 180 IDR_BUTTON_MASK, GTK_STOCK_HOME, | 180 GTK_ICON_SIZE_SMALL_TOOLBAR)); |
| 181 GTK_ICON_SIZE_SMALL_TOOLBAR)); | |
| 182 gtk_widget_set_tooltip_text(home_->widget(), | 181 gtk_widget_set_tooltip_text(home_->widget(), |
| 183 l10n_util::GetStringUTF8(IDS_TOOLTIP_HOME).c_str()); | 182 l10n_util::GetStringUTF8(IDS_TOOLTIP_HOME).c_str()); |
| 184 g_signal_connect(home_->widget(), "clicked", | 183 g_signal_connect(home_->widget(), "clicked", |
| 185 G_CALLBACK(OnButtonClickThunk), this); | 184 G_CALLBACK(OnButtonClickThunk), this); |
| 186 gtk_box_pack_start(GTK_BOX(toolbar_left_), home_->widget(), FALSE, FALSE, | 185 gtk_box_pack_start(GTK_BOX(toolbar_left_), home_->widget(), FALSE, FALSE, |
| 187 kToolbarWidgetSpacing); | 186 kToolbarWidgetSpacing); |
| 188 gtk_util::SetButtonTriggersNavigation(home_->widget()); | 187 gtk_util::SetButtonTriggersNavigation(home_->widget()); |
| 189 | 188 |
| 190 gtk_box_pack_start(GTK_BOX(toolbar_), toolbar_left_, FALSE, FALSE, 0); | 189 gtk_box_pack_start(GTK_BOX(toolbar_), toolbar_left_, FALSE, FALSE, 0); |
| 191 | 190 |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 | 728 |
| 730 return FALSE; | 729 return FALSE; |
| 731 } | 730 } |
| 732 | 731 |
| 733 bool BrowserToolbarGtk::UpgradeAnimationIsFaded() { | 732 bool BrowserToolbarGtk::UpgradeAnimationIsFaded() { |
| 734 return upgrade_reminder_animation_.cycles_remaining() > 0 && | 733 return upgrade_reminder_animation_.cycles_remaining() > 0 && |
| 735 // This funky looking math makes the badge throb for 2 seconds once | 734 // This funky looking math makes the badge throb for 2 seconds once |
| 736 // every 8 seconds. | 735 // every 8 seconds. |
| 737 ((upgrade_reminder_animation_.cycles_remaining() - 1) / 2) % 4 == 0; | 736 ((upgrade_reminder_animation_.cycles_remaining() - 1) / 2) % 4 == 0; |
| 738 } | 737 } |
| OLD | NEW |