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

Side by Side Diff: chrome/browser/gtk/browser_toolbar_gtk.cc

Issue 3083018: [GTK] undo more toolbar destruction - unbreak GTK+ theme mode home button (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 g_signal_connect(forward_->widget(), "clicked", 165 g_signal_connect(forward_->widget(), "clicked",
166 G_CALLBACK(OnButtonClickThunk), this); 166 G_CALLBACK(OnButtonClickThunk), this);
167 gtk_box_pack_start(GTK_BOX(toolbar_left_), forward_->widget(), FALSE, 167 gtk_box_pack_start(GTK_BOX(toolbar_left_), forward_->widget(), FALSE,
168 FALSE, 0); 168 FALSE, 0);
169 169
170 reload_.reset(new ReloadButtonGtk(location_bar_.get(), browser_)); 170 reload_.reset(new ReloadButtonGtk(location_bar_.get(), browser_));
171 gtk_box_pack_start(GTK_BOX(toolbar_left_), reload_->widget(), FALSE, FALSE, 171 gtk_box_pack_start(GTK_BOX(toolbar_left_), reload_->widget(), FALSE, FALSE,
172 0); 172 0);
173 173
174 home_.reset(new CustomDrawButton(GtkThemeProvider::GetFrom(profile_), 174 home_.reset(new CustomDrawButton(GtkThemeProvider::GetFrom(profile_),
175 IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, NULL)); 175 IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, GTK_STOCK_HOME,
176 GTK_ICON_SIZE_SMALL_TOOLBAR));
176 gtk_widget_set_tooltip_text(home_->widget(), 177 gtk_widget_set_tooltip_text(home_->widget(),
177 l10n_util::GetStringUTF8(IDS_TOOLTIP_HOME).c_str()); 178 l10n_util::GetStringUTF8(IDS_TOOLTIP_HOME).c_str());
178 g_signal_connect(home_->widget(), "clicked", 179 g_signal_connect(home_->widget(), "clicked",
179 G_CALLBACK(OnButtonClickThunk), this); 180 G_CALLBACK(OnButtonClickThunk), this);
180 gtk_box_pack_start(GTK_BOX(toolbar_left_), home_->widget(), FALSE, FALSE, 181 gtk_box_pack_start(GTK_BOX(toolbar_left_), home_->widget(), FALSE, FALSE,
181 kToolbarWidgetSpacing); 182 kToolbarWidgetSpacing);
182 gtk_util::SetButtonTriggersNavigation(home_->widget()); 183 gtk_util::SetButtonTriggersNavigation(home_->widget());
183 184
184 gtk_box_pack_start(GTK_BOX(toolbar_), toolbar_left_, FALSE, FALSE, 185 gtk_box_pack_start(GTK_BOX(toolbar_), toolbar_left_, FALSE, FALSE,
185 kToolbarLeftAreaPadding); 186 kToolbarLeftAreaPadding);
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 709
709 return FALSE; 710 return FALSE;
710 } 711 }
711 712
712 bool BrowserToolbarGtk::UpgradeAnimationIsFaded() { 713 bool BrowserToolbarGtk::UpgradeAnimationIsFaded() {
713 return upgrade_reminder_animation_.cycles_remaining() > 0 && 714 return upgrade_reminder_animation_.cycles_remaining() > 0 &&
714 // This funky looking math makes the badge throb for 2 seconds once 715 // This funky looking math makes the badge throb for 2 seconds once
715 // every 8 seconds. 716 // every 8 seconds.
716 ((upgrade_reminder_animation_.cycles_remaining() - 1) / 2) % 4 == 0; 717 ((upgrade_reminder_animation_.cycles_remaining() - 1) / 2) % 4 == 0;
717 } 718 }
OLDNEW
« 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