Applied print patch from pancake
authorEnno Boland (tox) <tox@s01.de>
Sun, 6 Sep 2009 08:10:13 +0000 (10:10 +0200)
committerEnno Boland (tox) <tox@s01.de>
Sun, 6 Sep 2009 08:10:13 +0000 (10:10 +0200)
surf.c

diff --git a/surf.c b/surf.c
index 476fd56..3e8e07d 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -197,8 +197,13 @@ keypress(GtkWidget* w, GdkEventKey *ev, Client *c) {
        if(ev->state & GDK_CONTROL_MASK) {
                switch(ev->keyval) {
                case GDK_p:
-                       gtk_clipboard_request_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), pasteurl, c);
+               case GDK_P:
+                       if((ev->state & GDK_SHIFT_MASK))
+                               webkit_web_frame_print(webkit_web_view_get_main_frame(c->view));
+                       else
+                               gtk_clipboard_request_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), pasteurl, c);
                        return TRUE;
+
                case GDK_y:
                        gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), webkit_web_view_get_uri(c->view), -1);
                        return TRUE;