Commit graph

2707 commits

Author SHA1 Message Date
Michael James Gratton
41f47bb187 Reverse the text order of Discard/Save and Close buttons in the composer.
c.f. Bug 747627
2016-10-15 18:08:58 +11:00
Michael James Gratton
0a164cecda Add missing word to UI label in conversation-email.ui. Bug 772951. 2016-10-15 12:05:30 +11:00
Michael James Gratton
06a57fbe49 Don't bother adding an email to the FTS table if all cols will be empty.
Investigation into Bug 772522 showed that often when a message is first
added to MessageSearchTable, all columns had null or empty strings as
values, which constitutes an undesirable write IO overhead.

* src/engine/imap-db/imap-db-folder.vala
  (Folder::do_add_email_to_search_table): Ensure that there is at least
  one non-empty value before doing the INSERT.
2016-10-14 12:08:35 +11:00
Gautier Pelloux-Prayer
8c20f92409 Dialog: use suggested-action (blue buttons) and destructive-action (red buttons) when necessary. Bug 772514 2016-10-14 11:23:40 +11:00
Michael James Gratton
fe0b304470 Add GearyApplication as private weak ref to GearyController.
This allows removing a large number of uses of the apps's static instance
variable, which is highly desirable.

* src/client/application/geary-controller.vala (GearyController): Add
  GearyApplication as a weak internal field. Set it in the ctor. Use that
  instead of GearyApplication.instance throughout.

* src/client/application/geary-application.vala
  (GearyApplication::controller): Pass this in to the controller when it
  is constructed.
2016-10-14 11:23:40 +11:00
Michael James Gratton
2437568c55 Don't execute conversation addresss "from" searches twice.
* src/client/application/geary-controller.vala: General search code
  cleanup.
  (GearyController::on_conversation_viewer_email_added): Don't explicitly
  perform a search, it will be triggered by setting the text.
2016-10-14 11:23:40 +11:00
Dušan Kazik
dad21d9ef4 Update Slovak translation 2016-10-12 19:19:11 +00:00
Piotr Drąg
a88151afdd Update Polish translation 2016-10-09 09:23:49 +02:00
Michael James Gratton
e6903fa65d Fix a critical warning. 2016-10-08 21:52:27 +11:00
Michael James Gratton
83c383ddd2 Don't load Gravatar icons unless a HTTP 200 response is receieved.
Bug 765516

* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage::load_avatar): Check HTTP response before loading
  the icon.

* src/client/conversation-viewer/conversation-message.vala (set_avatar):
  Don't bother trying to catch any GdkPixbuf error, just pass it up the
  call chain.
2016-10-08 21:20:40 +11:00
Michael James Gratton
06d799e335 Remove unnecessarily overridden ConversationWebView method. Bug 765516.
* src/client/conversation-viewer/conversation-web-view.vala
  (get_preferred_size): Removed, hopefully will fix "widget tried to
  gtk_widget_get_height inside GtkWidget ::get_height" warning.
2016-10-08 21:01:37 +11:00
Michael James Gratton
e789173c30 Make the conversation address popover copy the full address. Bug 765516.
* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage::on_address_box_child_activated): Set the copy
  action's param using the full address.
  (ConversationMessage::set_action_param_strings): New method to allow
  specifying different action param values.
2016-10-08 20:23:38 +11:00
Michael James Gratton
5d8519c70d Remove compat definition of Binding.unbind and its one use. 2016-10-08 17:44:03 +11:00
Michael James Gratton
93f65eb60c Fix a crash when sending mail to a conversartion email address.
* 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.
2016-10-08 17:43:21 +11:00
Michael James Gratton
f03fba9c77 Indicate the end of the conversation message body preview. Bug 765516.
* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage::ConversationMessage): Add an ellipsis to the end
  of the preview text.
2016-10-08 17:33:54 +11:00
Michael James Gratton
65e0df7aca Update conversation address labels to indicate interactivity. Bug 765516.
* src/client/conversation-viewer/conversation-message.vala
  (AddressFlowBoxChild::AddressFlowBoxChild): Check for enter and leave
  events, update the prelight state of the flowbox child accordingly.
  (ConversationMessage::on_address_box_child_activated): Update the
  active state of the flowbox child appropriately when the popover
  active.

* ui/geary.css: Style the active and hover states of the flowboxes.
2016-10-08 17:32:40 +11:00
Michael James Gratton
dfe9e3d43a Fix secondary address label parts not being dim under the Arc theme.
Replace the dim-label hack with two distinct labels, themed using GTK CSS
classes.

Bug 765516.

* src/client/conversation-viewer/conversation-message.vala
  (AddressFlowBoxChild::AddressFlowBoxChild): Construct a different
  Gtk.Label for each address part, add CSS classes to enable them to be
  styled. Pass an enum in to specify From addresses, rather than Pango
  markup attr values. Fix call sites. Remove now obsolete
  ::format_address() method, update call sites.

* src/client/util/util-gtk.vala (pango_color_from_theme): Remove now
  unsed method.

* ui/geary.css: Style the new address labels.
2016-10-08 17:29:54 +11:00
Michael James Gratton
5939509437 Remove non-existent source file from POTFILES.in. Bug 765516. 2016-10-08 03:32:29 +11:00
Michael James Gratton
898fa3303d Convert the conversation viewer to use GTK widgets. Fixes Bug 765516.
Merge branch 'wip/765516-gtk-widget-conversation-viewer'
2016-10-07 23:14:16 +11:00
Michael James Gratton
d2b3d9ed67 Ensure the composer's from combobox is populated on reply.
Fixes Bug 772427.

* src/client/composer/composer-widget.vala
  (ComposerWidget::update_from_field): Always add the primary account's
  addresses to the From combobox, regardless of reply type. Tidy up some
  comments.
  (ComposerWidget::add_account_emails_to_from_list): Add a missing "this"
  for clarity.
2016-10-07 23:09:22 +11:00
Gautier Pelloux-Prayer
acb6b705ff Use FileChooserNative for save/save all as well. Bug 770467 2016-10-07 21:17:35 +11:00
Marek Černocký
6c763cec65 Updated Czech translation 2016-10-06 10:35:07 +02:00
Piotr Drąg
c5f0a7cf67 Move context to the end of the tag in the shortcuts window
It doesn't work the other way around, for some reason.
2016-10-04 21:43:32 +02:00
Marek Černocký
2522e27b24 Updated Czech translation 2016-10-04 14:34:23 +02:00
Gábor Kelemen
c10ac8117b Updated Hungarian translation 2016-10-04 11:48:07 +00:00
Gautier Pelloux-Prayer
a8930e51d3 CMakeLists.txt: fix GTK_3_20 detection 2016-10-04 21:28:04 +11:00
Michael James Gratton
aa2901eef4 Reset the conversation-viewer's scrollbars when adding a new convo list. 2016-10-04 15:16:16 +11:00
Michael James Gratton
efeb8c6f11 Clean up ComposerEmbed a bit.
* src/client/composer/composer-widget.vala: Removed uneeded embedded
  composer style - we're setting a min size for the composer on the GTK
  widget now.

* src/client/composer/composer-embed.vala: Don't bother setting the HTML
  CSS class now it is unused. Use Source.REMOVE for callback return
  values for clarity.
2016-10-04 10:58:17 +11:00
Michael James Gratton
c0e12fa611 Ensure ConversationRow subclasses do not need to be indiviudally shown. 2016-10-04 10:58:17 +11:00
Michael James Gratton
bb1a6c0c88 Ensure new embedded composers are scrolled into view when opened.
* src/client/conversation-viewer/conversation-list-box.vala
  (ConversationRow): Pull should_scroll machinery up from EmailRow
  subclass so we can also use it for scrolling to ComposerRow.
  (ConversationListBox::add_embedded_composer): Enable should_scroll for
  composer rows, scroll to it when triggered. Remove existing,
  non-functional attempt to focus the composer.
  (ConversationListBox::scroll_to): Allow scrolling to any kind of
  ConversationRow.

* src/client/composer/composer-embed.vala (ComposerEmbed): Remove unused
  loaded signal.
2016-10-04 10:58:17 +11:00
Michael James Gratton
86c67e0beb Rename source file for ConversationListBox to match convention. 2016-10-04 10:58:17 +11:00
Michael James Gratton
6ba3836bce Rename ConversationListBox.id_to_row to something more memorable. 2016-10-04 10:58:17 +11:00
Michael James Gratton
b545eaedaa Don't append in-progress drafts to a conversation.
* src/client/conversation-viewer/conversation-listbox.vala
  (ConversationListBox): Keep track of the draft id currently being
  edited, don't add it to the conversation when appended.

* src/client/composer/composer-container.vala (ComposerContainer): Make
  the container's composer internal so we can hook into its
  draft_id_changed signal. Update implementing classes.
2016-10-04 10:58:17 +11:00
Michael James Gratton
37d40f25a3 Fix a critical error if ConversationListBox is destroyed twice. 2016-10-04 10:58:17 +11:00
Michael James Gratton
fa84010133 Remove obsolete ConversationFindBar class and related code. 2016-10-04 10:58:17 +11:00
Michael James Gratton
5c671c29c3 Use a slightly nicer way to ensure ConversationListStore is finalised.
* src/client/conversation-list/conversation-list-store.vala
  (ConversationListStore): Use a static sort function implementation,
  rather than unsetting the instance method when destroyed.
2016-10-04 10:58:17 +11:00
Michael James Gratton
8cde4f36a2 Split up handling of emails and composers in conversation list box.
* src/client/conversation-viewer/conversation-listbox.vala: Add two
  different listbox child row types, one for emails only and one for
  composers only, with a common ConversationRow superclass. When a draft
  composer is added, replace the draft email it is standing in for, and
  replace it again when removed. Rename last_email_row to last_row and
  make into a generic ConversationRow, only update it at the end of a
  batch of changes.
2016-10-04 10:58:17 +11:00
Michael James Gratton
a852ac0e4c Rework conversation listbox message loading impl a bit.
* src/client/conversation-viewer/conversation-listbox.vala: Rename
  list_full_emails_async to load_full_emails, add load_full_email method
  that loads a single message and adds it to the list, use that when the
  convo is appended to. Reorganise positions in source file to make some
  more sense.
2016-10-04 10:58:17 +11:00
Michael James Gratton
e8a8e23465 Workaround a GTK+ crasher, Bug 771812. 2016-10-04 10:58:17 +11:00
Michael James Gratton
d3c1b31405 Fix next another conversation load cancelled crit error. 2016-10-04 10:58:17 +11:00
Michael James Gratton
096de14831 Minor composer container cleanup. 2016-10-04 10:58:17 +11:00
Michael James Gratton
72d97c72f7 Make composer scrolled window directly available to the embedded container. 2016-10-04 10:58:17 +11:00
Michael James Gratton
4170c94cc4 Ensure drafts messages are always displayed expanded by default. 2016-10-04 10:58:17 +11:00
Michael James Gratton
c0a9de8726 Update composer container style implementations a bit.
* src/client/composer/composer-box.vala,
   src/client/composer/composer-embed.vala: Use vexpand so as to work
   with GtkGrid, use consistent GTK CSS classes.
2016-10-04 10:58:17 +11:00
Michael James Gratton
2ee52ec596 Improve ConversationViewer encapsulation.
* src/client/application/geary-controller.vala: Move construction of
  ComposerEmbed into ConversationViewer so its scrollbar doesn't need to
  be made available.
2016-10-04 10:58:17 +11:00
Michael James Gratton
d8fbb6f971 Ensure composer web views are always visible. 2016-10-04 10:58:17 +11:00
Michael James Gratton
23fdf583cf Don't show draft messages when editing them.
* src/client/conversation-viewer/conversation-listbox.vala (EmailRow):
  Add a grid to the row, then add the email view to that. Allow embedded
  composers to also be added to the grid, hide the email view when the
  composer is for a draft. Fix code making asumptions about EmailRow's
  child.
  (ConversationListBox::add_embedded_composer): Add draft param, pass it
  through to the email row. Update call sites.

* src/client/conversation-viewer/conversation-email.vala
  (ConversationEmail): Remove composer related prop and methods, since
  its handled by EmailRow now.

* ui/geary.css: Update widget hierarchy.
2016-10-04 10:58:17 +11:00
Michael James Gratton
f315fce4f1 Remove blacklisting from ConversationListBox, use a composer signal instead.
* src/client/composer/composer-widget.vala (ComposerWidget): Add
  draft_id_changed signal, emit that when the manager's draft id changes,
  rather than hooking directly into the ConversationListBox.

* src/client/conversation-viewer/conversation-listbox.vala
  (ConversationListBox): Remove blackisting methods, update call sites.
2016-10-04 10:58:17 +11:00
Michael James Gratton
6ad9bd681c Move conversation loading timout mgmt to ConversationListBox. 2016-10-04 10:58:17 +11:00
Michael James Gratton
0e57d6e8d1 Display Sender and Reply-To headers for conversation messages. 2016-10-04 10:58:17 +11:00