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

Unified Diff: content/shell/shell_gtk.cc

Issue 14389010: Gtk content shell: map key F5 to reload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_gtk.cc
diff --git a/content/shell/shell_gtk.cc b/content/shell/shell_gtk.cc
index 22d6b330484c30c9fdd06899f3234041727b582b..227d82b8520355155c2bc26b601044fd3e11b905 100644
--- a/content/shell/shell_gtk.cc
+++ b/content/shell/shell_gtk.cc
@@ -134,6 +134,12 @@ void Shell::PlatformCreateWindow(int width, int height) {
g_cclosure_new(G_CALLBACK(OnNewWindowKeyPressedThunk),
this, NULL));
+ gtk_accel_group_connect(
+ accel_group, GDK_F5, (GdkModifierType)0,
+ GTK_ACCEL_VISIBLE,
+ g_cclosure_new(G_CALLBACK(OnReloadKeyPressedThunk),
+ this, NULL));
+
GtkWidget* toolbar = gtk_toolbar_new();
// Turn off the labels on the toolbar buttons.
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
@@ -288,6 +294,14 @@ gboolean Shell::OnHighlightURLView(GtkAccelGroup* accel_group,
return TRUE;
}
+gboolean Shell::OnReloadKeyPressed(GtkAccelGroup* accel_group,
+ GObject* acceleratable,
+ guint keyval,
+ GdkModifierType modifier) {
+ Reload();
+ return TRUE;
+}
+
void Shell::PlatformSetTitle(const string16& title) {
if (headless_)
return;
« no previous file with comments | « content/shell/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698