Bug 15911 - [GTK] Use GtkBindingSet to make key bindings user-configurable
Summary: [GTK] Use GtkBindingSet to make key bindings user-configurable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2007-11-08 17:07 PST by Alp Toker
Modified: 2007-12-04 05:16 PST (History)
1 user (show)

See Also:


Attachments
patch key bindings and clipboard (15.23 KB, patch)
2007-12-03 15:37 PST, Luca Bruno
no flags Details | Formatted Diff | Diff
same patch without bold, italic, undo, redo (11.78 KB, patch)
2007-12-04 03:22 PST, Luca Bruno
no flags Details | Formatted Diff | Diff
patch indentation (12.14 KB, patch)
2007-12-04 03:49 PST, Luca Bruno
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!