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 🚨
Support manual validation where needed, add unit tests.
This also slightly changes the behaviour of non-required field, since
an empty non-required field should be valid.
Add new Geary.Iterable::to_sorted_list method that should be more
performant than adding elements to a sorted set and sorting one-by-one,
use that instead of a TreeSet.
We're getting crashes (#398, #609) in Gee.TreeSet for the LRU cache when
removing values to update the last used time for an existing cache.
Since Gee isn't currently being activaly maintained, replace use of
that class with something else.
Remove functions that have as-convenient methods in up-tp-date Gee,
rename ::get_first to ::first so it reads better and add API docs,
replace ::to_array_list with ::copy, since that's what's actually
needed.
Undoable operations like trashing or marking messages need to take a
copy of the conversation lists's selection so that as the selection
changes over time, the op's underlying collection doesn't also change.
Don't try to open windows from the constructor since MainWindow needs
access to the controller via the applictaion, but the application can't
set the controller instance until is is constructed.
Now that its singleton is gone, and since it's ::open_asyc and
::close_async methods don't do anything async, just merge the former
with the class's ctor and make the latter non-async.
Explicitly construct an instance in Application.Client and ensure it
is closed there as well instead of in the controller, for consistency.
Now that Geary.Engine has a more convenient API, remove
Application.Controller::get_first_account and ::get_num_accounts in
favour of those.
Provide common Application.MainWwindow methods for getting and selecting
the first accoutn's inbox, call those to reduce code duplication.
Keep a single ordered list of accounts around, construct accounts
when their config is first added, and prefer accessing accounts by
config rather than id.
It's not actually needed under the new application regime for anything
other than UpgradeDialog, so rework that to not require it and remove
the method and supporting code.
Don't select the inbox of the first account by default in MainWindow,
and provide a means of inhibiting conversation autoselect when changing
folder. This allows selecting a conversation in a different folder and
opening new folders with a specific conversation selected without
jumping to the first conversation first when the autoselect pref is
enabled.
Update pages to be consistent with how the app currently works. Mention
undo for both archiving and sending/saving/dicarding composers. Update
compser page to mention features added over the last few releases.
Update the main window title with the folder/account name or in-window
composer subject even when using CSD since this helps differenciate
between multiple windows when open.
Always take out a hold on the application and construct a controller
in ::startup, so that it does not immediately exit when running as a
background service now that no main windows will be constructed by
default.
Manually exit the application when there are no windows remaining
instead of releasing the hold so that it has a chance to cleanly close
the controller.
Initialise logging as early as possible to capture as many logging
messages as possible. Don't log to stderr by default on startup to
avoid printing unwanted messages, rather output any captured but not
printed messages when enabling debug output for the first time.
Ensure MainWindow always clears the currently selected folder and
hence conversation monitor when being closed. Clean up Controller
shutdown so it ignores account changes early, closes main windows in
parallel, and releases UI resources early.
Add Application.Client::last_active_main_window, ::get_main_windows and
::get_active_main_window members to allow the controller easy access to
MainWindow instances. Remove the Application.Controller::main_window
property in favour of using these, generalise it to work with with
arbirary numbers of open main windows.
Clean up methods for opening an account, emit the signals when accounts
have been opened/before being closed. Use these signals in MainWindow to
manage its own internal state rather than relying on the controller.
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.