]> git.armaanb.net Git - chorizo.git/commitdiff
Escape cancels loading
authorPeter Hofmann <scm@uninformativ.de>
Sat, 14 Jun 2014 14:28:02 +0000 (16:28 +0200)
committerPeter Hofmann <scm@uninformativ.de>
Sat, 14 Jun 2014 14:28:02 +0000 (16:28 +0200)
zea.c

diff --git a/zea.c b/zea.c
index 96754cf9373ad24c82b41dcf9b61a55680a1cda9..29a78411fdcad7618458f594cf778a6a2a70a4c2 100644 (file)
--- a/zea.c
+++ b/zea.c
@@ -367,6 +367,12 @@ zea_web_view_key(GtkWidget *widget, GdkEvent *event, gpointer data)
                                return TRUE;
                        }
                }
+               else if (((GdkEventKey *)event)->keyval == GDK_KEY_Escape)
+               {
+                       webkit_web_view_stop_loading(WEBKIT_WEB_VIEW(c->web_view));
+                       gtk_statusbar_pop(GTK_STATUSBAR(c->status), 1);
+                       gtk_statusbar_push(GTK_STATUSBAR(c->status), 1, "Aborted.");
+               }
        }
 
        return FALSE;