Re: [dev] [surf] print page

From: Enno Boland (Gottox) <gottox_AT_gmail.com>
Date: Sun, 6 Sep 2009 11:22:32 +0200

applied. thank you :)

2009/9/6 pancake <pancake_AT_youterm.com>:
> I find it useful to print to pdf. Would be nice if we add a commandline flag
> to directly print html into pdf in batch mode.
>
>
> use ^P (control + shift + P)
>
> diff -r ed940ea406e2 surf.c
> --- a/surf.c    Fri Sep 04 13:23:36 2009 +0200
> +++ b/surf.c    Sat Sep 05 17:16:26 2009 +0000
> @@ -197,8 +197,13 @@
>        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;
>
>

-- 
http://gnuffy.chaotika.org - Real Community Distro
Received on Sun Sep 06 2009 - 09:22:32 UTC

This archive was generated by hypermail 2.2.0 : Sun Sep 06 2009 - 09:24:01 UTC