- Move the attachment button(s) out of the headerbar into the action bar
- Add a cancel button
- Adjust some margins
- Set popover positions to top
- Remove subject from headerbar title to save horizontal space
This way, the composer fits on even smaller screens than before.
Works by simply listening to the size-allocate signal and changing the
orientation of a box if the allocated width is less than or equal to the
combined width of the two rows.
Splits the toolbar at the top of the composer into two action
bars at the bottom. One is always visible and contains undo, redo,
spellcheck, a menu, and a button to toggle the other action bar. The
other action bar contains the formatting buttons.
Also cleans up the margins around the fields at the top.
Implemented according to the mockups at
https://gitlab.gnome.org/Teams/Design/app-mockups/raw/master/mail/composer.png
Also add the .sidebar style class to the separator to make it still take
the whole height. This will help dropping styling workarounds and ensure
animating the headerbars work well.
In ccb11359, the composer headerbar was set to have a close button by
default. This caused the reply composer to have a close button that
would close the entire window. This commit reverts that part of
ccb11359.
Implemented according to the mockups at
<https://gitlab.gnome.org/Teams/Design/app-mockups/raw/master/mail/composer.png>.
- Use an animated revealer rather than instantly showing/hiding the
fields
- Include Cc in the "extended fields"
- Use a toggle button instead of a menu item to show/hide these fields,
for better discoverability
This reduces the number of widgets to be parsed and constructed when
showing a conversation, improving loading perf a bit for large
conversations.
See #230
Now that a shared WebKitUserContentManager is shared between web views,
the old "load a JS file when remote resource loading is allowed" doesn't
work any more. Instead, set a variable on the frame's window object
in the web extension notified that a new page has been loaded, and
use that instead.
Add new `single-key-shortcuts` GSetting, Application.Configuration
property and add UI for it in the Preferences window. When enabled,
load in new `single-key-shortcuts.css` file that has the appropriate
bindings. Update bindings to match Google's current set, and update
shortcut help to match.
Use keybinding ("action") signals and a GtkBindingSet to hook up most
of MainWindow's actions to keyboard shortcuts, rather than use
the application to do so. Remove single-key shortcuts, and update
shortcuts used to avoid collisions. Replace "focus conversation list"
action with general navigation between panes.
🚨 Remove MainWindow hack that enabled single key shortcuts to work 🚨
Move MainWindow out of the root namespace and add it to Application,
so it can privately share internal state with the Controller. Rename
the source and UI files to match.
Now we have undo support for sending, saving and discarding composers,
don't prompt when closing in-main-window composers in most cases.
It retains prompting for detached composers, since it may not be obvious
how to undo that (although it is supported), also when closing the main
window completely (for the same reason), and when quitting the app.
Rather than scattering the composer's detached/paned/inline mode all
over the code base, make it settable only by the containers it is
embedded in, since in that's what actually determines it.
This also lets composers be re-added to the main window if needed.
Make ComposerWidget::close method handle a lot more common code,
allowing many handlers to be simplified. Make access for some properties
more private and add accessors as appropriate, replace some "notify is
too hard" singnals with actual notify calls. Rename a few other
properties to better indicate what they do. Reintroduce `is-draft`
argument to ::load so we can accurately determine if we are loading a
draft, and so the `draft_id` param can be removed from the ctor.
Introduce a ::set_enabled method that can be used to disable and hide
the composer before closing it. Rename ::change_compose_type to
::append_to_email and reduce its scope drastically.
Drastically simplify ComposerContainer's API and its implementing
classes, reducing the API surface down to a single method call. Ensure
its properties that could be null are nullable, update call sites.
Remove dead code in all of the above classes, add more API docs.
By overriding ComposerPageState::getHtml to accept a parameter that
supports getting HTML with empty composer parts removed, cleanContent
can simply be made to linkify the page, thus allowing a ComposerWidget
to be re-used multiple times when sending an email.
Introduce a new standard edit action group "edt" for editing actions
such as copy and undo, separate from the "win" window action group, so
that editing actions can be scoped to specific widgets and overridden
by children. Add new Action namespace with sub-namespaces for the
app, win and edt namespaces and move consts from GearyApplication there.
Update call sites and UI files, use consistent approach to setting up
action groups across all classes that use them.
This allows a single widget to get constructed to handle email actions,
rather than every single ConversationEmail having to do so, and thus
related signals can also be moved to and emitted from
ConversationListBox, so that MainWindow only has to hook up to a single
object's signals for a conversation, not every email in the
conversation.
Ensure shift button is assumed to be up on both focus in and focus out,
so when e.g. invoking the inspector the button is assumed to be
released. Remove the signal in preference for using notifiy when needed,
and ensure main toolbar state is updated on focus changes as well.
Create new Application.AttachmentManager class and move code for saving
attachments there from both Application.Controller and MainWindow since
aside from needing the latter for dialogs it is independent of both.
Create new Components.AttachmentPane widget for diplaying attachents
for an email in the ConversationViewer.
Update ConversationEmail and ConversationMessage to use these two new
classes directly, rather than implementing save management itself or
requiring the MainWindow to wire up signals on these classes.
Update ComposerPageState.htmlToText() to allow ignoring certain elements
if needed. Update tests to test the function directly rather than going
through ComposerPageState.toText().
Allow deleting only the selected part of a link, and modify the existing
link instead of inserting a new one if the user didn't select any text.
Also restructure the code to avoid always-true or always-false if
statements.
Fixes#591
This no longer makes sense since we don't have control over it for
notifications any more, and hence was only being used for sent mail.
Replace it with a NotificationContext signal so that a plugin could be
written to play a sound instead.