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

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

Issue 27205: Add the IDC_GO mapping for the go button widget. (Closed)
Patch Set: typo Created 11 years, 10 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_view_gtk.h" 5 #include "chrome/browser/gtk/browser_toolbar_view_gtk.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/base_paths_linux.h" 8 #include "base/base_paths_linux.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 switch (id) { 108 switch (id) {
109 case IDC_BACK: 109 case IDC_BACK:
110 widget = back_->widget(); 110 widget = back_->widget();
111 break; 111 break;
112 case IDC_FORWARD: 112 case IDC_FORWARD:
113 widget = forward_->widget(); 113 widget = forward_->widget();
114 break; 114 break;
115 case IDC_RELOAD: 115 case IDC_RELOAD:
116 widget = reload_->widget(); 116 widget = reload_->widget();
117 break; 117 break;
118 case IDC_GO:
119 widget = go_->widget();
120 break;
118 case IDC_HOME: 121 case IDC_HOME:
119 if (home_.get()) 122 if (home_.get())
120 widget = home_->widget(); 123 widget = home_->widget();
121 break; 124 break;
122 case IDC_STAR: 125 case IDC_STAR:
123 widget = star_->widget(); 126 widget = star_->widget();
124 break; 127 break;
125 } 128 }
126 if (widget) 129 if (widget)
127 gtk_widget_set_sensitive(widget, enabled); 130 gtk_widget_set_sensitive(widget, enabled);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 /* static */ 227 /* static */
225 void BrowserToolbarGtk::OnButtonClick(GtkWidget* button, 228 void BrowserToolbarGtk::OnButtonClick(GtkWidget* button,
226 BrowserToolbarGtk* toolbar) { 229 BrowserToolbarGtk* toolbar) {
227 int tag = -1; 230 int tag = -1;
228 if (button == toolbar->back_->widget()) 231 if (button == toolbar->back_->widget())
229 tag = IDC_BACK; 232 tag = IDC_BACK;
230 else if (button == toolbar->forward_->widget()) 233 else if (button == toolbar->forward_->widget())
231 tag = IDC_FORWARD; 234 tag = IDC_FORWARD;
232 else if (button == toolbar->reload_->widget()) 235 else if (button == toolbar->reload_->widget())
233 tag = IDC_RELOAD; 236 tag = IDC_RELOAD;
237 else if (button == toolbar->go_->widget())
238 tag = IDC_GO;
234 else if (toolbar->home_.get() && button == toolbar->home_->widget()) 239 else if (toolbar->home_.get() && button == toolbar->home_->widget())
235 tag = IDC_HOME; 240 tag = IDC_HOME;
236 else if (button == toolbar->star_->widget()) 241 else if (button == toolbar->star_->widget())
237 tag = IDC_STAR; 242 tag = IDC_STAR;
238 243
239 if (tag == IDC_BACK || tag == IDC_FORWARD) 244 if (tag == IDC_BACK || tag == IDC_FORWARD)
240 toolbar->show_menu_factory_.RevokeAll(); 245 toolbar->show_menu_factory_.RevokeAll();
241 246
242 DCHECK(tag != -1) << "Impossible button click callback"; 247 DCHECK(tag != -1) << "Impossible button click callback";
243 toolbar->browser_->ExecuteCommand(tag); 248 toolbar->browser_->ExecuteCommand(tag);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu())); 337 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu()));
333 } 338 }
334 339
335 app_menu_->Popup(app_menu_button_->widget(), button_press_event); 340 app_menu_->Popup(app_menu_button_->widget(), button_press_event);
336 } 341 }
337 342
338 CustomDrawButton* BrowserToolbarGtk::MakeHomeButton() { 343 CustomDrawButton* BrowserToolbarGtk::MakeHomeButton() {
339 return BuildToolbarButton(IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, 344 return BuildToolbarButton(IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0,
340 l10n_util::GetString(IDS_TOOLTIP_HOME)); 345 l10n_util::GetString(IDS_TOOLTIP_HOME));
341 } 346 }
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