Title: [152341] trunk/Tools
Revision
152341
Author
[email protected]
Date
2013-07-03 00:30:29 -0700 (Wed, 03 Jul 2013)

Log Message

[GTK] Let F5 refresh the page in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=117638

Patch by Morten Stenshorne <[email protected]> on 2013-07-03
Reviewed by Carlos Garcia Campos.

Also use the correct icon for the refresh button that was already there.

* MiniBrowser/gtk/BrowserWindow.c:
(browser_window_init):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (152340 => 152341)


--- trunk/Tools/ChangeLog	2013-07-03 05:54:31 UTC (rev 152340)
+++ trunk/Tools/ChangeLog	2013-07-03 07:30:29 UTC (rev 152341)
@@ -1,3 +1,15 @@
+2013-07-03  Morten Stenshorne  <[email protected]>
+
+        [GTK] Let F5 refresh the page in MiniBrowser
+        https://bugs.webkit.org/show_bug.cgi?id=117638
+
+        Reviewed by Carlos Garcia Campos.
+
+        Also use the correct icon for the refresh button that was already there.
+
+        * MiniBrowser/gtk/BrowserWindow.c:
+        (browser_window_init):
+
 2013-07-02  Kondapally Kalyan  <[email protected]>
 
         Unreviewed. Add my email to a few watchlists.

Modified: trunk/Tools/MiniBrowser/gtk/BrowserWindow.c (152340 => 152341)


--- trunk/Tools/MiniBrowser/gtk/BrowserWindow.c	2013-07-03 05:54:31 UTC (rev 152340)
+++ trunk/Tools/MiniBrowser/gtk/BrowserWindow.c	2013-07-03 07:30:29 UTC (rev 152341)
@@ -29,6 +29,7 @@
 
 #include "BrowserDownloadsBar.h"
 #include "BrowserSettingsDialog.h"
+#include <gdk/gdkkeysyms.h>
 #include <string.h>
 
 enum {
@@ -522,6 +523,11 @@
     gtk_entry_set_icon_activatable(GTK_ENTRY(window->uriEntry), GTK_ENTRY_ICON_PRIMARY, FALSE);
     updateUriEntryIcon(window);
 
+    /* Keyboard accelerators */
+    GtkAccelGroup *accelGroup = gtk_accel_group_new();
+    gtk_window_add_accel_group(GTK_WINDOW(window), accelGroup);
+    g_object_unref(accelGroup);
+
     GtkWidget *toolbar = gtk_toolbar_new();
     window->toolbar = toolbar;
     gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar), GTK_ORIENTATION_HORIZONTAL);
@@ -565,9 +571,10 @@
     gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
     gtk_widget_show(GTK_WIDGET(item));
 
-    item = gtk_tool_button_new_from_stock(GTK_STOCK_OK);
+    item = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
     g_signal_connect_swapped(item, "clicked", G_CALLBACK(reloadCallback), window);
     gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
+    gtk_widget_add_accelerator(GTK_WIDGET(item), "clicked", accelGroup, GDK_KEY_F5, 0, GTK_ACCEL_VISIBLE);
     gtk_widget_show(GTK_WIDGET(item));
 
     GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to