Fixes Bug 779102, Bug 768121.
* src/client/application/secret-mediator.vala: Rework to use custom Geary
libsecret schema, using new app id as schema name. Use protocol, login
and hostname as key instead of just account id to avoid flatpak
installs with different account ids clobbering normal install's saved
passwords. Drop 0.1 migrations since that's pretty old now.
* src/engine/api/geary-service.vala (Service): Add ::name method to
return useful machine-readable version of the protocol.
Fixes bug introduced by commit 07966a1.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer::load_conversation): Remove old conversation before
loading the new one, so the list box picks up the new scrolled window's
hadjustment rather than the old one.
Don't rely ComposerState::state notify and property bindings firing when
the value hasn't actually changed to update the composer's UI. This is
works around Vala Bug 631267 landing.
* src/client/composer/composer-headerbar.vala (ComposerHeaderbar): Add
signal and methods to be called explicity on state changes, rather than
relying on being notified of ComposerWidget::state changing.
* src/client/composer/composer-widget.vala (ComposerWidget): Hook up new
ComposerHeaderbar signal and method. Remove notify and property
bindings on ::state property, move related code to new
::update_composer_view method and call that as needed. Remove
overridden ::show_all, because the UI state should now always be
consistent with ::state. Clean up various methods.
* src/client/composer/email-entry.vala (EmailEntry::EmailEntry): Make
widget visible by default, since we are no longer calling
ComposerWidget::show_all().
* src/client/application/geary-controller.vala: Don't call show all on
new composers, they now manage their visibility properly.
* ui/composer-headerbar.ui: Make toolbar icons visible by default.
* ui/composer-widget.ui: Make toolbar icons visible by default, set Send
button icon here rather than in the class.
This is a workaround for GTK+ Bug 778190.
* src/client/conversation-viewer/conversation-viewer.vala
(ConversationViewer): Replace the whole conversation scrolled window
when changing the conversation, not just the viewport.
* ui/conversation-viewer.ui: Remove the ScrolledWindow for now since we
are constructing it manually.
* src/CMakeLists.txt: Define a macro when Gtk+ 3.22 is available.
* src/client/application/geary-application.vala (GearyApplication): Add
show_uri method that uses the app's currently active window/screen to
show the URI on, add a compile-time test to use Gtk.show_uri or
Gtk.show_uri_on_window as appropriate, make the API nicer to use by
not having two different error reporting methods. Rework existing uses
of Gtk.show_uri to use this method.
* src/client/application/geary-controller.vala (GearyController): Replace
use of last_save_directory with new attachments_dir property on the
configuration object.
* src/client/dialogs/attachment-dialog.vala (AttachmentDialog): Replace
current_folder with use of last_save_directory with new attachments_dir
property on the configuration object. Add config object as ctor param
and object field, update call sites.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail): Save config object as a class field, use that to
get and set the print directory when printing. Also set the default
print filename based on the email's subject.
* src/client/conversation-viewer/conversation-email.vala
(ConversationEmail::print): WebKit.PrintOperation.run_dialog will cause
the print job to be executed if the user selects OK, so no need to
manually do it ourself.