Commit graph

5194 commits

Author SHA1 Message Date
Chris Heywood
979e8b42ac Added a few tests for RFC822.Message
- Inline attachments in from_composed_email
- get_recipients
- get_searchable_body
- get_searchable_recipients
- get_network_buffer
2019-11-17 16:40:13 +11:00
Chris Heywood
eaa98883a7 Tests for ComposedEmail.contains_inline_img_src and replace_inline_img_src 2019-11-17 16:40:13 +11:00
Chris Heywood
fa430cac5d Improve passing of inline dropped file through to vala !343 2019-11-17 16:40:13 +11:00
Chris Heywood
34664c4178 Don't repeat the string search when replacing an inline image source !343 2019-11-17 16:40:13 +11:00
Chris Heywood
595ad1d87c Cleanup inefficient GMime stream creation for attachment !343 2019-11-17 16:40:13 +11:00
Chris Heywood
f8fa4a4630 First changes for supporting drag & dropped and pasted images
See #90 and #304. Work in progress.
2019-11-17 16:40:13 +11:00
Michael Gratton
63f626e050 Merge branch 'mjog/233-entry-undo' into 'mainline'
Application-wide GtkEntry undo support

Closes #233

See merge request GNOME/geary!360
2019-11-12 21:42:10 +00:00
Daniel Mustieles
1f31861960 Update Spanish translation 2019-11-11 11:36:21 +00:00
Piotr Drąg
fcb3939944 Update Polish translation 2019-11-10 13:00:11 +01:00
Emin Tufan Çetin
0d4facb49a Update Turkish translation 2019-11-10 08:08:09 +00:00
Emin Tufan Çetin
e02fe1e621 Update Turkish translation 2019-11-10 07:58:51 +00:00
Michael Gratton
2e651d38d0 Update appdata with the new feature 2019-11-08 10:06:48 +11:00
Michael Gratton
8833b6d242 Update MainWindow undo/redo actions before in-app notifications
This prevents the in-app notifications button needing to have it state
updated after the actions are updated.
2019-11-08 10:06:48 +11:00
Michael Gratton
95fdaa70ca Add undo support for MainWindow search and find entries 2019-11-08 10:06:48 +11:00
Michael Gratton
a5d72891eb Rework action names groups across the client
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.
2019-11-08 10:06:48 +11:00
Michael Gratton
dae817b037 Add undo support for account editor text entries
Add an EntryUndo instance to all editor rows that use Gtk.Entry values.
2019-11-07 13:01:16 +11:00
Michael Gratton
8000e7ca63 Implement undo support for the composer's text entries
Add EntryUndo objects for each of the To, CC, BCC, Reply-To and subject
entries. Fix EmailEntry to ensure that keyboard shortcuts get processed
when the completion is present. Fix ContactEntryCompleteion to ensure
it does a precision edit when inserting an adresss (i.e. delete+insert
rather than complete replacement) so that it integrates into undo.

Fixes #233
2019-11-07 13:01:16 +11:00
Michael Gratton
ce1630e09d Add Components.EntryUndo class to manage undo for GTK Entries 2019-11-07 13:01:16 +11:00
Michael Gratton
a39601f75e Merge branch 'mjog/account-command-stacks' into 'mainline'
Account command stacks

Closes #578, #534, #488, and #107

See merge request GNOME/geary!359
2019-11-07 01:40:11 +00:00
Michael Gratton
353955f234 Update appstream to mention improved undo support 2019-11-07 11:58:56 +11:00
Michael Gratton
e564ab4a03 ConversationListView: Remove some unused code 2019-11-07 11:58:56 +11:00
Michael Gratton
2d47e4802b Re-select folder, conversation and email on EmailCommand undo
When an EmailCommand is undone, select the folder, conversation and if
relevant scroll to the email in question so as to provide better
context.

This isn't 100% bulletproof, but is about 80% of the way there. The
remainer requires some major Engine rework to decouple local and remote
actions.
2019-11-07 11:58:56 +11:00
Michael Gratton
c002285fef Geary.App.ConversationMonitor: Fix re-entrancy issues
Avoid some issues if a monitor is closed as it is still being opened,
clean up the API and implementation a bit.
2019-11-07 11:58:56 +11:00
Michael Gratton
800e53bc50 Improve application shutdown process
Ensure accounts being removed are de-selected and the cursor moved off
of their folders in the folder list so that as they are removed, their
folders are not selected in quick succession. Don't redudantly close
inboxes in Application.Controller::close_async, and merge the two parts
to the handling of account closing.
2019-11-07 11:58:56 +11:00
Michael Gratton
4adacb42be Move MainWindow folder management impl to MainWindow 2019-11-07 11:58:55 +11:00
Michael Gratton
ac0c015210 Application.Controller: Add convenience method 2019-11-07 11:58:55 +11:00
Michael Gratton
09fde274d3 Require MainWindow::select_folder to declare mode of interaction
By determining if selecting a folder is interactive or not, the
MainWindow can avoid enabling auto-marking of unread email.
2019-11-07 11:58:55 +11:00
Michael Gratton
3fb943cd6a Move folder selection and related handling to MainWindow
Move more main-window specific code out of Application.Controller,
allowing consolidation of all folder selection code in the one place
and allowing it to be revamped so as to support robust programmatic
selection of folders.
2019-11-07 11:58:55 +11:00
Michael Gratton
c601be4701 Prevent the same application action re-executed multiple times
Before Application.Controller executes an action, ensure it's not the
same action as was execued just before. This stops e.g. issues if
someone holds down Delete.

Fixes #578
2019-11-07 11:58:55 +11:00
Michael Gratton
358d864e35 Add location and conversation context properties to EmailCommand
Add context properties to EmailCommand so that MainWindow can (once
supported) re-select folder and modified conversations when undoing a
command.

Convert it into a full-blown abstract class so that subclasses don't all
need to re-implement it, and provide a default implementation of the
folder and email removal methods. Update command methods on
Application.Controller to get the required context objects.
2019-11-07 11:58:55 +11:00
Michael Gratton
acc243c472 Fix some bad container impl assumptions in MinimalFolder 2019-11-07 11:58:55 +11:00
Michael Gratton
5cc92ef964 Move email action handling to ConversationListBox
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.
2019-11-07 11:58:55 +11:00
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