]> git.armaanb.net Git - chorizo.git/commitdiff
Add printing capability
authorArmaan Bhojwani <me@armaanb.net>
Sun, 6 Jun 2021 17:05:18 +0000 (13:05 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 6 Jun 2021 17:05:18 +0000 (13:05 -0400)
browser.c
man/lariza-config.5.scd

index 44506e6a45a9c3df2e435f7e9c16b460ccb2d6f2..e3bb431c29b67b9d166d65937eab7860c6dca08a 100644 (file)
--- 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);
index 6f16479e0db6ec9645bc21ba713119d632b2ae86..89ec83b66588ef509ec00ab2905c9e2b53bda3ba 100644 (file)
@@ -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++