Commit graph

23 commits

Author SHA1 Message Date
Michael James Gratton
3a3b5d0bff Rename some JS methods to be more vala-esque. 2017-02-01 00:41:43 +11:00
Michael James Gratton
26fe139e97 Initial pass at getting the HTML document's height from the web process.
* bindings/vapi/javascriptcore-4.0.vapi: Add some methods to
  GlobalContext for accessing JSValues as ints.

* src/client/components/client-web-view.vala
  (ClientWebView): Hook up UserContentManager script messages handler and
  handler implementation for "preferredHeightChanged", update the new
  preferred_height prop on the class, and queue a resize. Hook those
  values up to the GTK allocation machinery.
  (ClientWebView::get_int_result): Convenience method for getting an int
  from a JavascriptResult.
  (ClientWebView::get_preferred_height): Report back values as reported
  by messages from the script handler.
  (ClientWebView::register_message_handler): Convenience method for
  registering script messages handlers.

* src/client/conversation-viewer/conversation-web-view.vala
  (ConversationWebView): Remove now-redundant GTK allocation machinery.

* ui/client-web-view.js: Post a message to preferredHeightChanged when
  the page is sorta-kinda loaded.
2017-02-01 00:41:43 +11:00
Michael James Gratton
f51f55cd78 Depend on javascriptcore, generate webkit2 VAPI that uses it.
This gives us a means of using JS objects returned by UserContentManager
script messages directly from Vala.

* bindings/metadata/WebKit2-4.0.metadata: Tweak standard webkit2 VAPI to
  re-include methods that return javascriptcore objects.

* bindings/vapi/javascriptcore-4.0.vapi: Copy generated VAPI file into
  the tree, customise it so that it actually works.

* src/CMakeLists.txt: Generate the custom webkit2 VAPI, depend on
  javascriptcore and include in-tree javascriptcore VAPI in the client
  build.

* bindings/metadata/JSCore-3.0.metadata: Remove obsolete file.
2017-02-01 00:41:43 +11:00
Michael James Gratton
8c22ce6727 Fix warning/crash when libnotify enabled and server is not present. Bug 768911.
* src/client/notification/libnotify.vala (Libnotify): Allow for the
  server capabilities being null.
2016-07-18 22:13:32 +10:00
Michael James Gratton
f10f898ab0 Always use UTF-8 for encoding non-ASCII/ISO-8859-1 headers. Bug 753870.
While message bodies are always sent as UTF-8, non ASCII/ISO-8859-1
headers were being encoded using GMime's default heuristics. This
uses some less-well-supported charsets and causing some rendering
issues in other less tolerant client.

Since we assume UTF-8 support for the body, assume it for headers as
well.

* src/engine/rfc822/rfc822.vala (Geary.RFC822.init): Set GMime user
  charsets to UTF-8.

* bindings/vapi/gmime-2.6.vapi (GMime): Fix binding for
  g_mime_set_user_charsets.
2016-06-30 15:29:39 +10:00
Leonardo Robol
cae4b443c6 Added support to change the spell-checking language.
Bug 720335

* src/client/composer/spell-check-popover.vala
  Implemented a GtkPopover allowing the user to select a
  subset of the currently installed dictionaries for the spell
  checking in the composer widget.

* src/client/util/util-international-vala
  Added detection of installed dictionaries and proper
  translation of the available languages. This requires
  Enchant as an additional dependency.

* src/client/application/geary-config.vala
  Added keys spell-check-visible-languages and
  spell-check-languages in GSettings.
2016-06-09 15:36:39 +10:00
Adam Dingle
654e513f9c Transfer Yorba copyrights to Software Freedom Conservancy 2016-05-06 08:33:37 -04:00
Jim Nelson
29448cab65 Update copyright to 2015 2015-02-06 12:43:33 -08:00
Jim Nelson
695426c1cb Remove Unity bindings: Bug #713092 2014-10-09 14:06:22 -07:00
Jim Nelson
f1c75fc465 Patch major memory leak due to GMime bindings
Discovered a few binding problems while working on another issue,
in particular gmime_parser_construct_message()'s return object
not being freed, which can hold an entire message (attachments and
all) in memory.
2014-07-30 19:02:11 -07:00
Jim Nelson
0eb0a2d6e6 Some date-related fixes 2014-05-12 15:44:22 -07:00
Jim Nelson
dc1445d6f0 Update copyrights to 2014: Closes bgo#722381 2014-02-04 19:01:09 -08:00
Charles Lindsay
cf8679e9b7 Get rid of unused bindings
Closes: bgo #722376
2014-01-17 14:31:15 -08:00
Jim Nelson
7c7c4fec02 Fix memory leaks due to GMime bindings
Includes regen'd VAPI.
2014-01-06 17:59:10 -08:00
Jim Nelson
e29a9c801a Convert all MIME handling to Engine classes: Closes #6530
We've had numerous bugs due to improper MIME comparisons and dealing
with Content-Type and Content-Disposition (or their lack of presence
in a message).  Now the Engine offers MIME classes that better deal
with these issues without exporting the GMime structures, which
are not as easy to manage and don't offer some of the things that
have bitten us in the past (such as case-insensitive comparisons).
2013-11-15 17:39:00 -08:00
Jim Nelson
eed221bf3a Can't bld w/ Vala 0.22.1 WebKitGTK 2.2.2: Closes #7694, Closes #7695
Two problems:

(a) Vala 0.22.1 fixes a binding change in libnotify
that has to be fixed but causes Geary to be unable to build on prior
versions of Vala.  libnotify.vapi added to solve this problem.

(b) New version of Vala appears to be more sensitive to detecting
problems in .gir files.  Using our .metadata file to paper over these
issues in WebKit-3.0.gir.
2013-11-15 16:53:18 -08:00
Jim Nelson
9a8f96310c Save inline images displayed via MIME Content-ID: Closes #7475
Some reorganization of how data: URIs are assembled and injected
into the document.

Also, mild improvement to the GMime bindings.
2013-09-11 19:21:44 -07:00
Robert Schroll
844963ed0e Forward attached emails properly: Closes #6842
This fix required adapting a filter from GMime, which is also
licensed LGPL 2.1.  A GMime VAPI change was also required.
2013-05-13 16:24:11 -07:00
Eric Gregory
ddbd4c7213 Closes #5745 libgee 0.8 2013-04-24 12:22:32 -07:00
Charles Lindsay
910e1c3d0b Update copyright headers; fix #6195
Also removing the erroneous space that had crept in at the end of the
line in most of our header comments.
2013-04-12 12:32:39 -07:00
Eric Gregory
c7618b3cf0 Closes #5549 Closes #5813 Closes #5633 Port to LibSecret (ssh!) 2013-04-10 18:28:59 -07:00
Jim Nelson
667e2dcf32 Fix Gmime bindings: Closes #6582 2013-03-16 16:19:25 -07:00
Eric Gregory
3467c72035 Closes #6209 Precise support for GIR WebKitGTK binding. Rolls back to deprecated context menu in composer for compatibility with WebKitGTK 1.8
Squashed commit of the following:

commit 6e066374da45dd602ee1ca3c9bc5f77b9411b6f4
Author: Eric Gregory <eric@yorba.org>
Date:   Tue Jan 15 11:36:32 2013 -0800

    Closes #6209 Precise support for GIR WebKitGTK binding. Rolls back to deprecated context menu in composer for compatibility with WebKitGTK 1.8
2013-01-15 13:04:30 -08:00