GNOME Bugzilla – Bug 765516
Use GTK+ widgets to display individual emails, rather than WebKitGTK
Last modified: 2017-02-16 07:05:07 UTC
Currently, ConversationViewer displays all messages in the selected conversation in a single WebKit.WebView instance. This requires a large number of hooks between viewer and the web view to manage user interaction just as saving attachments, handling popup menus, and so on. Since we want to port to the WebKit2 API (Bug 728002) and since its multi-process model means we would need a large DBus API to deal with all of this (if it is even possible), switch Geary to use GTK+ widgets to display message chrome (headers, attachments, etc). This means using an individual WebView widget for each RFC 822 message body displayed, and should help the DBus API for the WebKit2 port as minimial as possible.
Just pushed WIP to git.gnome.org as branch wip/765516-gtk-widget-conversation-viewer. Making good progress - most functionality is is place, needs a fair bit of polish however.
I'm planning on landing this soon for user feedback and so work on Bug 728002 can start. This will introduce some regressions that were not worth fixing until Geary has been ported to WebKit2. I have noted these on Bug 728002 and they will be fixed as part of that work. There's a number of smaller issues/polish that could still be addressed however, these are listed below. I'll look into fixing them maybe as part of the bug above, or else will open new bugs for them. If you find any to be particularly important, or find any related issues not reported here or in Bug 728002, please feel free to comment on them here. Also feel free to attach patches with fixes. :) * Conversations: - Move/Label should not be enabled in search folder - Use animated OSD popup for link-rollover instead of tooltips - Flag manual-unread as well as manual-read - Make auto-mark-read not touch manually-marked-unread messages - Make auto-mark-read less keen * Design: - Bring back the conversation accordion — maybe? - Add revealer/scrollbar/etc when there's lots of recipients - Improve the attachments box - Show subject better somehow — Use headers in Conversation ListBox? - Indicate how close to being auto-marked-read a message is? - Infobars too wide for narrow screens w/o ellipsiing, provide tooltips? * Search/Find - Highlight search terms that include operators, e.g. "from:foo" - Empty search placholder appearing when there were search results, but then the search changed and so less were found
This has been pushed to master as 898fa33. If you encounter any issues that aren't listed above, or in Bug 728002, please mention them here.
Some emails cannot be unfolded from conversation, they appear as a 1px wide blank line instead. In terminal output, getting a lot of related warnings: > (geary:23078): Gtk-WARNING **: ConversationWebView 0x2bab280: widget tried to gtk_widget_get_height inside GtkWidget ::get_height implementation. Should just invoke GTK_WIDGET_GET_CLASS(widget)->get_height directly rather than using gtk_widget_get_height Using gtk 3.21.6 and current master 898fa33.
(In reply to Gautier Pelloux-Prayer from comment #4) > Some emails cannot be unfolded from conversation, they appear as a 1px wide > blank line instead. In terminal output, getting a lot of related warnings: > > > (geary:23078): Gtk-WARNING **: ConversationWebView 0x2bab280: widget tried to gtk_widget_get_height inside GtkWidget ::get_height implementation. Should just invoke GTK_WIDGET_GET_CLASS(widget)->get_height directly rather than using gtk_widget_get_height > > Using gtk 3.21.6 and current master 898fa33. I've pushed a patch to master that may fix this issue: 06d799e - Gautier can you try that out and let me know if it does? If not, getting a stack trace at the point of the warning would be useful. The following command will cause a segfault when any Gtk-WARNING is issued. When the one above occurs again gdb will catch it and you can just get a backtrace as normal. > G_DEBUG=fatal-warnings gdb -path/to/geary -d
Created attachment 337250 [details] backtrace after gtk warning Unfortunately the issue is still there. Please find the stacktrace attached.
I noticed that sometimes, when a conversation has several messages and some of them are unread, if I select the conversation it jumps to _the end_ of the first unread message. So I have to scroll up a bit to read the new message from the beginning. It happened 3 or 4 times since master switched to GTK+.
I noticed that sometimes, if the attachments are at the bottom of the window, the tooltip pops up on the bottom (instead of on top of the attachment), so you cannot read it. See attached screenshot
Created attachment 338089 [details] attachment tooltip not readable
Hey Federico, (In reply to Federico Bruni from comment #7) > I noticed that sometimes, when a conversation has several messages and some > of them are unread, if I select the conversation it jumps to _the end_ of > the first unread message. So I have to scroll up a bit to read the new > message from the beginning. > > It happened 3 or 4 times since master switched to GTK+. Thanks for pointing that out - I've pushed commit 3b33f58 which should fix it, let me know if you see it happening again. (In reply to Federico Bruni from comment #8) > I noticed that sometimes, if the attachments are at the bottom of the > window, the tooltip pops up on the bottom (instead of on top of the > attachment), so you cannot read it. I can't reproduce this using current Geary master and GTK+ 3.22. What part of the button is your mouse hovering over at the time? In any case this is probably a GTK+ issue since Geary is using the standard tooltip implementation for those buttons.
Hey Gautier, (In reply to Gautier Pelloux-Prayer from comment #6) > Created attachment 337250 [details] > backtrace after gtk warning > > Unfortunately the issue is still there. Please find the stacktrace attached. Thanks for the stack. I'm now on 3.22 and I still aren't getting those warnings however, and I don't know how I can solve it without re-introducing "How does the code know the size to allocate?" warnings that were introduced in GTK 3.20. I think I know what the 1px message body bug is however - do these message bodies suddenly appear if you resize the window?
Save All Attachments button not working fixed in commit da9f0ad, just pushed to master.
(In reply to Michael Gratton from comment #10) > (In reply to Federico Bruni from comment #8) > > I noticed that sometimes, if the attachments are at the bottom of the > > window, the tooltip pops up on the bottom (instead of on top of the > > attachment), so you cannot read it. > > I can't reproduce this using current Geary master and GTK+ 3.22. What part > of the button is your mouse hovering over at the time? In any case this is > probably a GTK+ issue since Geary is using the standard tooltip > implementation for those buttons. It happens when I hover over either "Open selected item" or "Save selected item". In order to trigger the error, I must scroll the message all the way down until I see the bottom grey margin below open and save icons.
Another bug I've just found (I'm not sure if it's related with this issue): the attachment icon in conversation list is not present anymore. It was useful when scanning the conversation list to find quickly a message with attachment (as we don't have yet an 'has:attachment' search operator).
Closing this as fixed. I'll open new bugs for the issues mentioned above and make them depend on this one, please do the same if you find any other outstanding issues or regressions from this.