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

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

Issue 3041053: Merge 55159 - [GTK] undo more toolbar destruction - unbreak GTK+ theme mode h... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
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 | Annotate | Revision Log
« 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 g_signal_connect(forward_->widget(), "clicked", 166 g_signal_connect(forward_->widget(), "clicked",
167 G_CALLBACK(OnButtonClickThunk), this); 167 G_CALLBACK(OnButtonClickThunk), this);
168 gtk_box_pack_start(GTK_BOX(toolbar_left_), forward_->widget(), FALSE, 168 gtk_box_pack_start(GTK_BOX(toolbar_left_), forward_->widget(), FALSE,
169 FALSE, 0); 169 FALSE, 0);
170 170
171 reload_.reset(new ReloadButtonGtk(location_bar_.get(), browser_)); 171 reload_.reset(new ReloadButtonGtk(location_bar_.get(), browser_));
172 gtk_box_pack_start(GTK_BOX(toolbar_left_), reload_->widget(), FALSE, FALSE, 172 gtk_box_pack_start(GTK_BOX(toolbar_left_), reload_->widget(), FALSE, FALSE,
173 0); 173 0);
174 174
175 home_.reset(new CustomDrawButton(GtkThemeProvider::GetFrom(profile_), 175 home_.reset(new CustomDrawButton(GtkThemeProvider::GetFrom(profile_),
176 IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, NULL)); 176 IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, GTK_STOCK_HOME,
177 GTK_ICON_SIZE_SMALL_TOOLBAR));
177 gtk_widget_set_tooltip_text(home_->widget(), 178 gtk_widget_set_tooltip_text(home_->widget(),
178 l10n_util::GetStringUTF8(IDS_TOOLTIP_HOME).c_str()); 179 l10n_util::GetStringUTF8(IDS_TOOLTIP_HOME).c_str());
179 g_signal_connect(home_->widget(), "clicked", 180 g_signal_connect(home_->widget(), "clicked",
180 G_CALLBACK(OnButtonClickThunk), this); 181 G_CALLBACK(OnButtonClickThunk), this);
181 gtk_box_pack_start(GTK_BOX(toolbar_left_), home_->widget(), FALSE, FALSE, 182 gtk_box_pack_start(GTK_BOX(toolbar_left_), home_->widget(), FALSE, FALSE,
182 kToolbarWidgetSpacing); 183 kToolbarWidgetSpacing);
183 gtk_util::SetButtonTriggersNavigation(home_->widget()); 184 gtk_util::SetButtonTriggersNavigation(home_->widget());
184 185
185 gtk_box_pack_start(GTK_BOX(toolbar_), toolbar_left_, FALSE, FALSE, 186 gtk_box_pack_start(GTK_BOX(toolbar_), toolbar_left_, FALSE, FALSE,
186 kToolbarLeftAreaPadding); 187 kToolbarLeftAreaPadding);
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 710
710 return FALSE; 711 return FALSE;
711 } 712 }
712 713
713 bool BrowserToolbarGtk::UpgradeAnimationIsFaded() { 714 bool BrowserToolbarGtk::UpgradeAnimationIsFaded() {
714 return upgrade_reminder_animation_.cycles_remaining() > 0 && 715 return upgrade_reminder_animation_.cycles_remaining() > 0 &&
715 // This funky looking math makes the badge throb for 2 seconds once 716 // This funky looking math makes the badge throb for 2 seconds once
716 // every 8 seconds. 717 // every 8 seconds.
717 ((upgrade_reminder_animation_.cycles_remaining() - 1) / 2) % 4 == 0; 718 ((upgrade_reminder_animation_.cycles_remaining() - 1) / 2) % 4 == 0;
718 } 719 }
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