Commit graph

2984 commits

Author SHA1 Message Date
Michael James Gratton
183da8bd3f Add ContentType.is_default and unit test. 2017-02-15 17:50:49 +11:00
Michael James Gratton
e3d708b8e6 Add ContentType methods for determining file name extenions and type sniffing.
* src/engine/mime/mime-content-type.vala (ContentType): Add ::guess_type
  and ::get_file_name_extension methods, unit tests.
2017-02-15 17:50:34 +11:00
Dušan Kazik
9014e46e42 Update Slovak translation 2017-02-12 14:07:55 +00:00
Marek Černocký
8044129731 Updated Czech translation 2017-02-11 11:07:42 +01:00
Michael James Gratton
4e27949d87 Fix editing additional email addresses from account prefs. Bug 778364.
* src/client/accounts/account-dialog-add-edit-pane.vala
  (AccountDialogAddEditPane): Pass an account id to edit_alternate_emails
  signal, not an email addess.

* src/client/accounts/account-dialog.vala
  (AccountDialog::get_account_info_for_email): Rename method to
  "get_account_info" and param since it actually accepts an account
  id. Update call sites.

* src/client/accounts/add-edit-page.vala (AddEditPage::id): Make RO
  access public, so the AddEditPane can access it.
2017-02-09 21:54:36 +11:00
Michael James Gratton
c1fb400e24 Fix segfault closing client after starting it without network access.
* src/client/conversation-list/conversation-list-view.vala
  (ConversationListView): Convert to using IdleManager for handling
  selection updating, reset it when widget is destroyed.
2017-02-09 10:56:45 +11:00
Michael James Gratton
31fbfd4047 Add IdleManager class for sane main loop idle scheduling. 2017-02-09 10:54:45 +11:00
Michael James Gratton
18fd246f53 Fix failing dev-daily PPA build.
* debian/rules: Prevent dh_auto_test from being run.
2017-02-09 09:09:26 +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
7608d160fe Make build and debian version reflect 0.12 on master.
Better late than never?
2017-02-07 21:54:39 +11:00
Michael James Gratton
b1493275e5 Report the branch & state rather than last tag in dev version string. 2017-02-07 21:52:48 +11:00
Gautier Pelloux-Prayer
86665944f6 Don't abort the application if password could not be saved in the secrets manager. Bug 776139 2017-02-07 14:08:11 +11:00
Michael James Gratton
b526b4c3eb Don't insert multiple blank lines in the composer. Bug 778125.
* src/client/composer/composer-web-view.vala
  (ComposerWebView::load_html): Remove spacers around cursor, just add
  them after body and inline quote if present. Update unit tests.
2017-02-07 12:09:29 +11:00
Michael James Gratton
b54220012d Update symbolic icon for 0.12.
* icons/hicolor/symbolic/apps/geary-symbolic.svg: New icon courtesy
  Stephen Michel <stephen.michel@tufts.edu>.
2017-02-07 10:55:32 +11:00
Gautier Pelloux-Prayer
d33febbc05 Don't merge emails if they do not share the same Message-ID. Bug 713530
In some cases, it may happen that a mail is being sent multiple times simultaneously
to the same recipient.
The only modified field being the Message-ID, we have to check it as well as
message's size before merging 2 mails together.
Otherwise, at each start-up Geary will try to fetch "missing mails" but will never
succeed to do so.
2017-02-07 10:37:10 +11:00
Gautier Pelloux-Prayer
330f897f8c Fix compilation for clang. Bug 778046 2017-02-06 22:36:11 +11:00
Rafael Fontenelle
37abad559a Update Brazilian Portuguese translation 2017-02-06 10:23:53 +00:00
Rafael Fontenelle
cc965b88cb Update Brazilian Portuguese translation 2017-02-06 10:23:27 +00:00
Piotr Drąg
514d7840a4 Update Polish translation 2017-02-05 16:29:37 +01:00
Michael James Gratton
2c00fe9a48 Add tooltips to composer spellcheck popover. 2017-02-05 15:28:02 +11:00
Michael James Gratton
9010eedd26 Remove libunique from INSALL command lines, seperate out Unity packages. 2017-02-05 15:28:02 +11:00
Mario Blättermann
1a3876d83f Update German translation 2017-02-04 18:41:24 +00:00
Michael James Gratton
29b5aa50e7 Fix configure whitespace, document VALADOC environment variable. 2017-02-02 15:41:45 +11:00
Michael James Gratton
8c4c1aefa9 Update configure script for compatibility with current unstable jhbuild. 2017-02-02 15:16:45 +11:00
Michael James Gratton
bac17b720b Mention dnf in INSTALL for Fedora, not yum. 2017-02-02 00:48:24 +11:00
Michael James Gratton
ba4863e45a Fix build on systems with vala <= 0.30.0
* src/client/application/geary-application.vala: Replace use of Version
  attr with Deprecated.
2017-02-02 00:47:01 +11:00
Michael James Gratton
bbb130105b Update distro information in INSTALL file for WK2. 2017-02-01 14:50:16 +11:00
Michael James Gratton
2a73478a8b Update package and version reqs for WebKit2 in INSTALL and deb control. 2017-02-01 14:34:31 +11:00
Michael James Gratton
29b339c87d Port to WebKit2. Bug 728002.
Merge branch 'bug/728002-webkit2'
2017-02-01 09:59:17 +11:00
Michael James Gratton
e8aa38f669 Explicitly allow loading only geary:body in ClientWebView. 2017-02-01 00:41:45 +11:00
Michael James Gratton
ac8a532557 Query Webview for supported image types instead of hardcoding them. 2017-02-01 00:41:45 +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
Michael James Gratton
96c16d8b78 Fix more issues hiding/showing collapsed quotes.
* ui/conversation-web-view.js
  (ConversationPageState::createControllableQuotes): Only add control
  buttons if the quote is controllable. Calculat the height difference up
  front, not in the control button's click handler, so the value is
  correct.
2017-02-01 00:41:45 +11:00
Michael James Gratton
97709785d7 Fix brown-paper-bag bug in Geary.JS::escape_string.
* src/engine/util/util-js.vala (Geary.JS): Correctly append escaped char
  to the string. Add unit tests.
2017-02-01 00:41:45 +11:00
Michael James Gratton
355e4d37c1 Make ClientWebView-based tests execute a bit faster.
* test/client/components/client-web-view-test.vala: New explicit tests
  for init'ing the WebContext and loading default resources.

* test/client/components/client-web-view-test-case.vala:
  Init the WebContext and load resources in the constructor rather than
  fixture setup, so it only happens once per suite, not once per
  test. Update subclasses to do same.

* test/client/composer/composer-web-view-test.vala: Add an explicit test
  for loading ComposerWebView resources.
2017-02-01 00:41:45 +11:00
Michael James Gratton
998fe70554 Update some test code attributions. 2017-02-01 00:41:45 +11:00
Michael James Gratton
d56b1c7f3b Don't build and run tests by default.
* CMakeLists.txt: Remove tests from default target list.

* test/CMakeLists.txt: Don't depend on the client executable, just the
  resources file.
2017-02-01 00:41:45 +11:00
Michael James Gratton
67762f22cb Really fix JS error calling ComposerWebView::save_selection.
* ui/composer-web-view.js: Increment must be in brackets.
2017-02-01 00:41:45 +11:00
Michael James Gratton
4f33fb288a Fix some more issues on earlier GTK versions.
* src/client/composer/composer-link-popover.vala:
  Gtk.Popover::set_default_widget is only available in GTK+ 3.18,
  Gtk.Widget::set_tooltop_text param can't be null in earlier GTK vala
  bindings.
2017-02-01 00:41:45 +11:00
Michael James Gratton
d41e74ffe3 Fix some compilation issues on older vala/gcc/GTK+ setups.
* src/client/composer/composer-link-popover.vala (ComposerLinkPopover):
  Replace calls to GTK 3.22-specific ::popdown() with ::hide().

* src/engine/util/util-js.vala (Geary.JS): Replace '\v' literal,
  unsupported on at least valac 0.30.1 and gcc 5.4, with ordinal equiv.
2017-02-01 00:41:45 +11:00
Michael James Gratton
d74fcd2e2c Fix conversation message not shrinking when collapsing quotes.
* ui/conversation-web-view.js (ConversationPageState::createControllableQuotes):
  Since WK does not want to seem to reduce the value of offsetHeight for
  the HTML element when a quote is collapsed, calculate the difference
  and manually update the preferred height.

* ui/client-web-view.js (PageState::updatePreferredHeight): Allow the new
  preferred height to be passed in as a param.
2017-02-01 00:41:45 +11:00
Michael James Gratton
8bf68bd345 ComposerLinkPopover UI polish.
* src/client/composer/composer-link-popover.vala
  (ComposerLinkPopover::show): Focus URL entry on being shown.

* ui/composer-link-popover.ui: Replace URL entry text label with an
  accessibility name. Refine the tooltip for the insert button, add notes
  to translators about it.
2017-02-01 00:41:45 +11:00
Michael James Gratton
5163b5198d Stop the insert link popover being dismissed when selecting text.
* src/client/composer/composer-web-view.vala (ComposerWebView): Add
  ::save_selection and ::free_selection to allow the selection to be
  saved when inserting a link. Thunk calls to JS.
  (ComposerWebView::insert_link): Add selection id param, pass through to
  JS.

* src/client/composer/composer-widget.vala
  (ComposerWidget::new_link_popover): Manage saving the editor's
  selection, passing its id when inserting a link, freeing it
  again. Convert into an async method so we can wait for the selection id
  to get back from the WebProcess, update call sites.
  (ComposerWidget::on_insert_link): Disconnect and reconnect selection
  changed signal so the popover isn't dismissed when the selection does
  change/

* ui/composer-web-view.js (ComposerPageState): Implement new
  ::saveSelection, ::freeSelection and selectionId param on ::insertLink.
2017-02-01 00:41:45 +11:00
Michael James Gratton
7f75a7e944 Fix messages with "html { height: 100%; }" set getting 1px-high views.
Partially reverts commit d4e2b84.

* ui/conversation-web-view.css: Reinstate triggering CSS 2.1 §
  10.6.7. for the HTML element.
2017-02-01 00:41:45 +11:00
Michael James Gratton
5624269386 Ensure strings passed to WebProcess via JS get escaped.
* src/client/components/client-web-view.vala (ClientWebView): Add ::call
  method that takes a Callable object. Replace all existing uses of
  ::run_javascript with that.

* src/engine/util/util-js.vala (Geary.JS): Add ::escape_string function,
  Callable object for constructing safe, well-formed JS calls.
2017-02-01 00:41:45 +11:00
Michael James Gratton
c1ceaa9868 Clamp ConversationWebView height again to avoid crashes displaying large images. 2017-02-01 00:41:44 +11:00
Michael James Gratton
3e203a9c19 Set a specific disk cache dir for the web process.
* src/client/application/geary-controller.vala
  (GearyController::open_async): Pass new cache dir through to
  ClientWebView::init_web_context. Update avatar cache dir name to remove
  redundancy.

* src/client/components/client-web-view.vala
  (ClientWebView::init_web_context): Add additional cache dir para and
  update call sites. Use to construct a WebsiteDataManager
  instance. Construct a new WebContext using the data manager, and use
  that instead of the default one when creating new ClientWebView
  instances.
2017-02-01 00:41:44 +11:00
Michael James Gratton
7135f3b2fb Make embedded composer scrolling resebmle something closer to 0.11's.
* src/client/composer/composer-embed.vala: Use scroll events captured on
  the composer to manage the height of the composer, and forward through
  to the conversation viewer's scrolled window and the editor as
  needed. Remove code dependent on the editor having a scrolled
  window (it doesn't) or access to the DOM (we don't).
2017-02-01 00:41:44 +11:00