diff options
author | Xan Lopez <xan@src.gnome.org> | 2007-12-22 10:14:19 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2007-12-22 10:14:19 +0800 |
commit | 9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd (patch) | |
tree | 55d36728c85a5ffad9bb0539d7e368e21df7cee0 /embed/webkit/webkit-embed.c | |
parent | 6adb4570e797dcafcd865fd67e489766294a2f8b (diff) | |
download | gsoc2013-epiphany-9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd.tar gsoc2013-epiphany-9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd.tar.gz gsoc2013-epiphany-9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd.tar.bz2 gsoc2013-epiphany-9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd.tar.lz gsoc2013-epiphany-9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd.tar.xz gsoc2013-epiphany-9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd.tar.zst gsoc2013-epiphany-9bcf221c42b75b4fcedbbbbc5b7e9ec040d70efd.zip |
Implement clipboard operations for WebKit.
svn path=/trunk/; revision=7795
Diffstat (limited to 'embed/webkit/webkit-embed.c')
-rw-r--r-- | embed/webkit/webkit-embed.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c index 25c985abd..bf09d7150 100644 --- a/embed/webkit/webkit-embed.c +++ b/embed/webkit/webkit-embed.c @@ -63,12 +63,29 @@ static void impl_manager_do_command (EphyCommandManager *manager, const char *command) { + WebKitWebView *web_view = WEBKIT_EMBED (manager)->priv->web_view; + + if (! strcmp (command, "cmd_copy")) + return webkit_web_view_copy_clipboard (web_view); + else if (! strcmp (command, "cmd_cut")) + return webkit_web_view_cut_clipboard (web_view); + else if (! strcmp (command, "cmd_paste")) + return webkit_web_view_paste_clipboard (web_view); } static gboolean impl_manager_can_do_command (EphyCommandManager *manager, const char *command) { + WebKitWebView *web_view = WEBKIT_EMBED (manager)->priv->web_view; + + if (! strcmp (command, "cmd_copy")) + return webkit_web_view_can_copy_clipboard (web_view); + else if (! strcmp (command, "cmd_cut")) + return webkit_web_view_can_cut_clipboard (web_view); + else if (! strcmp (command, "cmd_paste")) + return webkit_web_view_can_paste_clipboard (web_view); + return FALSE; } |