Commit graph

3331 commits

Author SHA1 Message Date
Kristjan SCHMIDT
2ca4a4d5b4 Update Esperanto translation 2017-12-23 01:48:35 +00:00
Dušan Kazik
e334fa44f8 Update Slovak translation 2017-12-21 19:52:21 +00:00
Emin Tufan Çetin
e6aa0a8562 Update Turkish translation 2017-12-18 17:06:30 +00:00
Michael James Gratton
6b88f82019 Use the Gtk.ShortcutsWindow as the sole shortcut help.
Now that we are requiring at least GTK+ 3.22, we can remove the shortcuts
help from the manual so we aren't duplicating the information with the
Gtk.ShortcutsWindow.
2017-12-18 16:00:14 +11:00
Michael James Gratton
bdb41996c8 Enable engine tests by default for building the deb package. 2017-12-18 14:49:04 +11:00
Michael James Gratton
6097b0a78f Mark Geary.Logging log calls as printf-format, fix the resulting issues. 2017-12-18 14:49:04 +11:00
Michael James Gratton
c371b91340 Clean up engine logging API a bit.
Also fixes debug logging under the Meson build.

* src/engine/api/geary-logging.vala (Logging): Use a domain for engine
  logging calls. Make Flag.NONE explicitly set to 0 so it's obvious what
  is happening in the code. Don't set up any handlers at all - this is
  something the application should be doing. Rename on_log() to
  default_handler() and make it public so that application can use the
  engine's logger if they want.

* src/client/application/geary-application.vala (Application): Install
  the engine's default handler after init'ing logging — needed to fix
  logging under Meson, use stderr for logging until command-line
  arguments have been processed.

* src/client/application/geary-args.vala: Stop using stderr for logging
  if --debug arg was not set.
2017-12-18 14:49:04 +11:00
Michael James Gratton
147dd8e4c0 Fix target GLib version in Meson build. 2017-12-18 14:49:04 +11:00
Michael James Gratton
fc880442f5 Update Meson build to also build separate engine and client tests.
* src/engine/meson.build: Add some ugly hacks to both build the internal
  VAPI and work around a valac bug to ensure the internal VAPI correctly
  references the internal header, not the public header.

* test/meson.build: Split the test suite build into test-engine and
  test-client.
2017-12-18 14:49:04 +11:00
Michael James Gratton
a972236bb2 Update WebKit and JSC dependencies in Meson build.
* bindings/meson.build: Declare a dependency for JSC that includes both
  the lib, VAPI and appropriate build directory. Update WK dependencies
  to reflect the same that their pkg-config files currently do, sort.

* meson.build: Rename top-level JSC deps to make it clear what they are
  for.

* src/engine/meson.build: Depend on JSC rather than WK, sort deps.
2017-12-18 14:49:04 +11:00
Michael James Gratton
3c436db0e1 Substantially clean up source and API for main Conversation-related classes. 2017-12-18 14:49:04 +11:00
Michael James Gratton
013a2f9722 De-duplicate email removal code in ConversationSet.
* src/engine/app/conversation-monitor/app-conversation-set.vala
  (ConversationSet.remove_emails_and_check_in_folder_async): Removed in
  favour of remove_all_emails_by_identifier. Move
  check_conversation(s)_in_folder_async to ConversationMonitor so
  all ConversationSet operations are synchronised and side-effect free.

* src/engine/app/app-conversation-monitor.vala (ConversationMonitor):
  Merge check_conversation(s)_in_folder_async calls together and
  simplify. Call ConversationSet.remove_all_emails_by_identifier and
  manually check for and integrated evaporated conversations.
2017-12-18 14:49:04 +11:00
Michael James Gratton
f66733a739 Wire ConversationMonitor to Account signals now that Conversations aren't.
Since Conversation instances no longer listen to Account signals to keep
its email paths updated and to fire email_flags_changed, it needs the
ConversationMonitor to do this for it.

* src/engine/app/app-conversation-monitor.vala (ConversationMonitor):
  Listen to the email appended/inserted/removed signals on the monitor's
  Account and launch the appropriate operations when triggered.
  (ConversationMonitor.remove_emails_async): Require a source folder to
  be passed in so we know which folder should be removed from an email's
  paths in a conversation.
  (ConversationMonitor.notify_email_flags_changed): Also fire the signal
  on the target conversation.

* src/engine/app/conversation-monitor/app-remove-operation.vala
  (RemoveOperation): Pass a source folder to the operation so it can be
  forwarded on to ConversationMonitor.remove_emails_async and used for
  both removing an email both from the base folder, but also from other
  folders.
2017-12-18 14:49:04 +11:00
Michael James Gratton
5856a1d288 Allow updating Conversation email paths by via ConversationSet.
* src/engine/app/conversation-monitor/app-conversation-set.vala
  (ConversationSet.add_email): Check to see if the email already exists
  in the conversation, and if so merge its paths rather than just
  returning.
  (ConversationSet.merge_conversations_async): Simplify removing
  conversations to be merged rather than manually handling it, meaning
  email will be unconditionally removed rather than potentially being
  conditionally removed via remove_all_emails_by_identifier.
  (ConversationSet.remove_email_by_identifier): Simply update an email's
  paths in the conversation if it has more than one, rather than removing
  it.
2017-12-18 14:49:04 +11:00
Michael James Gratton
5c1aecb685 Make Geary.App.ConversationSet unit testable, add unit tests.
* src/engine/app/conversation-monitor/app-conversation-set.vala
  (ConversationSet.add_all_emails_async): Replace monitor arg with a
  multiset of email paths, update call site to do the path lookup on the
  caller's side instead. Add unit tests.
  (ConversationSet.merge_conversations_async): Remove monitor arg with a
  multiset of email paths, get paths for emails to be merged from the
  conversations themselves, since they should be up to date.
  (Conversation.remove_all_emails_by_identifier): Add unit tests.
2017-12-18 14:49:04 +11:00
Michael James Gratton
57f40ffec3 Make Geary.App.Conversation unit testable, add some tests.
* src/engine/app/app-conversation.vala (Conversation): We currently can't
  easily unit test Conversation instances since the ctor requires a
  ConversationMonitor argument, which is complicated. Replace the monitor
  arg with a base folder (which is what it actually needs the monitor for
  anyway) and remove the signals in favour of adding and modifying the
  API to allow folder paths to be explicitly updated. Remove
  clear_owner() method and dtor now it's useless. Update call sites. Add
  unit tests to make sure the add/remove and multi-path related code
  still works at least.
2017-12-18 14:49:04 +11:00
Michael James Gratton
0f3aa9dc11 Add some useful Engine API mock objects. 2017-12-18 14:49:04 +11:00
Michael James Gratton
878b9aacae Split test running up into test-engine and test-client.
This allows us to compile the engine tests against the internal VAPI, so
we can unit test internal classes.

* CMakeLists.txt: Add top-level targets test-engine-run and
  test-client-run that execute the respective test binaries. Make
  the tests target depend on them and make them depend on their
  binaries.

* Makefile.in: Add test-client and test-engin targets for convenience.

* src/CMakeLists.txt: Make the right invocation of valac to generate a
  correct geary-engine-internal.vapi. Make gsettings schema generation
  depend on geary-client so it exists for test-client if the main binary
  hasn't been built.

* test/CMakeLists.txt: Split everything up into to builds, one for
  test-engine and the other for test-client. Use geary-engine-internal
  when building test-engine for access to internal classes and members.

* test/engine/util-idle-manager-test.vala,
  test/engine/util-timeout-manager-test.vala: Use Glib MainContext rather
  than the GTK main loop for pumping events so the test cases compile
  without GTK.

* test/test-engine.vala, test/test-client.vala: New main source file for
  test binaries based on old main.vala.
2017-12-18 14:49:04 +11:00
Piotr Drąg
df887170c0 Update Polish translation 2017-12-17 17:51:53 +01:00
Kukuh Syafaat
9eaeec9e93 Update Indonesian translation 2017-12-17 08:07:13 +00:00
Stas Solovey
ad2c4854a6 Update Russian translation
(cherry picked from commit 31069b3fcd6608fe6270dc77bf0556e554a62f2f)
2017-12-15 10:48:33 +00:00
Michael James Gratton
aba9be0d94 Add some more debian build cruft to .gitignore. 2017-12-14 09:54:54 +11:00
Michael James Gratton
e6c106dbb6 Brown-paper-bag fix for debian/rules. 2017-12-14 09:52:43 +11:00
Michael James Gratton
2ce6d98c53 Add a note about vala pre-processor symbol definitions. 2017-12-14 09:44:33 +11:00
Michael James Gratton
f020791935 Revert "Treat POODLE and REF_TRACKING defines per others in Meson build."
This reverts commit c25f254de8.
2017-12-14 09:44:33 +11:00
Carlos Abel Córdova Sáenz
385e86a106 Update Spanish translation 2017-12-13 14:24:33 +00:00
Michael James Gratton
63acd52d78 Update deb package config to use meson build.
* debian/control: Replace cmake with meson, gnome-doc-utils with itstool,
  sort depends lists.

* debian/rules: Updated to use meson and ninja.
2017-12-13 15:09:59 +11:00
Michael James Gratton
b41d4b3343 Fix issues with Meson build when installed.
* src/client/meson.build,
  src/engine/meson.build,
  src/sqlite3-unicodesn/meson.build: Build static libraries so they can
  be found when installed.

* src/meson.build: Include GResources in the binary now we are compiling
  static libraries, so the resources can be found when compiled.
2017-12-13 15:07:11 +11:00
Michael James Gratton
272417b2c6 Merge branch 'wip/714921-composer-lists'. Fixes Bug 714921. 2017-12-12 23:39:27 +11:00
Michael James Gratton
27fbd06c55 Add new icons to Meson build. 2017-12-12 23:32:43 +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
Michael James Gratton
2642119c3b Add RTL versions of list icons. 2017-12-12 23:32:43 +11:00
Michael James Gratton
12cea4eb93 Convert ordered list icon use paths for text, increase number size. 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
473a0b8859 Fix some warnings showing up when compiling under Meson. 2017-12-12 15:56:31 +11:00
Michael James Gratton
ee28f153e4 Ensure console and mailer are built w/ same args as client under Meson. 2017-12-12 15:56:31 +11:00
Michael James Gratton
c25f254de8 Treat POODLE and REF_TRACKING defines per others in Meson build. 2017-12-12 15:56:31 +11:00
Michael James Gratton
a38a450ae5 Fix compiling tests under Meson.
* test/meson.build: Client tests need both the complied GSettings schema
  and GResources, also common Geary compilation arguments.
2017-12-12 15:56:31 +11:00
Michael James Gratton
763ccd2f7c Fix compiling and using GSettings schema when built by Meson.
* desktop/meson.build: Make sure the schema is re-compiled with the
  source XML changes.

* meson.build: Make compiling the schema mandatory, since both running
  the client locally and unit tests require it. Fix path to compiled
  schema so the client can find it.
2017-12-12 15:56:31 +11:00
Michael James Gratton
afb236517f Fix meson build when libmessaging-menu is available.
Since libmessaging-menu has a either a broken pkg_config file or a dumb
VAPI name, we need to detect the library and the VAPI in two steps, then
add them both as dependencies.
2017-12-12 15:56:31 +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
b627fd4fc6 Fix another avatar-related critical.
* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage.load_avatar): We are very occasionally getting
  crashes calling Gtk.Image.get_pixel_size() due to the image is null -
  maybe a race? This obviates the problem by hard-coding the size instead
  of dynamically getting it.
2017-12-08 00:00:48 +11:00
Michael James Gratton
b2f0ecab1b Merge branch 'wip/778720-soup-avatar-crash'. Fixes Bug 778720. 2017-12-05 15:06:00 +11:00
Michael James Gratton
923db7c91b Improve ImapDB.Folder debug logging for duplicate search field check. 2017-12-05 15:00:01 +11:00
Michael James Gratton
8afca7fb2e Fix a critical error invoking popup on conversation list.
* src/client/conversation-list/conversation-list-view.vala,
  src/client/conversation-viewer/conversation-message.vala,
  src/client/sidebar/sidebar-tree.vala (TreeView): Use
  Gtk.Menu.popup_at_pointer() rather than deprecated popup() method.

* src/client/util/util-gtk.vala (GtkUtil): Remove unused menu-related
  code.
2017-12-05 14:34:48 +11:00
Michael James Gratton
b6980a2f37 Allow email address with "localhost" as the domain part. Fixes Bug 714299. 2017-12-04 16:42:04 +11:00
Michael James Gratton
bbbded81df Work around ongoing crashes in SoupCache when loading avatars.
This ensures that only a single request for a resource is made at once,
to work around crashes in SoupCache when multiple requests for the same
resource.

Hopefully fixes Bug 778720 once and for all.

* src/client/conversation-viewer/conversation-list-box.vala
  (ConversationListBox): Add new AvatarStore class and internal
  AvatarLoader class to manage avatar loads for the
  conversation. Construct an instance of the store in the
  constructor and pass it to ConversationEmail::start_loading so its
  messages can use it for loading their sender avatars. Update call
  sites.

* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage::load_avatar): Add AvatarLoader param for loading
  avatars, use that rather than making the Soup calls directly. Update
  call sites.
2017-12-04 11:00:25 +11:00
Kukuh Syafaat
735c53085c Update Indonesian translation 2017-12-03 08:41:20 +00:00
Michael James Gratton
9a89d7e037 Fix Flatpak build.
* org.gnome.Geary.json: Add libunwind dep, point libgee back to master
  while we're here.
2017-12-02 22:10:36 +11:00