Commit graph

70 commits

Author SHA1 Message Date
Niels De Graef
6ce2373a75 Create a config.vapi for config.h
Currently, a lot of our build variables that are defined at
configuration time, are spread out across the code base, often declared
as `extern` which can break when moving around sections of the code
across files.

This commit introduces a "Config" namespace which basically maps to the
definitions in `config.h`, but allows us to properly access them too
from the Vala source code.

By doing so, it helps us to more explicitly see where we rely on a
build variable from this file (which should be obvious from the `Config'
namespace).

To make it ourselves a bit easier in Meson too, we can declare an
internal dependency, which helps ensure that we pull in the dependency
where needed.
2025-12-07 01:32:32 +01:00
Jeremy Bicha
dcb1ee40b3 Support GNOME 42 dark theme preference 2025-06-09 21:12:02 +02:00
Balló György
e91606b25b Set prgname to application ID
Using the application ID ensures that Wayland compositors could match the
window with the application and show the appropriate icon for them.
2024-09-03 16:50:08 +00:00
Cédric Bellegarde
533a32e67b client: conversation-list: Migrate from TreeView to ListBox
- Replace ConversationListStore with ConversationListModel
- Replace GtkTreeView with GtkListBox
- Implement proper multiselection for ListBox
- Rework navigation to be touch friendly

Fork of John Renner <john@jrenner.net> merge request !698
2023-03-04 23:16:01 +00:00
Cédric Bellegarde
31f79816e8 client: Add support for Background portal 2022-08-25 21:50:28 +00:00
Cédric Bellegarde
522cd43fe7 client: Remove deprecated hidden option 2022-08-25 21:50:28 +00:00
Cédric Bellegarde
786a9df536 client: startup notifications is a freedesktop.org concept
Do not use the same wording for our background mode
2022-08-25 21:50:28 +00:00
Cédric Bellegarde
f910b82a63 client: Running as a service does not mean running in the background indefinitely
This is wrong as Geary is mostly started via D-Bus activation: it will never quit.

Ignore --hidden option, it will be removed soon.

Fix #728
2022-08-25 21:50:28 +00:00
Rico Tzschichholz
9bd4c82952 Fix accessibility issues with initializer of constants 2021-11-30 15:31:31 +01:00
Michael Gratton
43c2fa4342 Merge branch 'update-libhandy' into 'mainline'
Update libhandy

Closes #305

See merge request GNOME/geary!622
2021-04-03 23:16:00 +00:00
Michael Gratton
75d770472a client: Update copyright in UI for 2021 2021-03-03 21:18:20 +11:00
Michał Kopeć
6caf26b15a Enable activating Gtk.ListBox items using XF86Forward and Alt+Right 2021-02-24 01:08:33 +01:00
Jeremias Ortega
c524e17798
application-client: Check for null when getting os info
This caused a crash in the inspector system view when the os info wasn't
available.

Related to https://gitlab.gnome.org/GNOME/geary/-/issues/1123
2021-01-30 18:38:43 -06:00
Yuri Edward
b815ddf370 Removed hack/workarround for libhandy issue #305 2021-01-09 22:24:43 +01:00
Michael Gratton
7ec99e1f6b client: Implement showing window menu when F10 pressed
Fixes #1102
2021-01-08 09:34:27 +11:00
Michael Gratton
368a0ced97 Application.Client: Ensure non-release builds don't clobber release data
Append the build profile to Geary's data directories when not running
a release build (or under Flatpak) so that e.g. development builds use
different config, cache and data directories.

This allows us to perform things like database schema updates with
relative abandon, since if we ask people to test development builds
with schema updates, they can always safely go back to their release
builds again.
2020-10-14 09:21:34 +11:00
Michael Gratton
99fc14a4e5 Application.Client: Introduce and use consts for build profiles 2020-10-14 09:21:34 +11:00
Michael Gratton
072156096d Application.Client: Support determining if running under flatpak 2020-10-14 09:21:34 +11:00
Michael Gratton
9658e9e3b4 Geary.Controller: Migrate release config if needed
If the current config directory is empty, go looking for config data
in other well known locations and if found, copy it all across from
the most recently modified directory.

This supports migrating config from non-Flatpak to Flatpak locations,
and release config to devel profile locations.

Fixes #326
2020-10-14 09:21:34 +11:00
Michael Gratton
468ea6df58 Application.Client: Rename app user dirs to home dirs 2020-10-14 09:21:34 +11:00
Michael Gratton
2357f8fd01 Merge branch 'mjog/default-development-build' into 'mainline'
Set default build profile to development

See merge request GNOME/geary!597
2020-10-13 08:00:26 +00:00
Michael Gratton
0010550ad6 Application.Client: Work around libhandy bug when opening main windows
GNOME/libhandy#305
2020-10-12 23:24:10 +11:00
Michael Gratton
456b6cd55a Application.Client: Sort external const alphabetically 2020-10-03 23:34:31 +10:00
Michael Gratton
2983990eca Application.Client: Ensure DB log messages show up in the inspector
Stop suppressing the db's logging domain by default for the moment.
2020-09-05 13:25:41 +10:00
Michael Gratton
369b1f1a4d Composer.Widget: Split email body editing code out into separate widget
Create a new Composer.Editor widget and move all body web view and
action bar related code from the main widget there.

This helps to clearly delineate concerns of the two classes, it
substantially reduces the complexity of the main widget, and should
reduce the odds of further breakage like that fixed by the previous
commit less likely in the future.
2020-08-28 18:25:58 +10:00
Michael Gratton
23f960f861 Application.Client: Fix blank composers being opened with wrong account
Fixes #936
2020-08-23 17:44:15 +10:00
Michael Gratton
d239cf4be4 Merge branch 'mjog/800-drop-lsb-release' into 'mainline'
Application.Client: Use GLib rather than lsb-release for OS info

Closes #800

See merge request GNOME/geary!554
2020-08-22 01:21:26 +00:00
Michael Gratton
591046ecee Application.Client: Use GLib rather than lsb-release for OS info
Use `g_get_os_info()` instead of exec'ing lsb-release, bump min GLib
version req to ensure we have the function available.

Fixes #800
2020-08-22 10:47:46 +10:00
Michael Gratton
20c4402bef Application.Client: Prevent app modal dialogs blocking inspector windows
Fixes #932
2020-08-22 10:27:06 +10:00
Michael Gratton
b8ed6ed230 Merge branch 'mjog/930-nightly-missing-shortcuts' into 'mainline'
Application.Client: Explicitly set a GApplication resource base path

Closes #930

See merge request GNOME/geary!552
2020-08-21 02:44:36 +00:00
Michael Gratton
519c8633e6 Application.Client: Explicitly set a GApplication resource base path
Set the resource base path to be the expected path so that when running
devel or beta builds (ones that have different app ids), the keyboard
shortcut UI file is still found.

Fixes #930
2020-08-21 10:36:58 +10:00
Michael Gratton
8f278e3e03 Application.Client: Fix criticals when opening first new window
If there is no existing window, then `current` will be null.
2020-08-20 11:34:57 +10:00
Michael Gratton
5b097c3076 client: Port client codebase to handy-1 2020-08-18 22:20:23 +10:00
Michael Gratton
b8bbe53425 Application, Plugin: Make object conversion methods consistent.
Publicly, get objects for a variant rather than from it since we're
not actually getting the objects from the variant, just looking them
up using the variant as an id.

Internally, use `to_` rather than `get_` when converting between plugin
and engine objects, since its typically just a cast or a lookup to do
so.
2020-08-18 16:32:26 +10:00
Michael Gratton
c57ae854bd Application.Controller: Rework composer life-cycle, again
Since plugins especially require the ability to customise a composer
ideally before presenting it, split up composer construction into two
phases: `compose_blah` methods that find a matching composer or
constructa new one, then `present_composer` to present it.
Add `composer_registered` and `composer_deregistered` signals, fired
as appropriate so other code paths (again, plugins in particular) can
hook into composer lifecycles.

Update call sites for new API and to explicitly present new composers.
2020-08-18 16:32:26 +10:00
Michael Gratton
f3e6feb887 Application.PluginManager: Rework context state management
Introduce new PluginGlobals and PluginContext to encapsulate global and
per-context state, respectively. Pass these objects to various plugin
interface implementations instead of doling it out piecemeal.
2020-08-18 16:32:26 +10:00
Michael Gratton
aac59ec53b Application.Controller, Composer.Widget: Clean up composer construction
Clean up and simplify how composers are constructed. Ensure all
composers are constructed via Application.Composer. Provide a set of
APIs for constructing different kinds of composers with minimal
parameters, rather than having one method with eleventy different
parameters.

Mirror API changes in Composer.Widget by splitting `load` method up
into a method for each different composer type. Clean up internals a
bit as a result. Rename `ComposeType` enum and its values to
`ContextType` to better reflect what it does.
2020-04-21 16:22:55 +10:00
Michael Gratton
a98f953237 Application.Client: Use plugin variant formats for app actions
Expect the same variant format for the `show-folder` and `show-email`
application actions. Use existing email and folder store factory
lookup methods for these. Update DesktopNotifications plugin to simply
pass variant values from plugin classes through to notifications.
2020-04-20 10:53:27 +10:00
Michael Gratton
5ce6517b3b Geary.Logging: Add/update API docs for the package and a few functions 2020-04-17 08:59:00 +10:00
Michael Gratton
834b6eb4bf Geary.Db: Disable SQL query logging by default again
Even just logging SQL queries is extremely verbose, and pushes a lot
of logging messages off the end of the buffer. So rework result logging
flag and code to apply to both again.

Re-merge Application.Client's SQL logging command line flags back into
one again.
2020-04-17 08:49:33 +10:00
Michael Gratton
b2e99dcef2 Application.Client: Add command line flag for logging SQL results 2020-04-16 11:44:26 +10:00
Michael Gratton
3b0815a1dc Geary.Logging: Remove Flag enum
Now that we have classes logging on sub-domains, and the ability to
suppress specific domains, remove flags and switch over to doing
domain suppression for manipulating debug settings in the client.
2020-04-15 17:05:09 +10:00
Michael Gratton
d2eec63cfb Util.International: Rename package to I18n to make fn calls less verbose 2020-03-31 15:30:00 +11:00
Michael Gratton
f1a7a868dd Application.Client: Update copyright year
Fixes #777
2020-03-30 15:40:16 +11:00
Michael Gratton
335c31b8ef Application.AvatarStore: Move pixel size constant to Client 2020-03-22 08:55:20 +11:00
Michael Gratton
ff7c0f245b Application.Client: fix expected GVariant types for actions 2020-03-17 19:23:24 +11:00
Michael Gratton
c290787284 Add UI to preferences window for managing optional plugins 2020-03-17 19:23:24 +11:00
Michael Gratton
25976dd218 Update Application.Client shutdown process
We can't actually override GLib.Application::quit in a robust way since
it's not virtual, so move as much of the shutdown process as possible to
::shutdown which can be overridden.
2020-01-25 15:35:47 +11:00
Michael Gratton
411f3ef661 Warn about bad shutdowns so they can be caught and diagnosed 2019-12-04 09:48:47 +08:00
Michael Gratton
992bfe8fde Don't block application shutdown check when mainloop is blocked 2019-12-04 09:46:30 +08:00