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

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

Issue 126176: Fix bustage caused by last change. enumeration changed name and got rid of _D... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 6 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) 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/back_forward_button_gtk.h" 5 #include "chrome/browser/gtk/back_forward_button_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 23 matching lines...) Expand all
34 active = IDR_BACK_P; 34 active = IDR_BACK_P;
35 highlight = IDR_BACK_H; 35 highlight = IDR_BACK_H;
36 depressed = IDR_BACK_D; 36 depressed = IDR_BACK_D;
37 tooltip = IDS_TOOLTIP_BACK; 37 tooltip = IDS_TOOLTIP_BACK;
38 } 38 }
39 button_.reset(new CustomDrawButton(normal, active, highlight, depressed)); 39 button_.reset(new CustomDrawButton(normal, active, highlight, depressed));
40 gtk_widget_set_tooltip_text(widget(), 40 gtk_widget_set_tooltip_text(widget(),
41 l10n_util::GetStringUTF8(tooltip).c_str()); 41 l10n_util::GetStringUTF8(tooltip).c_str());
42 menu_model_.reset(new BackForwardMenuModelGtk(browser, 42 menu_model_.reset(new BackForwardMenuModelGtk(browser,
43 is_forward ? 43 is_forward ?
44 BackForwardMenuModel::FORWARD_MENU_DELEGATE : 44 BackForwardMenuModel::FORWARD_MENU :
45 BackForwardMenuModel::BACKWARD_MENU_DELEGATE, 45 BackForwardMenuModel::BACKWARD_MENU,
46 this)); 46 this));
47 47
48 g_signal_connect(widget(), "clicked", 48 g_signal_connect(widget(), "clicked",
49 G_CALLBACK(OnClick), this); 49 G_CALLBACK(OnClick), this);
50 g_signal_connect(widget(), "button-press-event", 50 g_signal_connect(widget(), "button-press-event",
51 G_CALLBACK(OnButtonPress), this); 51 G_CALLBACK(OnButtonPress), this);
52 gtk_widget_add_events(widget(), GDK_POINTER_MOTION_MASK); 52 gtk_widget_add_events(widget(), GDK_POINTER_MOTION_MASK);
53 g_signal_connect(widget(), "motion-notify-event", 53 g_signal_connect(widget(), "motion-notify-event",
54 G_CALLBACK(OnMouseMove), this); 54 G_CALLBACK(OnMouseMove), this);
55 55
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 int drag_min_distance; 113 int drag_min_distance;
114 g_object_get(settings, "gtk-dnd-drag-threshold", &drag_min_distance, NULL); 114 g_object_get(settings, "gtk-dnd-drag-threshold", &drag_min_distance, NULL);
115 if (event->y - button->y_position_of_last_press_ < drag_min_distance) 115 if (event->y - button->y_position_of_last_press_ < drag_min_distance)
116 return FALSE; 116 return FALSE;
117 117
118 // We will show the menu now. Cancel the delayed event. 118 // We will show the menu now. Cancel the delayed event.
119 button->show_menu_factory_.RevokeAll(); 119 button->show_menu_factory_.RevokeAll();
120 button->ShowBackForwardMenu(); 120 button->ShowBackForwardMenu();
121 return FALSE; 121 return FALSE;
122 } 122 }
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