Bug 17046 - [GTK] Context menu fixes and customisation suport
Summary: [GTK] Context menu fixes and customisation suport
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Major
Assignee: Christian Dywan
Keywords: Gtk
: 15784 (view as bug list)
Depends on:
Reported: 2008-01-28 10:59 PST by Christian Dywan
Modified: 2008-08-18 14:42 PDT (History)
4 users (show)

See Also:

Make context menu native (11.92 KB, patch)
2008-01-28 11:28 PST, Christian Dywan
no flags Details | Formatted Diff | Diff
Make context menu native, fixed (23.56 KB, patch)
2008-01-31 10:34 PST, Christian Dywan
alp: review-
Details | Formatted Diff | Diff
Updated as discussed (23.42 KB, patch)
2008-02-02 16:16 PST, Christian Dywan
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dywan 2008-01-28 10:59:10 PST
WebCore's implementation of context menus is rather static and focused on the Mac port's needs. The goal of this bug is to make context menus behave according to Gtk conventions.
Comment 1 Christian Dywan 2008-01-28 11:28:38 PST
Created attachment 18739 [details]
Make context menu native

This is an attempt to make the context menu feel native on the Gtk port.

. The editable menu gains Delete and Select All items. Further more the Writing Direction menu was superseded by Input Methods and Insert Unicode Control Character.
. Back, Forward, Stop and Reload are always visible but insensitive when unavailable.
. Stock item labels provided by Gtk are preferred over custom strings.
. A 'populate-popup' signal is emitted on WebKitWebView to allow clients to extend the context menu.
Comment 2 Alp Toker 2008-01-30 20:54:12 PST
Sure this patch is complete? The new menu entries (Delete, Select All) don't appear for me.
Comment 3 Christian Dywan 2008-01-31 10:34:14 PST
Created attachment 18820 [details]
Make context menu native, fixed

Dunno what went wrong, uploading file anew.
Comment 4 Alp Toker 2008-02-01 15:20:22 PST
*** Bug 15784 has been marked as a duplicate of this bug. ***
Comment 5 Alp Toker 2008-02-01 15:52:18 PST
Comment on attachment 18820 [details]
Make context menu native, fixed

Needs better NULL safety and static WebCore strings for stock labels, and _ gettext should not be used for these strings, all as discussed on IRC.

(I also wonder if there's a less intrusive way to support itemCount(), though this approach is OK I guess.)
Comment 6 Christian Dywan 2008-02-02 16:16:34 PST
Created attachment 18876 [details]
Updated as discussed
Comment 7 Alp Toker 2008-02-03 22:21:00 PST
Comment on attachment 18876 [details]
Updated as discussed


Adding a couple of null checks as discussed, and a FIXME noting that the WebKit use should be removed from WebCore at some point.
Comment 8 Alp Toker 2008-02-03 22:23:12 PST
Landed in r29958. Hope you'll be able to look into fixing the FIXMEs soon.