Commit graph

416 commits

Author SHA1 Message Date
Michael James Gratton
adf168218e Ensure composer overlay widget isn't visible by default.
Followup for commit 07b4a784.
2018-04-16 11:46:00 +10:00
Michael James Gratton
07b4a7842f Replace some deprecated style calls in the composer with CSS rules. 2018-04-15 22:03:35 +10:00
Michael James Gratton
7fa755f0b7 Work around composer info label being too long. Fixes Bug 790435.
* ui/composer-widget.ui: Make the info label esliipsisable, but give it a
  reasonable minimum size.

* src/client/composer/composer-widget.vala (ComposerWidget): Set the info
  label's tooltip with the text so it can still be read when ellipsed.
2018-04-14 12:46:55 +10:00
Michael James Gratton
5a9075b345 Fix TRUE/FALSE listed as composer drafts status.
* src/client/composer/composer-widget.vala (Composer): Replace use of
  inappropriate public properties and obtuse property bindings with a
  subject_changed signal and private properties that update the info
  label in their setter, so it's obvious how the whole thing works. Move
  code for managing a detached compoer's window title to the
  ComposerWindow class.
2018-04-14 12:37:22 +10:00
Michael James Gratton
77d33d7346 Don't display quote expander buttons when printing a message.
Fixes Bug 795216.

* ui/conversation-web-view.css: Fix syntax error in CSS, make
  geary-button elements display: none for print.
2018-04-13 16:54:57 +10:00
Michael James Gratton
67e8a8ab93 Fix composer detach button position & visibility on custom setups.
Fixes Bug 793710.

* src/client/composer/composer-headerbar.vala (ComposerHeaderbar): Ensure
  we actually get notified when the user changes their decoration prefs
  and update detach button location correctly.

* ui/composer-headerbar.ui: Make start detach button's image visible by
  default.
2018-04-12 11:36:18 +10:00
Michael James Gratton
3da72b2f76 Fix message body quote button styling under WebKitGTK 2.20.
* ui/conversation-web-view.css: Replace bogus ">>" with simple descendent
  selector.
2018-04-11 14:01:54 +10:00
Michael James Gratton
71d05b6ce0 Reduce CPU use when idle.
It looks like Gtk.Spinner triggers repaints when running, even when the
widget is not visible. This ensures the conversation is stopped when not
visible.

Fix for Bug 783025.

* src/client/conversation-viewer/conversation-viewer.vala
  (ConversationViewer): Start the conversation spinner when showing it,
  stop the conversation spinner when it is hidden.
2018-04-09 12:31:39 +10:00
Michael James Gratton
32f9f17d08 Remove icon from composer's send button her HIG recommendations. 2018-02-13 13:39:07 +11:00
Michael James Gratton
2228fe73e7 Stop using Gtk.Widget.show_all() on the main window.
Using show_all is a pita, since it causes a bunch of bugs whenever we
need to conditionally show/hide widgets. This removes all uses on the
main window in favour of either just show() or present(), and ensures
that its widgets that are shown by default, are shown by default.
2018-02-07 14:49:59 +11:00
Michael James Gratton
360e5a094c Make copying a message subject much more likely to work. Bug 788494.
* ui/conversation-message.ui: Make subject label focusable so if clicked
  on, its default keyboard bindings will Just Work.
2018-02-05 22:30:58 +11:00
Michael James Gratton
8b42ceda1a Update start-notification preferences text, tooltip, and user manual.
Fixes Bug 742244, again.
2018-01-11 03:13:54 +11:00
Michael James Gratton
2f35e40e46 Swap position of UL and OL lists, to be in that order. 2017-12-12 23:32:43 +11:00
Nikolas Tapia
63521d8566 Added support for lists in composer
This attempts to solve bug
[#714921](https://bugzilla.gnome.org/show_bug.cgi?id=714921).

They are available as two buttons on the format bar, next to font
options. The icons I used are taken from a free icons site just for demo
purposes and should be replaced by new icons. Also I did not include
hotkeys mainly because I could not come up with a good one, also they
are pretty uncommon I think.

Also added new icons to icons/CMakeLists.txt
2017-12-12 23:32:28 +11:00
Michael James Gratton
cba778d6f7 RTL UI fixes for ConversationMessage. 2017-12-12 15:56:31 +11:00
Niels De Graef
01c13f726f Port build system to Meson. Bug 777044.
Some remarks:

* Note that Meson adds a hard dependency on Python 3.

* All dependencies and defines are now listed together.

* Some build files were put in their respective subdirectories, e.g. the Geary
  engine library will be built from the Meson file in `src/engine`.

* `--fatal-warnings` is no longer an explicit flag, as Meson provides
  `-Dwerror=true` for this.

* An explicit resource file needs to be used. The issue to support this from
  Meson itself can be found at https://github.com/mesonbuild/meson/issues/706 .

* The `gnome.yelp()` function parses a LINGUAS file so we no longer need to keep
  track of all languages in our build system.

* There are no Debian scripts defined in the meson.build files to keep them
  clean, but they can be kept as separate scripts in `build-aux`.

* Left out the `dist` target as there is now `ninja dist`

* `geary-docs` is disabled by default, as valadoc-0.38.3 returns errors.

https://bugzilla.gnome.org/show_bug.cgi?id=777044
2017-12-12 00:27:46 +01:00
Michael James Gratton
d1d8d6411e Merge branch 'wip/713006-better-error-reporting'. Fixes Bug 713006. 2017-11-19 18:35:06 +11:00
Michael James Gratton
bcca75f5a8 Include a back trace in problem report technical details.
This adds a dependcy on libunwind for generating the back trace.

* src/CMakeLists.txt: Require libunwind-generic package and libunwind
  VAPI. Update docs and debian/control with new dependencies.

* src/engine/api/geary-problem-report.vala (ProblemReport): Generate a
  stack trace in the default constructor if an error is specified.

* src/client/components/main-window-info-bar.vala
  (MainWindowInfoBar::format_details): Include stack trafe from problem
  report in output if present.

* ui/main-window-info-bar.ui: Add a ScrolledWindow around the TextView
  since the details could now be quite large.

* bindings/vapi/libunwind.vapi: Add bindings for libunwind courtesy
  Guillaume Poirier-Morency, add Error enum.
2017-11-18 15:25:28 +11:00
Michael James Gratton
261e8a4ba3 Prevent composer body/sig/quote parts from losing focus. Bug 779369.
* ui/composer-web-view.js: Add a click handler for the document that
  prevents clicks outside the body parts from being processed.
2017-11-16 15:49:51 +11:00
Michael James Gratton
f1e92feae2 Allow determining when JS has finished loading in ClientWebView.
* src/client/components/client-web-view.vala (ClientWebView): Add
  is_content_loaded property and content_loaded signal, update and fire
  when getting a contentLoaded message from the WebProcess.

* ui/client-web-view.js: Fire the contentLoaded message when loading is
  complete. Add ClientPageStateTest test case to ensure it is working
  fine.

* test/client/components/client-web-view-test-case.vala
  (ClientWebViewTestCase::load_body_fixture): Use is_content_loaded
  rather than is_loading as the test for loading having finished, since
  we're actually interested in when the JS has finished loaded, not the
  resources.
2017-11-16 12:44:57 +11:00
Michael James Gratton
7ad97fb5d9 Handle font-family strings containing both single and double quotes.
Fixes a failing unit test with WebKitGTK 2.18.

* ui/composer-web-view.js (EditContext::init): Check for and strip both "
  and ' from start and end of font-family string.
2017-11-16 10:48:42 +11:00
Michael James Gratton
da15ebe3c0 Fix gnome-shell notifications missing an icon under flatpak. Bug 790103.
* icons: Rename application icons to match fully-qualified app name. Update
  references to the olde name with the fully-qualified app name.
2017-11-14 14:38:57 +11:00
Michael James Gratton
5520c10219 Allow passing addtional information when reporting engine errors.
* src/engine/api/geary-problem-report.vala: New problem enum,
  ProblemReport class and AccountProblemReport and ServiceProblemReport
  subclasses that encapsulate error, account and service information when
  reporting problems.

* src/engine/api/geary-account.vala (Account): Remove old Problem enum,
  make report_problem signal and related notify methods accept a
  ProblemReport instance instead. Reorganise protected methods a bit and
  update subclasses and signal handlers.

* src/client/components/main-window-info-bar.vala (MainWindowInfoBar):
  Substantially rework to handle ProblemReport instances via
  for_problem() constructor.

* src/engine/imap-db/outbox/smtp-outbox-folder.vala (SmtpOutboxFolder):
  Substantially rework error handling yet again to get some better
  ProblemReport instances being generated.
2017-11-14 00:37:43 +11:00
Michael James Gratton
80680f280e Add initial support for using Gtk.InfoBars to display errors.
* src/client/components/main-window-info-bar.vala (MainWindowInfoBar):
  New class and UI file for displaying an info bar in the main window, as
  well as providing a way to show technical informartion if needed.

* src/client/components/main-window.vala (MainWindow): Add a Gtk.Frame
  and container to hold inforbar instances. Show it when showing an
  infobar, and hide it when there are none. Add show_infobar() method to
  provide a cromulent way of adding info bars.

* src/client/application/geary-controller.vala (BaseObject): Rather than
  bailing out on an account when an error occurs, display an info bar
  instead.

* ui/geary.css: Style the info bar frame to only show a border between
  main content and the info bars.
2017-11-12 22:18:51 +11:00
Michael James Gratton
2a0fa4c746 Merge branch 'wip/771643-replace-intltool'. Fixes Bug 771643. 2017-11-02 19:15:08 +11:00
Michael James Gratton
97f880b190 Fix move and copy menu button ids in the main toolbar. 2017-11-02 19:09:30 +11:00
Michael James Gratton
ee567ed205 Restore Archive toolbar label.
* ui/main-toolbar.ui: Update min GTK version, add label to Archive button.
2017-11-02 19:09:30 +11:00
Niels De Graef
97ce3d09cd Start the final part of bug 713991.
* Ported Gtk.Action to GLib.Action in the GearyController.
* Removed Gtk.AccelGroups (handled through Gtk.Application now).
* Got rid of Gtk.UiManager (now all is done through Gtk.Builder).
* Throw away workaround for conflicting Gtk.Actions in ComposerContainer.
* Aggregate zoom in/out/normal into one parameterized zoom action.

Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-11-02 19:07:01 +11:00
Niels De Graef
bf7c2ec454 Use https:// by default for links
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-31 09:48:53 +11:00
Niels De Graef
7d15b746aa Use a horizontal icon row for message actions, bug 782931.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-31 09:48:53 +11:00
Michael James Gratton
610b2e3130 Fix move and copy menu button ids in the main toolbar. 2017-10-31 09:48:53 +11:00
Michael James Gratton
992e019b29 Restore Archive toolbar label.
* ui/main-toolbar.ui: Update min GTK version, add label to Archive button.
2017-10-31 09:48:53 +11:00
Niels De Graef
114ed09dda Start the final part of bug 713991.
* Ported Gtk.Action to GLib.Action in the GearyController.
* Removed Gtk.AccelGroups (handled through Gtk.Application now).
* Got rid of Gtk.UiManager (now all is done through Gtk.Builder).
* Throw away workaround for conflicting Gtk.Actions in ComposerContainer.
* Aggregate zoom in/out/normal into one parameterized zoom action.

Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-31 09:48:53 +11:00
Alex Henrie
5e55587e6d Remove nonfunctional "Try Again" button for saving sent emails. Bug 727679. 2017-10-26 18:03:56 +11:00
Niels De Graef
f283630569 Use https:// by default for links
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-20 16:06:40 +11:00
Niels De Graef
8969d175b2 Use a horizontal icon row for message actions, bug 782931.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-20 13:16:50 +11:00
Michael James Gratton
d9ad0dc7b2 Fix move and copy menu button ids in the main toolbar. 2017-10-18 16:02:17 +11:00
Michael James Gratton
29bff87864 Restore Archive toolbar label.
* ui/main-toolbar.ui: Update min GTK version, add label to Archive button.
2017-10-18 16:02:13 +11:00
Niels De Graef
1dddcebb92 Start the final part of bug 713991.
* Ported Gtk.Action to GLib.Action in the GearyController.
* Removed Gtk.AccelGroups (handled through Gtk.Application now).
* Got rid of Gtk.UiManager (now all is done through Gtk.Builder).
* Throw away workaround for conflicting Gtk.Actions in ComposerContainer.
* Aggregate zoom in/out/normal into one parameterized zoom action.

Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-18 16:00:50 +11:00
Michael James Gratton
bd7f2d1d4c Remove most of the remaining workarounds for earlier GTK versions. 2017-10-10 14:32:50 -07:00
Michael James Gratton
919aea1516 Make MainWindow and ComposerWindow uniquely targetable via CSS.
Fixes Bug 746590.
2017-03-06 13:20:16 +11:00
Michael James Gratton
57ca408c53 Fix composer UI brokenness when compiled under vala 0.36.
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.
2017-03-04 13:45:17 +11:00
Michael James Gratton
07966a1156 Fix crash when conversation scrolled window child changes.
This is a workaround for GTK+ Bug 778190.

* src/client/conversation-viewer/conversation-viewer.vala
  (ConversationViewer): Replace the whole conversation scrolled window
  when changing the conversation, not just the viewport.

* ui/conversation-viewer.ui: Remove the ScrolledWindow for now since we
  are constructing it manually.
2017-02-28 21:18:07 +11:00
Alex Henrie
f38f0d150d Rename archive/trash/delete actions to clearly be for conversations 2017-02-23 11:33:12 +11:00
Michael James Gratton
928189f36d Fix matching message subject not being highlighted in find/search.
Bug 778033

* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage::highlight_search_terms): Also check the subject
  for matching items and highlight if found.

* src/client/conversation-viewer/conversation-list-box.vala
  (ConversationListBox::EmailRow): Update matching row class to
  disambiguate from matching headers.

* ui/geary.css: Ensure matching subject labels get highlighted.
2017-02-23 11:33:12 +11:00
Michael James Gratton
b19d0c8cad Ensure mixed landscape/portrait attachment previews are centred vertically. 2017-02-16 08:44:44 +11:00
Michael James Gratton
dd3d604b6d Tidy up ConversationWebView's CSS a bit. 2017-02-08 00:31:25 +11:00
Michael James Gratton
fdde9b15a1 Prevent messages from setting a broken body height. Fixes Bug 750075.
* ui/conversation-web-view.css: Require body height to remain set to
  CSS's default value.
2017-02-08 00:30:48 +11:00
Michael James Gratton
d6ed3e3877 Ensure ClientWebView's preferred height is updated after doc load.
Should help/fix Bug 778025.

* ui/client-web-view.js (PageView::init): Also add a load handler to the
  window, to (strangely) catch the final load event on the
  document. Expand and correct comments a bit.
2017-02-08 00:28:46 +11:00
Michael James Gratton
96ffcdb608 Split composer web view up into multiple parts.
This lets us implement changing signatures and deleting bottom-quoted
messages without having to reload the whole view, and makes it possible
to target only the user's content when modifying for send, etc.

* src/client/composer/composer-web-view.vala (ComposerWebView): Move
  composer CSS into composer-web-view.css resource file, load it when
  loading JS resource and add it to the view's user content manager.
  (ComposerWebView::load_html): Split up body, signature and quote into a
  DIV container for each.
  (ComposerWebView::linkify_content): Replaced with ::clean_content,
  which will also tidy up internal markup before sending. Update call
  site and unit test.

* src/engine/rfc822/rfc822-utils.vala (Geary.RFC822.Utils): Remove some
  more obtrusive white space when sending replies/forwards.

* test/client/composer/composer-web-view-test.vala,
  test/js/composer-page-state-test.vala: Update tests to expect new HTML
  and text output from ComposerWebView and use of individual parts for
  composer markup.

* ui/composer-web-view.js (ComposerPageState): Replace messageBody
  property and uses with bodyPart, signaturePart and quotePart. Set these
  content-editable on load. Move listeners from messageBody back to the
  document.body so they also listen for events on the additional
  parts. Keep track of text cursor location within the parts and set a
  class if so, to work around the lack of :focus-inside support.
  (ComposerPageState::updateSignature): Implement by updating the inner
  content of the signature part.
  (ComposerPageState::deleteQuotedMessage): Implement by removing the
  quote part from the DOM tree.
  (ComposerPageState::containsAttachmentKeyword): Consider only the
  bodyPart when scanning for attachments, remove hacks for ignoring the
  signature any any quoted message.
  (ComposerPageState::linkifyContent): Mirror ClientWebView change and
  replace with ::cleanContent. Ensure existing parts have contenteditable
  and focus class removed, remove signature and quote parts if empty.
  (ComposerPageState::getHtml): Generate HTML using clones of the three
  parts, so we can rmeove contenteditable and focus classes without
  modifying the actual DOM.
  (ComposerPageState::selectionChanged): Update focus class on parts as
  needed.
2017-02-01 00:41:45 +11:00