Bug 15911

Summary: [GTK] Use GtkBindingSet to make key bindings user-configurable
Product: WebKit Reporter: Alp Toker <alp>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: alp
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch key bindings and clipboard
none
same patch without bold, italic, undo, redo
none
patch indentation alp: review+

Description Alp Toker 2007-11-08 17:07:34 PST
EditorClientGtk.cpp has a hard-coded switch statement at the time of writing, which should be replaced by proper use of GtkBindingSet as seen in widgets like GtkTextView.
Comment 1 Alp Toker 2007-11-08 17:08:30 PST
See also bug #15653
Comment 2 Alp Toker 2007-11-24 18:34:00 PST
One place to look for inspiration on this outside of GTK+ is the gtkhtml widget. They have an emacs editor keybinding there too.
Comment 3 Luca Bruno 2007-12-03 15:37:26 PST
Created attachment 17686 [details]
patch key bindings and clipboard

This patch fixes this bug and #16144.
Fixing key bindings fixed also clipboard and other keys for the page.

Take care epiphany issue on these bindings is not related to this.
Comment 4 Luca Bruno 2007-12-04 00:32:41 PST
Comment on attachment 17686 [details]
patch key bindings and clipboard

review +
Comment 5 Alp Toker 2007-12-04 01:24:06 PST
This patch is looking good, thanks. Works well.

I'm just going to do some research to make sure the API changes are supportable before actually reviewing this.
Comment 6 Luca Bruno 2007-12-04 03:22:58 PST
Created attachment 17696 [details]
same patch without bold, italic, undo, redo

Hi,
this one does the same thing as the previous one but does not change bold, italic and redo/undo actions behavior.
Those can be left as is however, since they work only in editable regions. That's the job of handleKeypress.
Comment 7 Luca Bruno 2007-12-04 03:49:38 PST
Created attachment 17697 [details]
patch indentation
Comment 8 Alp Toker 2007-12-04 05:09:36 PST
Comment on attachment 17697 [details]
patch indentation

r=me

Thanks!

Before landing I'll fix some remaining whitespace issues and remove some tabs. Also cleaning up the docs a bit, and changing the order of cut/copy/paste to match convention, but that's just aesthetic.
Comment 9 Alp Toker 2007-12-04 05:16:58 PST
Landed in r28386. Further enhancements (like covering the rest of the bindings) should be made in new bug reports. Thanks!