Commit graph

400 commits

Author SHA1 Message Date
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
Marek Černocký
6c763cec65 Updated Czech translation 2016-10-06 10:35:07 +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
Michael James Gratton
86c67e0beb Rename source file for ConversationListBox to match convention. 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
9c813eaacb Replace Gtk.IconView with FlowBox for displaying email attachments. 2016-10-04 10:58:17 +11:00
Michael James Gratton
d467647153 Break out ListBox used to display conversations into standalone widget.
The conversation viewer's ListBox is sufficiently complex to warrant its
own widget. Use empty placeholders for the list per the HIG, and
correctly fix mamagement of empty folder vs no conversations selected
this time.

* src/client/application/geary-controller.vala (GearyController):
  Directly manage secondary parts of the conversation viewer, since the
  controller since it has a better and more timely idea of when a
  conversation change is due to folder loading status or from the user
  selecting conversations, and so the viwer doesn't need to hook back
  into the controller. Remove the now-unused conversations_selected
  signal and its callers.

* src/client/conversation-viewer/conversation-listbox.vala: New widget
  for displaying the list of emails for a conversation. Moved relevant
  code from ConversationViewer here. Made adding emails async to get
  better UI responsiveness. Don't implement anything to handle
  conversation changes or emptying the list.

* src/client/conversation-viewer/conversation-viewer.vala: Replace user
  messages - empty folder/search & no/multiple messages selected with new
  EmptyPlaceholder. Remove a lot of the state manage code needed when
  managing the email listbox. Add a new ConversationListBox for every new
  conversation and just throw away.

* src/client/conversation-list/conversation-list-view.vala
  (ConversationListView): Clean up firing the conversations_selected
  signal - don't actually emit it when the model is clearing, and don't
  bother delaying the check either.

* src/client/components/empty-placeholder.vala: New widget for displaying
  empty list and grid placeholders per the HIG.

* src/client/conversation-viewer/conversation-email.vala
  (ConversationEmail): Make manually read a property, since it
  effectively is one.

* src/CMakeLists.txt: Include new source files.

* po/POTFILES.in: Include new source and UI files, and some missing ones.

* ui/CMakeLists.txt: Include new UI files.

* ui/conversation-viewer.ui: Replace user message and splash page with
  placeholders for the new empty placeholders(!).

* ui/empty-placeholder.ui: UI def for new widget class.

* ui/geary.css: Chase widget name/class changes, style new
  empty placeholder UI.
2016-10-04 10:58:17 +11:00
Michael James Gratton
50dab794f3 Add missing file to POTFILES.in. 2016-10-04 10:58:17 +11:00
Michael James Gratton
82530d12a7 Re-enable the message context menu.
* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage): Add a simple action group namespaced as "msg"
  for actions under the message's scope, add actions to it for the
  context menu. Track the currently selected DOM element under the
  context menu so we can update action enabled state, etc., based on
  it. Construct the context menu as needed, update signal & event
  handlers as needed.

* src/client/conversation-viewer/conversation-email.vala
  (ConversationEmail): Add new save-image signal, chain emission from
  added ConversationMessage instance's save-image signal to this.

* src/client/application/geary-controller.vala (GearyController): Chase
  on_save_buffer_to_file signal moving to ConversationEmail and being
  renamed to save_image.

* src/client/conversation-viewer/conversation-viewer.vala: Remove uneeded
  signal.

* ui/conversation-message-menus.ui: New UI file for ConversationMessage
  context menu.

* ui/CMakeLists.txt: Incude ConversationMessage UI in the resources.

* po/POTFILES.in: Add new UI file.
2016-10-04 10:58:17 +11:00
Michael James Gratton
9986e2e3c3 Add missing UI file to POTFILES.in. 2016-10-04 10:58:17 +11:00
Michael James Gratton
ec22b33825 Reenable displaying sub-messages.
Geary currently displays RFC 822 attachments inline, below the email's
primary message body, using the same HTML chrome for the headers and
email body as for the primary body. Taking the same approach but using
GTK+ widgets meant splitting ConversationMessage up into a
ConversationEmail class that manages the UI for displaying an email in
its entirety, and a ConversationMessage to manage the only header widgets
and webview for displaying an individual RFC 822 message, usable for both
the primary body and any sub-messages. Thus, this is a big change.

One behavioural change is that each sub-message with remote images now
requires individual approval, rather than being dependant on the
containing message's sender and/or approval. This prevents some attacks
e.g. a trusted sender forwarding a spam/malware message, but does not
prevent it if the message is forwarded inline, obviosuly.

* src/client/conversation-viewer/conversation-email.vala (ConversationEmail):
  New class for managing the UI for an overall email message. This
  replaces the old ConversationMessage and contains much of it's code and
  widgets - anything from that class which does not directly support
  displaying headers or a message body.

* src/client/conversation-viewer/conversation-message.vala:
  (ConversationMessage): Same class as before, but now with its scope
  narrowed to only display message headers and body. The draft infobar
  remains here rather than being put ConversationEmail where it belongs
  since it's bit of a pain to insert in the right place and doesn't
  really hurt.
  (::email): Moved this property and any code that depends on it to
  ConversationEmail.
  (::always_load_remote_images): New property passed in via the ctor,
  allowing one dependency on the old ::email property to be removed.
  (::inlined_content_ids): Moved to ConversationEmail, since that is the
  class that keeps track of attachments to display. Add the signal
  attachment_displayed_inline to allow ConversationEmail to be notified
  of inlined attachments instead.
  (::flag_remote_images, ::remember_remote_images): New signals to notify
  ConversationEmail that the user has flagged this message or the
  message's sender for loading remote images. This is passed through
  since in the former's case we may need to set flags on the email
  itself, the latter because it is one less use of the contact_store
  property, which should be removed from this class at some point.

* src/client/conversation-viewer/conversation-viewer.vala: Chase API
  changes from the above. In general, replace use of the term "message"
  with "email" since this class is now mostly dealing with
  ConversationEmail instances, rather than ConversationMessage instances.
  (ConversationViewer::check_mark_read): Only consider the
  ConversationEmail's primary message body when checking for visibility
  rather than that and any submessages to keep things simple.
  (ConversationViewer::show_message, ::hide_message): Renamed to
  expand_email/collapse_email respectively since we don't ever actually
  hide it. Carry that change on to same methods on ConversationEmail.

* src/engine/rfc822/rfc822-message.vala (Geary.RFC822.Message): Add
  get_primary_originator(), almost vermatim from Geary.Email, to support
  determining the sender for remembering remote message loading for
  senders of sub-emails.

* src/client/components/main-window.vala (MainWindow::set_styling): Fix
  background transition for collapsed emails.

* src/client/application/geary-controller.vala: Chase API name changes.

* src/CMakeLists.txt: Include new ConversationEmail source file.

* ui/conversation-email.ui: New UI for ConversationEmail, move the email
  action box, attachments box amd sub-messages box here from
  conversation-message.ui.

* ui/CMakeLists.txt: Include new UI in compiled resources.

* po/POTFILES.in: Add new UI for transation.
2016-10-04 10:58:17 +11:00
Michael James Gratton
b29d83e546 Convert ConversationViewer to a Stack with a ListBox, remove its WebView.
* 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.
2016-10-04 10:58:17 +11:00
Michael James Gratton
64aa037c04 Add new ConversationMessage widget to display a single message with a WebView.
The new widget is designed to be added to a ListBox like container, and
can display both a summary and the complete message, a'la the traditional
Geary ConversationView.

Most features are currently disabled, but it does handle hiding/showing
the message body using a single WebKit.WebView. All code from
ConversationViewer relating to DOM manipulation as been copied over, all
but that which was needed to display the message has been commentd out.

* src/client/conversation-viewer/conversation-message.vala: Source code
  for new widget.

* src/client/components/main-window.vala: Add CSS theme code for
  ConversationMessage.

* ui/conversation-message.ui: GtkBuilder template for new widget.

* ui/conversation-message-menu.ui: GtkBuilder for the message menu. This
  is a separate file since GTK+ 3.10 doesn't support GtkPopoverMenu and I
  can't build it using Glade otherwise.

* src/CMakeLists.txt: Added new source file.

* po/POTFILES.in, ui/CMakeLists.txt: Added new UI files.
2016-10-04 10:58:17 +11:00
Michael James Gratton
c3a09eb643 Add missing source file to POTFILES. 2016-10-04 10:51:00 +11:00
Gautier Pelloux-Prayer
87be2285ce Add shortcuts window. Bug 764926 2016-10-04 09:41:50 +11:00
Jiri Grönroos
fe30f19366 Updated Finnish translation 2016-10-02 18:02:01 +00:00
Piotr Drąg
b23dcbe767 Updated Polish translation 2016-10-02 12:41:24 +02:00
Dušan Kazik
5c98f8f62e Updated Slovak translation 2016-10-02 08:15:52 +00:00
Rafael Fontenelle
a977b01794 Updated Brazilian Portuguese translation 2016-09-30 09:01:04 +00:00
Balázs Meskó
9241ed0631 Updated Hungarian translation 2016-09-30 06:55:19 +00:00
Marek Černocký
6241b11494 Updated Czech translation 2016-09-29 21:33:21 +02:00
Dušan Kazik
59140430fd Updated Slovak translation 2016-09-28 18:55:58 +00:00
Piotr Drąg
9a7fa39680 Updated Polish translation 2016-09-26 21:22:44 +02:00
Michael James Gratton
69d7e242ec Remove ActionAdaptor and related code, made redundant by 17f7ec2. 2016-09-25 18:12:24 +10:00
Dušan Kazik
e2911c3b4b Updated Slovak translation 2016-09-25 08:07:48 +00:00
Piotr Drąg
d6efbd030b Updated Polish translation 2016-09-24 22:14:46 +02:00
Michael James Gratton
2cee61e1b9 Add missing ui/gtk/menus.ui file to PO/POTFILES.in. 2016-09-25 02:11:49 +10:00
Balázs Meskó
ad1fc5bafc Updated Hungarian translation 2016-09-23 08:48:08 +00:00
Balázs Meskó
4edc16e4bb Updated Hungarian translation 2016-09-22 18:27:12 +00:00
Marek Černocký
81b3188420 Updated Czech translation 2016-09-21 21:33:57 +02:00
Piotr Drąg
a6a78b981c Updated Polish translation 2016-09-21 18:21:55 +02:00
Niels De Graef
ebd788968b Use GLib.Actions in the composer. Bug 770356.
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>
2016-09-21 15:02:18 +10:00
Aurimas Černius
9705f14924 Updated Lithuanian translation 2016-09-17 14:25:35 +03:00
Baurzhan Muftakhidinov
e499f3db4a Updated Kazakh translation 2016-09-12 12:10:42 +00:00
Мирослав Николић
cb69415b4b Updated Serbian translation 2016-09-11 09:17:37 +02:00
Dušan Kazik
d57837fe36 Updated Slovak translation 2016-09-10 15:06:15 +00:00
Marek Černocký
8557a10afd Updated Czech translation 2016-09-10 09:09:48 +02:00
Piotr Drąg
a74925df69 Updated Polish translation 2016-09-08 04:20:26 +02:00
Flo H
6fd4e2a8a8 Updated German translation 2016-09-06 21:08:55 +00:00
Jiri Grönroos
58ccec016b Updated Finnish translation 2016-09-05 17:38:00 +00:00
Piotr Drąg
f032af8f7a Updated Polish translation 2016-09-05 16:45:06 +02:00
Piotr Drąg
bb29b4c2ca Updated Polish translation 2016-09-05 16:42:08 +02:00
Balázs Meskó
df141322b3 Updated Hungarian translation 2016-09-05 07:37:40 +00:00
Michael James Gratton
96ea69df19 Make appdata file translatable. Bug 713937.
* desktop/CMakeLists.txt: Translate the appdata file rather than just
  installing it directly.

* desktop/geary.appdata.xml.in: Rename from 'geary.appdata.xml', make
  name, summary and description translatable.

* cmake/FindIntltool.cmake: Add a CMake command for the appdata file.

* po/POTFILES.in: Include geary.appdata.xml.in.
2016-09-05 12:14:34 +10:00
Мирослав Николић
da2d2c9840 Updated Serbian translation 2016-08-25 08:22:54 +02:00
Jiri Grönroos
e7ef2bf48d Updated Finnish translation 2016-08-21 09:59:53 +00:00
Jiri Grönroos
a1a910e77c Updated Finnish translation
(cherry picked from commit 5d5e5af7af5365eaa91faa5f2497be1ad82614bf)
2016-08-20 17:29:44 +00:00
Piotr Drąg
4c28117242 Updated Polish translation 2016-08-19 18:59:30 +02:00