Commit graph

5208 commits

Author SHA1 Message Date
Michael Gratton
43803239a4 Replace Geary.Account::send_email w/ Smtp.ClientService methods
Remove Geary.Account::send_email and the sending progress monitor in
favour of exposing Geary.Smtp.ClientService as a public class and so
allowing clients to acccess those symbols from Geary.Account::outgoing.

Also make ::send_email a convenience class for doing a save/queue and
expose those operations, so clients can managage the two seperately if
desired (e.g. for undoing sending).

Finally, make Outbox.Folder public since it's exposed by the SMTP
service and maybe clients want to do something more detailed with it
anyway?
2019-11-17 20:00:01 +11:00
Michael Gratton
cc4389f41d Make Geary.ComposedEmail implement Geary.EmailHeaderSet
This allows it to be used in exchange with the Geary.Email and
RFC822.Message classes in places.
2019-11-17 19:59:19 +11:00
Michael Gratton
9b4edf5726 Util.Email.to_short_recipient_display: Consider all of to/cc/bcc
Rather than just using an email's to field, also use cc and bcc when
generating the string.
2019-11-17 16:53:42 +11:00
Michael Gratton
455eb770fd Let Application.Command instances specify if they support redo
This adds simmilar support as already exists for undo.
2019-11-17 16:53:42 +11:00
Michael Gratton
e426517b30 Rename Config class and source file to match code style
Rename `Configuration` => `Application.Configuration` and
`geary-config.vala to `application-config.vala`. Update call sites and
test cases.
2019-11-17 16:53:42 +11:00
Michael James Gratton
8f2563bc09 iMerge branch 'wip/90-304-image-dnd-paste' into 'mainline'
Inline image drag and drop #90 and image paste from clipboard #304

See merge request GNOME/geary!343
2019-11-17 16:42:12 +11:00
Chris Heywood
c3f5cc1b88 Mark ourselves busy while pasting inline images 2019-11-17 16:40:13 +11:00
Chris Heywood
9378e65d17 Tidy up, remove comment 2019-11-17 16:40:13 +11:00
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
db28989829 Merge branch 'link_preview' into 'mainline'
Shorten long URLs in conversation viewer link preview tooltips

Closes #356

See merge request GNOME/geary!364
2019-11-17 00:52:20 +00:00
Mario Ravalli
7d2579f3ba Move function to short url from conversation-message to a more generic
util/email.
Changed name of function to "shorten_url"
2019-11-17 00:44:41 +01:00
Mario Ravalli
026cbe4e5b Link preview popup is way too big
When on a message there is a link address very long, the popup displayed
is oversize.
To fix this situation, the link over 90 chars are shortened taking the
first 40 chars and the last 40 chars, joined by a "..."

https://gitlab.gnome.org/GNOME/geary/issues/356
2019-11-14 09:29:06 +01:00
Mario Ravalli
b2f71792eb Link preview popup is way too big
When on a message there is a link address very long, the popup displayed
is oversize.
To fix this situation, the link over 90 chars are shortened taking the
first 40 chars and the last 40 chars, joined by a "..."

https://gitlab.gnome.org/GNOME/geary/issues/356
2019-11-14 00:12:55 +00:00
Michael Gratton
1a28cb7bfa Merge branch 'mjog/entry-undo-cleanup' into 'mainline'
Components.EntryUndo: Minor fixes

See merge request GNOME/geary!362
2019-11-12 22:51:16 +00:00
Michael Gratton
c73f853f3e Components.EntryUndo: Minor fixes
Ensure we clear the text accumulator on reset and fix a typo in a
debug message.
2019-11-13 09:29:32 +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