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
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.
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.
* src/client/composer/composer-widget.vala
(ComposerWidget::action_entries): Add an entry for the inspector so it
can be loaded via the context model in the same way as other items.
(ComposerWidget::context_menu_*): Keep track of a number of the context
menu's sections, so we can selectively include them in the WK context
menu.
(ComposerWidget::on_context_menu): Re-implement to work wth the WK2
context menu model, which annoyingly doesn't even extend any of the
GtkMenu infrastrcuture.
* src/client/util/util-gtk.vala (menu_foreach): Pass the action
target through to the loop's delegate, it's a bit more useful for
dealing with the WK2 model.
(add_g_menu_to_gtk_menu): Removed, WebKitContextMenu doesn't extend
Gtk.Menu any longer so this is is no longer needed.
* ui/composer-menus.ui: Reoganise to use standard composer action
prefix. Duplicate rich and plain text clipboard sections so they can
just be selectively enabled. Include dummy sections for WK items to
specify where they are located in the menu, and a section for the
inspector.
Now using these instead of the old composer's actions. This led to quite
some changes:
* Use GLib.ActionEntry instead of Gtk.ActionEntry in
composer-widget.vala
* Action names can now be specified in the UI files.
* Use templates for the ComposerHeaderBar. Remove
Pillbar as superclass, since that was no longer necessary.
* Merge ComposerToolbar into ComposerWidget.
* Since actions can now be parameterized, some methods could be
merged (e.g. font size methods).
* The menu button in the composer now automatically uses a popover.
* Some methods and classes really deserved more comments.
* necessary POTFILES.in changes
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>