Display attached+un-embedded composer as an additional ConversationViewer
stack page, although it realy should be broken as its own top-level
widget - there's already too much state in ConversationViewer.
* src/client/conversation-viewer/conversation-viewer.vala: Remove old
composer boxes code. Add new ViewState enum, property and methods to
define and manipulate the current view state - either conversation or
composer.
(do_conversation): New method to put the viewer in conversation mode.
(do_compose): New method to put the viewer in compose mode, hook up the
composer widget, and handle ConversationListView selection management
for now.
(on_folder_selected, on_conversation_count_changed,
on_conversations_selected): Ensure these methods do the right thing
depending on the viewer's current view state.
(set_paned_composer): Replaced by ::do_compose, fixed call sites.
(show_multiple_selected): Minor code clean up - moved down to a more
appropriate location.
* src/client/composer/composer-box.vala (ComposerBox): Don't attempt to
up-manage it's parent's state, since the parent has a much better idea
of how best to do that. Likewise move code to manage previous
ConversationList selection out, provide signal so the a more
appropriate class can manage it instead.
* src/client/composer/composer-container.vala: Add some method comments.
* ui/conversation-viewer.ui: Add new page to the stack for the composer.
* src/client/conversation-viewer/conversation-viewer.vala: Convert to a
GtkStack. Use a GTK template for constructing the UI. Remove WebView
and any DOM-related code. Replace the enum DisplayMode and hence the
HTML spinner and HTML user message with widgets in the stack. Remove
all menus since they're all message specific and will need to be
re-implemented for ConversationViewer. Comment out composer related
code for the moment.
* src/client/application/geary-controller.vala
(GearyController::conversations_selected): Make both conversations and
current_folder arguments non-nullable, since it doesn't make any sense
for there not to be any and simplifies handler impls.
(GearyController::on_conversations_selected): Don't fire when there
isn't a current folder.
* src/client/components/main-window.vala (MainWindow::set_styling): Add
CSS theme code for the the conversation message list.
(MainWindow::create_layout): Remove GtkFrame, just add the
ConversationViewer instance directly.
* ui/conversation-viewer.ui: New GtkBuilder template for
ConversationViewer, implemented as a GtkStack containing widgets for
displaying the loading spinner, conversation as a GtkListBox, and label
for user messages.
* ui/CMakeLists.txt, po/POTFILES.in: Added new UI files.
* src/client/application/geary-application.vala (GearyApplication): Move
action names, entries and callbacks from GearyController to here. Add a
new mailto action that expects an argument, make compose just open a
blank composer.
* src/client/application/geary-controller.vala (GearyController): Add
::compose() and ::compose_mailto() methods to support app actions.
* src/client/application/geary-controller.vala
(GearyController::create_compose_widget_async): Load draft manager and
email entry completion model asynchronously after the UI has been made
visible.
* src/client/composer/composer-widget.vala (ComposerWidget): Rename
set_entry_completions to load_entry_completions, make loading
async. Make open_draft_manager_async and load_entry_completions public
so they can be invoked by the controller.
* src/client/composer/contact-list-store.vala (ContactListStore): Load
contacts asynchronously in smaller batches, so the UI
remains responsive.
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>
* src/engine/api/geary-account-information.vala (AccountInformation):
Add a display_name property, use that in the client wherever a unique
name for an account has to be shown to the user. Update all other cases
to use `id` or `primary_mailbox`.
* src/client/accounts/add-edit-page.vala: Add id property, use that when
determining if an account is new or is being edited.
* src/client/accounts/account-dialog-account-list-pane.vala
(AccountDialogAccountListPane): Add the account's id to the list model,
use that instead of the email address as the primary key.
- Make use of the "search-changed" signal to handle user input, this
lets us get rid of the built-in timeout mechanism. This reduces the
timeout from 250ms to 150ms after user input before doing the search
though.
- Use the "activate" and "stop-search" signals for the entry. This
lets us remove our handling of key events.
https://bugzilla.gnome.org/show_bug.cgi?id=720993
Move Geary.FolderSupport.Archive interface and implementation from
OtherFolder to GenericFolder, so both Y! and Outlook services get archive
support.
* src/client/components/main-toolbar.vala
(MainToolbar::update_trash_button): Renamed from
update_trash_archive_buttons, only bother to update the archive
state. Update call sites.
* src/engine/api/geary-account.vala (Geary.Account): Remove
can_support_archive property and constructor arg, update subclasses to
not pass it through.
* src/engine/imap-engine/imap-engine-generic-folder.vala (GenericFolder):
Extend Geary.FolderSupport.Archive, copy implementation from
OtherFolder.
* src/engine/imap-engine/other/imap-engine-other-folder.vala
(OtherFolder): Remove Geary.FolderSupport.Archive parent class and
implementation.
* src/client/application/geary-controller.vala
(GearyController::create_actions): Remove uneeded calls to
add_accelerator - just remove them for dups ot move them to the action
definition. Ensure they are defined in accelerators.ui so they are
bound to their accelerators regarcdless of having a visible proxy.
* help/C/shortcuts.page: Document new shortcuts.
* src/client/application/geary-controller.vala: Add shortcuts for copy
and move actions.
* src/client/components/pill-toolbar.vala (PillBar::create_menu_button):
Hook up the button's related action to invoke the button's popup menu,
taking care not to cause an infinte loop.
(PillBar::setup_button): Connect to the related_action's tooltip notify
signal via a local variable rather than via the button, so it does not
get lost when it changes for Gtk.MenuButton actions.
When the shell is not showing the app menu, we are adding a gear menu and
using that for the app menu to work around an issue in Mint Cinnamon
always showing a menu bar when an app menu was present. However under
gnome-shell, this causes both Geary and gnome-shell to both start fully
consuming the CPU when the gear menu was activated.
Perhaps GtkApplication{Window} was notifying or querying shell about the
state of the actions since they are in the in the "app" namespace, but
shell not knowing or caring about them was returning an error, causing
Geary to retry?
Removing the gear menu and letting GTK+ add its own app menu to the
header when shell is not showing it fixes the issue.
We could load the app_menu actions into the "win" namespace, but that
would require adding yet more workarounds (at least a duplicate
app_menu.ui file or something else similary sucky) for someone else's bug
and for users that will never see or need the fix.
Bug 759980.
* src/client/application/geary-controller.vala: Always set the
application's app_menu.
* src/client/components/main-toolbar.vala,
src/client/composer/composer-headerbar.vala: Remove gear menu.
* src/client/components/main-window.vala: Set show-menubar to false
so we either get the shell managed app-menu or GTK managed one
in the header bar.
Bug 763961.
* src/client/application/geary-application.vala
(GearyApplication::present): Always call show_all on the main window
since if started hidden, it won't have had that called on it.
* src/client/application/geary-controller.vala:
(GearyController::on_indicator_activated_application,
GearyController::on_indicator_activated_composer,
GearyController::on_indicator_activated_inbox): Always call show_all
on the main window since if started hidden, it won't have had that
called on it.
When implementing bug 765359, it appears that Geary is doing too much
work to load icons. Simplify it a bit.
* src/client/components/icon-factory.vala (IconFactory): Don't bother
loading an application icon, it's easier and works better to just use
an icon name where needed. Don't bother adding all of the icons/*x*
directories to the icon theme search path, just make the icon's
directory hierarchy follow the XDG/hicolor spec and add the base
directory. Remove now-redundant code.
* src/client/application/geary-controller.vala: Set the default icon name
for all geary windows.
(GearyController:on_about()): Set the name for the icon in the About
dialog.
* src/client/components/main-window.vala (ApplicationWindow): Don't
bother loading icons for the window, just use the new default.
* src/client/notification/libnotify.vala: Don't bother passing the
application icon through for error notifications, an icon name has
already been set.
* icons/*x*/geary.png: Move to a new directory hierarchy that follows the
hicolor spec.
* icons/CMakeLists.txt: Updated to use new paths to the icons.
First, create a composer action corresponding to the app menu, instead
of reusing the one from the controller. Second, create the menu from a
MenuModel, instead of from a UIManager, so we can have many of them.
https://bugzilla.gnome.org/show_bug.cgi?id=746504
This prevents a lot of extraneous (and often erroring) operations
when Geary closes, particularly due to the conversation and folder
list selections changing as items are removed.
For now, the undo stack is 1-deep with no redo facility, which mimics
Gmail's facility. We can consider later offering a more involved
undo stack, but would like to try this out for now and work out the
kinks before becoming more aggressive.
Although this doesn't solve the problems described in the bug, there
was some perceived improvement in reducing the occurrence. These
changes also clean up the code, being verbose about distinguishing
between sorting by sent date (i.e. the Date: header field) and
received date (i.e. in EmailProperties, i.e. IMAP's INTERNALDATE).
There was one comparator that did not have a proper stabilizer; that's
fixed here as well.
This allows us to avoid messing with the state of the conversation
viewer when we're composing a new message. Instead, we hide it
completely and show only the ComposerBox.
The styling of paned composer is changed to resemble that of the inline
composers. Because of restrictions on what styles are available for
various widgets, the ComposerBox becomes a Gtk.Frame, and its border
simulates the margin while some padding and an inset shadow simulate the
border. I haven't figured out how to do an outset box-shadow.
https://bugzilla.gnome.org/show_bug.cgi?id=743670
If a command fails due to a hard error (connection dropped, network
loss, etc.), the command is preserved in the in-memory Folder queue
and retried when the connection is reestablished. This makes Geary
more robust and resistant to simple errors due to connection loss,
i.e. archiving a message and having it return later because the
archive command was dropped and, when the connection reestablished,
the message "reappears" because it's still on the server.
Note that this is *not* offline mode or a replacement for it, merely
a way to make Geary more robust when a user's connection is flaky.
This patch drastically improves network connection handling and
reestablishment. In particular, the ImapEngine.Folder's open_count
wasn't always properly maintained (in the engine and the client)
causing connection reestablishment issues. Also, prior code attempted
to deduce when to reestablish a connection based on the type of Error
encountered. Now, as long as the Folder's open_count is greater than
zero, reestablishment will be attempted (with a back-off algorithm and
special cases in the ClientSessionManager preventing continual login,
i.e. when credentials are bad).
ClientSessionManager also has a back-off algorithm when it's adjusting
its session pool and uses the NetworkMonitor to detect when the host
is simply unavailable due to the network being unavailable (to prevent
continuous retries).
In addition to the above bug, this patch solves the following tickets:
Bug #714595
Bug #725959
Bug #712960
We do this heuristically, by noting which messages it is in reply to and
seeing if it matches the unmodified reply or reply all states. This
isn't perfect; notably forwarded messages are picked up.
We hide the existing draft in the conversation viewer as soon as we open
the composer. We also ensure that future versions of this draft will
also be hidden. The list of emails to be hidden is cleared when the
conversation viewer is, so we query all open composers at this point to
see which email ids should be hidden.
https://bugzilla.gnome.org/show_bug.cgi?id=743067
When replying to a message, we use the existing inline composer if it
already references the message we're replying to, or if we're replying
with a quote. Replies without quotes get made into new composers.
When adding a new message as a reply in a composer, we add the relevant
addresses to the to and cc lines, based on the current reply type. We
remove duplicates, and don't include any to addresses as cc. We also
keep track of a total to and total cc list, which gets swapped in if a
reply action is to change the reply type.
We keep track of all the replied-to message ids and include all of them
in the In-Reply-To header. However, the References header only includes
message ids from the first message replied to. This is because RFC 2822
requires this header to represent a single lineage, which we cannot
guarantee if we're replying to different branches of the conversation.
With the Empty button now attached to Archive/Trash/Delete, it's now
less lopsided for only Archive to have a label. This removes the
label from Trash/Delete (which also makes it more innocuous when the
user presses Shift a lot, i.e. while editing in the inline composer),
which in turns simplifies building the main toolbar.
Trash and Spam folders may now be emptied by Geary. A user warning is
presented, as the operation cannot be undone and deletes mail on the
server, not just locally.
This introduces a new full-text search algorithm that attempts to
curb the effects of overstemming in the Porter Snowball stemmer.
The FTS table will be regenerated with this update.
The crux of this new algorithm is a configurable heuristic that
reduces stemmed matching. The configuration is not available via the
UI (I suspect it will only confuse users) but can be changed by power
users via GSettings. More information is available at:
https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy
If the Welcome dialog (used to create the initial account) is visible
and Geary was re-run, an empty main window would appear. This is due
to the Welcome dialog hiding the main window until the first account
is created. Now, if Geary is re-run the Welcome dialog is presented
to the user.
This may possibly solve bug #737811.
This happens only if it's not changing the reply type. This helps in
the case where you are switching the reply and haven't de-selected text
that was previously quoted.
https://bugzilla.gnome.org/show_bug.cgi?id=712912
If part of a message is selected, that will be the replied-to message.
If parts of multiple messages are selected, or nothing is selected, the
last email will be replied to.
https://bugzilla.gnome.org/show_bug.cgi?id=712912