This allows us to avoid messing with the state of the conversation
viewer when we're composing a new message. Instead, we hide it
completely and show only the ComposerBox.
The styling of paned composer is changed to resemble that of the inline
composers. Because of restrictions on what styles are available for
various widgets, the ComposerBox becomes a Gtk.Frame, and its border
simulates the margin while some padding and an inset shadow simulate the
border. I haven't figured out how to do an outset box-shadow.
https://bugzilla.gnome.org/show_bug.cgi?id=743670
We do this heuristically, by noting which messages it is in reply to and
seeing if it matches the unmodified reply or reply all states. This
isn't perfect; notably forwarded messages are picked up.
We hide the existing draft in the conversation viewer as soon as we open
the composer. We also ensure that future versions of this draft will
also be hidden. The list of emails to be hidden is cleared when the
conversation viewer is, so we query all open composers at this point to
see which email ids should be hidden.
https://bugzilla.gnome.org/show_bug.cgi?id=743067
The editor in the composer no longer shows its own scrollbar. Instead,
the conversation view allocates enough space to hold the composer
without any scrolling. The composer then positions and scrolls itself
to create the illusion that the outer scroll bar controls it.
To track the size of the composer, we put all the text in a div and mark
that as contenteditable. Then, when the div changes height, we update
the layout. We use the user_changed_contents signal as a proxy for
this.
https://bugzilla.gnome.org/show_bug.cgi?id=730955
This avoids the previously-mentioned bug in "font-family: initial".
Note that if you set the font size to 11pt in CSS, for example, you get
15px. But if you set it to 11pt with the WebSettings and then set that
size with font-size: medium, you get 14 px.
Set the WebSettings default and monospace fonts from the system
settings. Also, use "font: caption" to get the UI font for UI elements
in the webview. The former need to be updated each time they change.
The latter is automatically updated, though that only works
sporadically.
Unfortunately, this leaves messages in the conversation view in the UI
font, not the document font, because webkit treats "font-family:
initial" like "font-family: inherit" for some reason.
Replying to a message that already has a composer open will result in
that composer refocusing. It should also adjust the Reply/Reply
All/Forward status, but that's still to come.
When switching away from a conversation with inline composers, the only
option is to cancel the operation or discard all compositions. This
will be fixed by adding automatic saving of drafts in this case.
In anticipation of inline composition, we need the composer widget to be
separate from the window in which it lives. We introduce a new
interface, ComposerContainer, that the thing that holds to
ComposerWidget must implement.
Separate composer widget from composer window
In anticipation of inline composition, we need the composer widget to be
separate from the window in which it lives. We introduce a new
interface, ComposerContainer, that the thing that holds to
ComposerWidget must implement.
Basic inline composition
Many of the details don't work, or don't work well, but the basics are
in place.
Allow only a single inline composition at a time
With this, we introduce a dialog when you would try to add another. We
also use this when changing the selected conversation with a composer
open.
Compose new messages inline, with no conversation selected
Hook up composer accelerators only when focus is in composer editor
It would be nice to only activate these accelerators when the composer
has focus generally, but that doesn't seem to be easy to detect.
Only disconnect accelerators if they're connected
Maintain focus when composer is popped out
The selection isn't, though.
Fix Tab focus for embedded composer
There are two things that needed to be fixed: The tab key doesn't
usually advance focus for embedded widgets (huh?), so we handle tab
presses by hand for ComposerWidgets. Also, the EmailEntrys do their own
tab handling, which needs to know about the composer widget, not the
toplevel widget in the embedded case.
Remove close() from ComposerContainer interface
I don't think it was actually doing anything, and it conflicts with the new close() method of Gtk.Window.
In their hidden state, quotes will be limited in length, with a link to
extend them. Only long quotes will be hidden; short ones will be
displayed in their entirety. Note that the threshold for hiding a quote
is larger than the size of the hidden quote. This ensures that there
will always be a noticable expansion of a quote when it is shown. (This
also accounts for the fact that the height we measure includes padding.)
We can only measure the size of a quote once it is actually shown as
part of the document. Notably, we can't figure out the sizes of quotes
in hidden emails. Therefore, we also decide which quotes in an email
need to be hidden when the email is unhidden. However, showing and then
hiding quotes can lead to content flashing, so we start all quotes off
in the hidden state, and remove this if they turn out to be short
enough.
This adds the ability for Geary to push sent mail up to the account's
Sent Mail folder (if available). There's an accompanying account option
that defaults to on (meaning: push sent mail).
The current implementation will leave messages in the Outbox (though
they won't be sent again) if they fail to be pushed to Sent Mail. This
isn't the best solution, but it at least means you have a way of seeing
the problem and hopefully copying the data elsewhere manually if you
need to save it.
Note that Geary might not always recognize an account's Sent Mail
folder. This is the case for any "Other" accounts that don't support
the "special use" or "xlist" IMAP extensions. In this case, Geary will
either throw an error and leave messages in the Outbox, or erase the
message from the Outbox when it's sent, depending on the value of the
account's save sent mail option. Better support for detecting the Sent
Mail folder in every case is coming soon.
Closes: bgo #713263
I've modified Daniel Foré's design slightly to make the background
gray of the quoted text slightly more pronounced. On some monitors
the original color was so difficult to distinguish it looked plain
white.
Now the mouse cursor will be normal when hovering over uncollapsed
email headers (unless it's over an email address, which launches
the composer if clicked).