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.
Part of https://gitlab.gnome.org/GNOME/Initiatives/issues/1;
Sets up dual installation for flatpaks, allowing us to
build and run geary without affecting our system install.
This will allow testing of nightlies and CI artifacts as well
via the flatpak, so we can iterate on designs and share
bundles to test with.
This fixes search/star and archive/select all conflicting, cleans up
mark read/unread conform to the HIG, and updates the help overlay and
fix some problems with it.
Return the scroll height of the HTML element since the BODY
may have margin/border/padding and we want to know
precisely how high the widget needs to be to avoid
scrolling.
Only send an updated height change when the width has changed on
receiving a JavaScript resize event to avoid getting into a feedback
loop, as was happening with email from Mastodon instances.