Rename all composer classes prefixed with "Composer" so that the prefix
is a namespace instead. This increases the compartmentalisation of the
classes, making `internal` a useful member modifier and makes them
consistent with the code style guide.
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
find . -name '*.vala' -type f -exec sed -i 's/ *$//g' {} +
The following files was ignored:
test/client/composer/composer-web-view-test.vala
test/engine/util-html-test.vala
Fix#271
Turns out the client was in inexplicably using
MailboxAddresses.to_rfc822_string() in a bunch of places to display
emails to users, mostly in the composer. This fixes that.
Followup to b7eea857.
* src/engine/rfc822/rfc822-mailbox-addresses.vala (MailboxAddresses):
Make list param for default ctor nullable for your testing convenience,
add a test. Add to_full_display() method that the client should nearly
always be using to display a list to users, use that in all the places.
Remove empty param for list_to_string since all but one callers just
pass in the empty string, which also fixes some stupid regressions
introduced in commit 178ce351 that causes it actually break
to_rfc822_string, rather than fix it as claimed, update call sites.
Don't rely ComposerState::state notify and property bindings firing when
the value hasn't actually changed to update the composer's UI. This is
works around Vala Bug 631267 landing.
* src/client/composer/composer-headerbar.vala (ComposerHeaderbar): Add
signal and methods to be called explicity on state changes, rather than
relying on being notified of ComposerWidget::state changing.
* src/client/composer/composer-widget.vala (ComposerWidget): Hook up new
ComposerHeaderbar signal and method. Remove notify and property
bindings on ::state property, move related code to new
::update_composer_view method and call that as needed. Remove
overridden ::show_all, because the UI state should now always be
consistent with ::state. Clean up various methods.
* src/client/composer/email-entry.vala (EmailEntry::EmailEntry): Make
widget visible by default, since we are no longer calling
ComposerWidget::show_all().
* src/client/application/geary-controller.vala: Don't call show all on
new composers, they now manage their visibility properly.
* ui/composer-headerbar.ui: Make toolbar icons visible by default.
* ui/composer-widget.ui: Make toolbar icons visible by default, set Send
button icon here rather than in the class.
* src/client/composer/email-entry.vala (EmailEntry::on_changed): Now that
the completion is being lazily added, we need to check the completion
is null before using it.
Now using these instead of the old composer's actions. This led to quite
some changes:
* Use GLib.ActionEntry instead of Gtk.ActionEntry in
composer-widget.vala
* Action names can now be specified in the UI files.
* Use templates for the ComposerHeaderBar. Remove
Pillbar as superclass, since that was no longer necessary.
* Merge ComposerToolbar into ComposerWidget.
* Since actions can now be parameterized, some methods could be
merged (e.g. font size methods).
* The menu button in the composer now automatically uses a popover.
* Some methods and classes really deserved more comments.
* necessary POTFILES.in changes
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
This patch does a few things:
- Removes any notion of a sender from the Composer, since there's no UI
for it at the moment and it doesn't do anything when multiple
addresses are available.
- Converts Geary.Email and the DB use the RFC822 model for the Sender and
Reply-To headers, and translates between that and the IMAP model only
once: When dealing with IMAP ENVELOPE.
- Fixes an incorrect assumption about the Sender in the SMTP code.
* src/client/composer/composer-widget.vala (ComposerWidget): Remove all
mentions of a sender address. Make `from` prop private for setting.
* src/client/composer/email-entry.vala (EmailEntry::validate_addresses):
Fix crash when address list is null.
* src/engine/api/geary-email.vala (Email, Email::set_originators):
Convert sender prop/param from a list of RFC822 addresses to a single
address. Fix call call sites.
* src/engine/imap-db/imap-db-message-addresses.vala (MessageAddresses):
Convert sender prop from a list of RFC822 addresses to a single
address. Fix call call sites.
(MessageAddresses::get_address_from_string): New method for parsing
single addresses from the DB.
* src/engine/imap-db/imap-db-message-row.vala
(MessageRow::flatten_address, MessageRow::unflatten_address): New
un/marshalling methods for single addresses.
* src/engine/imap/api/imap-folder.vala (Folder::fetched_data_to_email):
Normalise sender and reply-to IMAP ENVELOPE responses to conform with
RFC 822's expectations.
* src/engine/imap/message/imap-envelope.vala (Envelope): Label reply_to
prop as being non-null, to conform with IMAP spec.
* src/engine/rfc822/rfc822-mailbox-address.vala (MailboxAddress): Added
support ctor and methods for parsing and comparing single addresses.
* src/engine/rfc822/rfc822-message.vala (Message::from_composed_email):
Set the from and sender props directly from the ComposedEmail, set the
GMimeMessage From and Sender headers correctly based on these.
(Message::stock_from_gmime): Correctly set the from and sender props
from the GMimeMessage.
* src/engine/smtp/smtp-client-session.vala
(ClientSession::send_email_async): Don't require the email sender to be
non-null — it isn't used and isn't required.
The To and CC entries will be updated if none of the recipients have
been modified. The subject will be updated (invisibly, since this will
only happen to inline or inline-compact composers, where that's hidden),
and the in_reply_to value will be set or unset appropriately.
In anticipation of inline composition, we need the composer widget to be
separate from the window in which it lives. We introduce a new
interface, ComposerContainer, that the thing that holds to
ComposerWidget must implement.
Separate composer widget from composer window
In anticipation of inline composition, we need the composer widget to be
separate from the window in which it lives. We introduce a new
interface, ComposerContainer, that the thing that holds to
ComposerWidget must implement.
Basic inline composition
Many of the details don't work, or don't work well, but the basics are
in place.
Allow only a single inline composition at a time
With this, we introduce a dialog when you would try to add another. We
also use this when changing the selected conversation with a composer
open.
Compose new messages inline, with no conversation selected
Hook up composer accelerators only when focus is in composer editor
It would be nice to only activate these accelerators when the composer
has focus generally, but that doesn't seem to be easy to detect.
Only disconnect accelerators if they're connected
Maintain focus when composer is popped out
The selection isn't, though.
Fix Tab focus for embedded composer
There are two things that needed to be fixed: The tab key doesn't
usually advance focus for embedded widgets (huh?), so we handle tab
presses by hand for ComposerWidgets. Also, the EmailEntrys do their own
tab handling, which needs to know about the composer widget, not the
toplevel widget in the embedded case.
Remove close() from ComposerContainer interface
I don't think it was actually doing anything, and it conflicts with the new close() method of Gtk.Window.
This is an attempt to break apart the client into suitable
categories. The ui directory was being overloaded with every
possible UI class. This attempts to give some organization going
forward as well as make it easier for new contributors to wade
into the code.
2012-09-07 18:55:38 -07:00
Renamed from src/client/ui/email-entry.vala (Browse further)