Michael Gratton
f9cf70cc0e
Fix MainWindow shift button detection
...
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.
2019-11-07 11:58:55 +11:00
Michael Gratton
ce86e3aa50
Move policy decision for folders supporting trash to controller
...
This allows classes other than the main window to make the determination
for other folders.
2019-11-07 11:58:55 +11:00
Michael Gratton
5312241d44
Remove ConversationEmail::load_error
...
The class can just handle submitting problem reports directly rather
than handballing to MainWindow to do so.
2019-11-07 11:58:55 +11:00
Michael Gratton
01fc1abd55
Move View Source implementation to ConversationEmail
...
The only place it is used is in ConversationEmail, so move it there from
MainWindow and remove the signal.
2019-11-07 11:58:55 +11:00
Michael Gratton
7be9115ebc
Rename client GtkUtil package to conform to style: Util.Gtk
2019-11-07 11:58:55 +11:00
Michael Gratton
de6ef699de
Clean up attachment save code
...
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.
2019-11-07 11:58:55 +11:00
Michael Gratton
bcce3a3a83
Make GearyApplication::show_uri handle mailto: URIs
...
This lets us simplify several code paths where these were handled,
and remove a signal and handler from ConversationMessage.
2019-11-07 11:58:55 +11:00
Michael Gratton
50749d9823
Trivial translation comment cleanup
2019-11-07 11:58:55 +11:00
Michael Gratton
b4d3c60a61
Merge Controller.move_conversations and move_messages impls
...
Use the same implementation for moving conversations and messages so
that marking messages is notified in the same way as marking
conversations. Athough in the case of the latter, only a subset of the
messages in a conversation may get marked, it makes the UI notification
UI present more consistently.
2019-11-07 11:58:55 +11:00
Michael Gratton
a282dc546e
Use Geary.FolderSupport.Archive when moving to archive special
...
This is needed for services like e.g. Gmail where Archive isn't
actually a folder, rather it's a lack of other labels.
2019-11-07 11:58:55 +11:00
Michael Gratton
84fd4eb50f
Trim controller command stack when exogenous events occur
...
If some event like another email client causes folders or email to be
removed, the controller's command stack needs to be trimmed to remove
any commands that refer to these.
Introduce a custom CommandStack subclass that can update the stack and
use that as the account's stack, call it as needed when folders become
unavailable or email is permanently deleted.
2019-11-07 11:58:55 +11:00
Michael Gratton
a8849c9925
Update Application.CommandSequence
...
Make its list of commands private, implement firing state signals for
commands in its sequence.
2019-11-07 11:58:55 +11:00
Michael Gratton
5f3a162e2e
Add status signals to Application.Command
...
Add executed, undone and redone signals to commands so that the code
that executed them can be informed of their individial statuses.
2019-11-05 11:35:31 +11:00
Michael Gratton
2acd7d659a
Allow CommandStack subclasses to access the undo stack
...
The controller requires access so it can remove commands made
in-operable by external state changes, e.g. a folder being removed.
2019-11-05 11:35:31 +11:00
Michael Gratton
227b68e082
Make Application.Controller commands per-account
...
Give each account its own command stack, and use that when executing
commands for an account, since people are unlikely to select a different
account and expect commands for the previous account to work.
2019-11-05 11:35:31 +11:00
Michael Gratton
12e73b3d72
Remove Application.Controller::current_account
...
Property is per-window state and hence should not be present in the
app controller.
2019-11-05 11:35:31 +11:00
Michael Gratton
954f7fc315
Rename MainWindow::current_account and ::current_folder props
...
Rename to ::selected_account and ::selected_folder to better describe
what they mean.
2019-11-05 11:35:31 +11:00
Michael Gratton
ebc14c458a
Don't initially notify on mark email commands
...
These already have visual feedback and are easily-undoable.
2019-11-05 11:35:31 +11:00
Michael Gratton
fe67993c8e
Clean up MainWindow action definitions
...
Rename action consts and values to better reflect what they do.
2019-11-05 11:35:31 +11:00
Michael Gratton
19b1382345
Minor code style and doc comment update
2019-11-05 11:35:31 +11:00
Michael Gratton
0871039069
Implement emptying spam/trash as non-undoable commands
2019-11-05 11:35:31 +11:00
Michael Gratton
df780d72a1
Implement deleting conversations as non-undoable commands
2019-11-05 11:35:31 +11:00
Michael Gratton
3c06ddf0ba
Implement copying conversations as a command
...
Not yet undoable, since the engine doens't support it. :(
2019-11-05 11:35:31 +11:00
Michael Gratton
0132981bdd
Implement moving conversations as undoable commands
2019-11-05 11:35:31 +11:00
Michael Gratton
d8a864019d
Implement conversation flag updating as undoable commands
...
This lets us undo marking as read/unread/starred/etc.
2019-11-05 11:35:31 +11:00
Michael Gratton
17ddb45150
Allow Command instances to denote whether they support undoing
...
Update CommanddStack to discard commands and the undo stack after
executing a command that is not undoable.
2019-11-05 11:35:31 +11:00
Michael Gratton
24c12a2add
Move conversation selection and action updates to main window
...
Move the remaining main window action code from Application.Controller
to MainWindow.
2019-11-05 11:35:31 +11:00
Michael Gratton
95b819fe94
Application.Controller: Make context class publically accessible
...
Promote AccountContext inner class to be public, document its members
and provide accessor so other classes can look them up.
2019-11-05 11:35:31 +11:00
Michael Gratton
27d3fb62dc
ConversationList: Minor selection-related perf tweak
...
Return a RO view of the existing selection object from
ConversationListView::get_selected_conversations.
2019-11-05 11:35:31 +11:00
Michael Gratton
66668a7575
Move per-message action handlers from Controller to MainWindow
2019-11-05 11:35:31 +11:00
Michael Gratton
d1d8bed53b
Implement main toolbar composer actions
2019-11-05 11:35:31 +11:00
Michael Gratton
88eb8f5040
Implement an application-level command stack
...
This will provide the basis for handling undo/redo in the main window.
2019-11-05 11:35:31 +11:00
Michael Gratton
8e9f00295e
Move GAction related code from app Controller to MainWindow
...
This moves a large nummber of the main window's concerns to the main
window, decouping a large number of dependencies from the controller to
the main window, and enables managing action and UI state per-window.
2019-11-05 11:35:31 +11:00
Michael Gratton
09f6fc094a
Improve Geary.Account API for listing folders
...
Make both Account.list_folders and Account.get_special_folder not throw
any errors - either the folders exist, or they don't. Update call sites.
2019-11-05 11:35:31 +11:00
Michael Gratton
35007aa006
Merge branch 'mjog/fix-composer-undhandled-error-build-warning' into 'mainline'
...
Fix unhandled error build warning
See merge request GNOME/geary!358
2019-11-05 00:33:04 +00:00
Michael Gratton
09b8c8e5b9
Fix unhandled error build waning
2019-11-05 10:59:51 +11:00
Michael Gratton
a6773cebb8
Merge branch 'mjog/fix-null-message-ids' into 'mainline'
...
Fix issues with null message ids
See merge request GNOME/geary!357
2019-11-01 05:24:50 +00:00
Michael Gratton
47927aaff4
Make serialisation of Geary.Email.Field more usable
2019-11-01 15:48:19 +11:00
Michael Gratton
39b5f7922b
Fix headers not being parsed due to case differences
...
Commit 8cd310be broke case-insensitive header parsing since it went
from using GMime's header class to using a Gee.Map for header response
lookup. This patch makes the map use case-insensitive keys.
2019-11-01 15:43:22 +11:00
Michael Gratton
e18c8fae93
ComposerWidget: Don't add invalid Message-ID to In-Reply-To
...
Although Message-ID is usually present, it may not be. If not, the
composer should not be added a null id to the In-Reply-To field.
2019-11-01 15:39:35 +11:00
Michael Gratton
35cfacd18e
Ensure ComposerWidget checks referred email for required fields
...
This is a safety check to catch programming errors, mostly.
2019-11-01 15:38:45 +11:00
Michael Gratton
96b62318d1
Merge branch 'mjog/fix-contact-store-crash' into 'mainline'
...
Fix crash when updating contacts with null names
See merge request GNOME/geary!356
2019-10-30 12:15:06 +00:00
Michael Gratton
faafc521b4
Merge branch 'urlRegex' into 'mainline'
...
Remove unused variable urlRegex from ComposerPageState.containsKeywords
See merge request GNOME/geary!352
2019-10-30 11:47:14 +00:00
Michael Gratton
96ff4d290e
Fix crash when updating contacts with null names
2019-10-30 22:44:51 +11:00
Michael Gratton
08ea87ce50
Merge branch 'mjog/fix-email-id-from-variant' into 'mainline'
...
Fix GenericAccount::to_email_identifier not actually working
See merge request GNOME/geary!354
2019-10-30 03:46:41 +00:00
Michael Gratton
94e0736cfd
Update Geary.Outbox.EmailIdentifier variant type marker
...
Use 'o' instead of 's' to avoid confusion with search ids. Add test.
2019-10-30 14:17:44 +11:00
Michael Gratton
bf4f5c4780
Fix GenericAccount::to_email_identifier not actually working
...
The GVariant type "*" only matches a single data type, not many, and
the sense of the test to check serialised ids was wrong anyway. As a
reuslt, this method probably never worked. Add a unit test.
2019-10-30 14:12:52 +11:00
Alex Henrie
20284fe29c
Remove unused variable urlRegex from ComposerPageState.containsKeywords
2019-10-26 03:02:41 -06:00
Michael Gratton
543c753186
Merge branch 'mjog/608-gtk-style-context-log-spam' into 'mainline'
...
Fix ConversationList GtkStyleContext log spam
Closes #608
See merge request GNOME/geary!350
2019-10-26 06:47:03 +00:00
Michael Gratton
876c107628
Fix ConversationList GtkStyleContext log spam
...
Fixes #608
2019-10-26 17:16:53 +11:00