After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684357 - Improve context menu in chat window
Improve context menu in chat window
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
2.33.x
Other Linux
: Normal enhancement
: 3.8
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2012-09-19 08:07 UTC by Guillaume Desmottes
Modified: 2012-12-26 08:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
empathy-webkit-util: coding style fixes (3.37 KB, patch)
2012-09-19 11:43 UTC, Guillaume Desmottes
committed Details | Review
factor out empathy_webkit_create_context_menu() (2.10 KB, patch)
2012-09-19 11:43 UTC, Guillaume Desmottes
committed Details | Review
export empathy_webkit_create_context_menu() (1.54 KB, patch)
2012-09-19 11:43 UTC, Guillaume Desmottes
committed Details | Review
depend on WebKitGtk+ 1.9.1 (720 bytes, patch)
2012-09-19 11:43 UTC, Guillaume Desmottes
committed Details | Review
theme-adium: use WebKitWebView::context-menu signal (3.75 KB, patch)
2012-09-19 11:44 UTC, Guillaume Desmottes
committed Details | Review
factor out empathy_webkit_show_inspector() (2.21 KB, patch)
2012-09-19 11:44 UTC, Guillaume Desmottes
committed Details | Review
add EMPATHY_WEBKIT_MENU_INSPECT flag (2.14 KB, patch)
2012-09-19 11:44 UTC, Guillaume Desmottes
committed Details | Review
theme-adium: use EMPATHY_WEBKIT_MENU_INSPECT (3.53 KB, patch)
2012-09-19 11:44 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2012-09-19 08:07:27 UTC
When you right click in a chat window you have a different context menu depending on the context:

if no text is selected:
- Back
- Forward
- Stop
- Reload
( - Inspect Element)

If text is selected:
- Copy
( - Inspect Element)

If the cursor is on a clickable link:
- Open Link
- Open Link in New Window
- Download linked file
- Copy Link location
( - Inspect Element)

Most of those should be removed as they don't make sense here.
This is with webkit 1.8.1
Comment 1 Guillaume Desmottes 2012-09-19 09:04:41 UTC
Actually those menus are only used if org.gnome.Empathy.conversation enable-webkit-developer-tools is set. The default menus are fine.
Comment 2 Guillaume Desmottes 2012-09-19 11:43:49 UTC
Created attachment 224737 [details] [review]
empathy-webkit-util: coding style fixes
Comment 3 Guillaume Desmottes 2012-09-19 11:43:51 UTC
Created attachment 224738 [details] [review]
factor out empathy_webkit_create_context_menu()
Comment 4 Guillaume Desmottes 2012-09-19 11:43:54 UTC
Created attachment 224739 [details] [review]
export empathy_webkit_create_context_menu()
Comment 5 Guillaume Desmottes 2012-09-19 11:43:57 UTC
Created attachment 224740 [details] [review]
depend on WebKitGtk+ 1.9.1

Needed for the WebKitWebView::context-menu signal.
Comment 6 Guillaume Desmottes 2012-09-19 11:44:00 UTC
Created attachment 224741 [details] [review]
theme-adium: use WebKitWebView::context-menu signal

That's now the proper way to implement our custom context menu.
Comment 7 Guillaume Desmottes 2012-09-19 11:44:03 UTC
Created attachment 224742 [details] [review]
factor out empathy_webkit_show_inspector()
Comment 8 Guillaume Desmottes 2012-09-19 11:44:06 UTC
Created attachment 224743 [details] [review]
add EMPATHY_WEBKIT_MENU_INSPECT flag
Comment 9 Guillaume Desmottes 2012-09-19 11:44:09 UTC
Created attachment 224744 [details] [review]
theme-adium: use EMPATHY_WEBKIT_MENU_INSPECT

We are now always using our own context menu even when the inspect menu item is
displayed.
Comment 10 Xavier Claessens 2012-12-26 08:53:35 UTC
+1
Comment 11 Guillaume Desmottes 2012-12-26 08:54:52 UTC
Attachment 224737 [details] pushed as 8ad4b14 - empathy-webkit-util: coding style fixes
Attachment 224738 [details] pushed as ea8cf1e - factor out empathy_webkit_create_context_menu()
Attachment 224739 [details] pushed as 4894558 - export empathy_webkit_create_context_menu()
Attachment 224740 [details] pushed as da413d0 - depend on WebKitGtk+ 1.9.1
Attachment 224741 [details] pushed as 5c9fcab - theme-adium: use WebKitWebView::context-menu signal
Attachment 224742 [details] pushed as c4d4989 - factor out empathy_webkit_show_inspector()
Attachment 224743 [details] pushed as 9db3e4d - add EMPATHY_WEBKIT_MENU_INSPECT flag
Attachment 224744 [details] pushed as 968b743 - theme-adium: use EMPATHY_WEBKIT_MENU_INSPECT