From 5a8800b1b500dd0cf5d37208056418cd1f891d76 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sun, 6 Jun 2021 13:05:18 -0400 Subject: [PATCH] Add printing capability --- browser.c | 4 ++++ man/lariza-config.5.scd | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/browser.c b/browser.c index 44506e6..e3bb431 100644 --- a/browser.c +++ b/browser.c @@ -933,6 +933,10 @@ key_common(GtkWidget *widget, GdkEvent *event, gpointer data) gtk_entry_set_text(GTK_ENTRY(c->location), goal); gtk_editable_set_position(GTK_EDITABLE(c->location), -1); return TRUE; + } else if (def_key("print", GDK_KEY_Print) == key) { + webkit_print_operation_run_dialog(webkit_print_operation_new(WEBKIT_WEB_VIEW(c->web_view)), + GTK_WINDOW(gtk_widget_get_toplevel(mw.win))); + return TRUE; } else if (def_key("quit", GDK_KEY_g) == key) { search(c, 2); gtk_widget_grab_focus(c->web_view); diff --git a/man/lariza-config.5.scd b/man/lariza-config.5.scd index 6f16479..89ec83b 100644 --- a/man/lariza-config.5.scd +++ b/man/lariza-config.5.scd @@ -97,6 +97,11 @@ All of these keybindings are bound to Control + key. Default: t++ Select the URL. +*print*++ + Type: string++ + Default: Print++ + Print the current page + *quit*++ Type: string++ Default: g++ -- 2.39.2