Commit graph

48 commits

Author SHA1 Message Date
Robert Schroll
787e92e731 Host new composers in ComposerBox, not in ComposerEmbed
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
2015-02-02 16:38:28 -05:00
Robert Schroll
09582736b8 Properly restore state of drafts
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
2015-01-16 16:39:19 -08:00
Robert Schroll
c36ff017e6 New scrolling system for inline composers
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
2014-08-31 23:33:57 -04:00
Robert Schroll
4cfd18b52e Set document font explicitly with CSS in conversation viewer: Bug 713746
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.
2014-06-03 20:56:27 -04:00
Robert Schroll
ef98b7d190 Use system fonts in webviews: Bug 713746
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.
2014-06-03 20:56:08 -04:00
Robert Schroll
98018c386e Allow multiple inline composers
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.
2014-05-20 16:30:21 -07:00
Robert Schroll
a1bf7070d5 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.

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.
2014-05-20 16:30:21 -07:00
Robert Schroll
9f829e76a7 Expand quote rollup button to width of quote: Refs bgo#724342
Removing the padding so the button is the same width of the quote
makes it look more like the entire quote block is rolling up/down
with the button.
2014-03-11 13:52:00 -07:00
Robert Schroll
641856983e Better styling of collapsed quotes: Refs bgo#724342
Removes the padding between the blockquote and the expander button.
Widens it closer to the width of the block.
2014-02-18 13:51:38 -08:00
Robert Schroll
bc71300f38 New behavior for hiding quoted text
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.
2014-02-13 16:30:14 -08:00
Robert Schroll
0ce9068307 Prevent positioned elems in HTML mail escaping body: Closes bgo#724270 2014-02-13 15:01:17 -08:00
Charles Lindsay
cce04b814f Add option to save sent mail
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
2014-01-29 18:18:31 -08:00
Robert Schroll
b2f20107df Scale inline images w/ regard to aspect ration: Closes bgno#713922
Required for images referenced by Content-ID.
2014-01-06 18:32:09 -08:00
Jim Nelson
9a8f96310c Save inline images displayed via MIME Content-ID: Closes #7475
Some reorganization of how data: URIs are assembled and injected
into the document.

Also, mild improvement to the GMime bindings.
2013-09-11 19:21:44 -07:00
Eric Gregory
de2941cf8d Fix for WebKitGTK 2.1 conversation viewer CSS issues. Closes #7291 2013-08-27 18:57:43 -07:00
Eric Gregory
7146ca475e Merge branch 'master' into feature/drafts 2013-08-13 14:39:07 -07:00
Eric Gregory
c8cbebc39c Merge branch 'master' into feature/drafts 2013-08-08 13:07:51 -07:00
Robert Schroll
262c25c360 Inline images style improvements: Closes #7305 2013-08-06 17:19:16 -07:00
Avi Levy
a5c0d75fdf Reverts change to background color for sent mail: Refs #6371 2013-08-02 17:51:43 -07:00
Eric Gregory
4e5349d13d Closes #6191 Edit drafts 2013-07-19 15:44:20 -07:00
Eric Gregory
9068d6330b Closes #4644 Spinner fix 2013-07-11 12:50:19 -07:00
Avi Levy
15cd770310 Different background color for sent mail: Closes #6371 2013-06-26 14:38:34 -07:00
Robert Schroll
b77766c8d7 Malicious HTML link checker: Closes #6933
Pops up a small warning if the user clicks on a link that doesn't
match URL-looking text.
2013-05-28 18:28:33 -07:00
Robert Schroll
87f199c258 Expand quotes in .nohide search mode; fix #6914
Also hide the hider and shower widgets, since they don't need to do
anything in this state.
2013-05-07 16:11:30 -07:00
Eric Gregory
326af9339b Closes #6199 Ctrl-F text search in current conversation 2013-05-07 13:59:54 -07:00
Robert Schroll
2617f9949e Show emails attached to main message; fix #6450
Attachments to those emails are not found yet.
2013-04-24 18:46:29 -07:00
Robert Schroll
0a03877964 Add "Select Message" to context menu; fix #6840
Also deny selection by default, allowed where appropriate
2013-04-23 11:58:42 -07:00
Robert Schroll
cfdebec4a9 Use button class for new button 2013-04-22 19:13:48 -07:00
Robert Schroll
66dd62a23c Per-email enabling of remote images; fix #6649 2013-04-22 14:14:11 -07:00
Andreas Obergrusberger
0f25ca0363 Message drop-down menu occassionally doesn't display: Closes #5605 2013-04-18 14:00:02 -07:00
Robert Schroll
0966721059 Closes #5514 Don't allow collapsing single message 2013-04-15 16:56:28 -07:00
Robert Schroll
9b8f10304d Surround text emails with div, not pre; fix #6534 2013-03-15 18:19:08 -07:00
Robert Schroll
6db225668c Closes #6420 Removes extra margin 2013-02-25 12:09:03 -08:00
Robert Schroll
a34058b65c Clamp max num of messages compressed in conversation block: Closes #6373 2013-02-14 14:26:54 -08:00
Robert Schroll
c0d8791961 Compress collapsed emails: Closes #5137
More great work from Robert Schroll.
2013-02-12 17:49:43 -08:00
Robert Schroll
a2b92a3248 "No conversations selected" appears with unread message border and shadow: Closes #6276 2013-01-31 11:20:06 -08:00
Robert Schroll
ff5f9fa0c7 Style unread messages differently than read messages: Closes #6260
Adds a darker border and shadow to unread messages that animates to
the same intensity of read messages after 3 seconds.
2013-01-28 17:30:54 -08:00
Daniel Foré
e97eda8660 Update quoted text styling: Closes #5789
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.
2012-09-27 11:35:30 -07:00
Adam Dingle
43e57e38b8 Fixed #5791 (move gravatar to left). 2012-09-12 10:11:52 -07:00
Matthew Pirocchi
e553bb291a Optionally allow loading external images: Closes #5418. 2012-08-13 17:24:09 -07:00
Matthew Pirocchi
42f7d8bd41 Use same blockquote style for compose and message-viewer: Closes #5513. 2012-07-09 16:37:44 -07:00
Robert Schroll
f69dd28b5f Missed one line in patch for #5498. 2012-07-09 15:01:07 -07:00
Robert Schroll
ace7494c67 Simplify message view CSS so uncollapsed message same state: Closes #5498 2012-07-05 11:41:28 -07:00
Robert Schroll
2821930ba9 Correct CSS for cursor in uncollapsed email headers: Closes #5486
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).
2012-07-02 11:47:23 -07:00
Robert Schroll
54271431bc Allow horizontal scrolling for email: Closes #5481 2012-06-29 14:24:20 -07:00
Robert Schroll
591b7c7ac5 Make shower/hider links sans-serif: Closes #5421 2012-06-25 14:27:13 -07:00
Robert Schroll
146965fc3f Improvements to message headers in conversation viewer: Closes #5422 2012-06-22 16:53:05 -07:00
Matthew Pirocchi
226d50bff6 Load message-viewer HTML and CSS dynamically: Closes #5319. 2012-06-13 14:23:36 -07:00