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

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

Issue 159721: GTK: Show shortcuts in title bar context menu and tab context menu.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « chrome/browser/gtk/browser_titlebar.cc ('k') | chrome/browser/gtk/menu_gtk.cc » ('j') | 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_window_gtk.h" 5 #include "chrome/browser/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <X11/XF86keysym.h> 8 #include <X11/XF86keysym.h>
9 9
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Using gtk_window_get_position/size creates a race condition, so only use 143 // Using gtk_window_get_position/size creates a race condition, so only use
144 // this to get the initial bounds. After window creation, we pick up the 144 // this to get the initial bounds. After window creation, we pick up the
145 // normal bounds by connecting to the configure-event signal. 145 // normal bounds by connecting to the configure-event signal.
146 gfx::Rect GetInitialWindowBounds(GtkWindow* window) { 146 gfx::Rect GetInitialWindowBounds(GtkWindow* window) {
147 gint x, y, width, height; 147 gint x, y, width, height;
148 gtk_window_get_position(window, &x, &y); 148 gtk_window_get_position(window, &x, &y);
149 gtk_window_get_size(window, &width, &height); 149 gtk_window_get_size(window, &width, &height);
150 return gfx::Rect(x, y, width, height); 150 return gfx::Rect(x, y, width, height);
151 } 151 }
152 152
153 // Keep this in sync with various context menus which display the accelerators.
153 const struct AcceleratorMapping { 154 const struct AcceleratorMapping {
154 guint keyval; 155 guint keyval;
155 int command_id; 156 int command_id;
156 GdkModifierType modifier_type; 157 GdkModifierType modifier_type;
157 } kAcceleratorMap[] = { 158 } kAcceleratorMap[] = {
158 // Focus. 159 // Focus.
159 { GDK_k, IDC_FOCUS_SEARCH, GDK_CONTROL_MASK }, 160 { GDK_k, IDC_FOCUS_SEARCH, GDK_CONTROL_MASK },
160 { GDK_e, IDC_FOCUS_SEARCH, GDK_CONTROL_MASK }, 161 { GDK_e, IDC_FOCUS_SEARCH, GDK_CONTROL_MASK },
161 { XF86XK_Search, IDC_FOCUS_SEARCH, GdkModifierType(0) }, 162 { XF86XK_Search, IDC_FOCUS_SEARCH, GdkModifierType(0) },
162 { GDK_l, IDC_FOCUS_LOCATION, GDK_CONTROL_MASK }, 163 { GDK_l, IDC_FOCUS_LOCATION, GDK_CONTROL_MASK },
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 *edge = GDK_WINDOW_EDGE_NORTH_EAST; 1714 *edge = GDK_WINDOW_EDGE_NORTH_EAST;
1714 } else if (y < bounds_.height() - kResizeAreaCornerSize) { 1715 } else if (y < bounds_.height() - kResizeAreaCornerSize) {
1715 *edge = GDK_WINDOW_EDGE_EAST; 1716 *edge = GDK_WINDOW_EDGE_EAST;
1716 } else { 1717 } else {
1717 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; 1718 *edge = GDK_WINDOW_EDGE_SOUTH_EAST;
1718 } 1719 }
1719 return true; 1720 return true;
1720 } 1721 }
1721 NOTREACHED(); 1722 NOTREACHED();
1722 } 1723 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_titlebar.cc ('k') | chrome/browser/gtk/menu_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698