Since we will introduce another type of plugin for the policy engine
we want to have each plugin type in separate directories.
We also have to adjust:
- plugin search directories
- po file location
- update paths for calls-doc target
We only have a single source of settings, so we should reflect that by
using a singleton. This also reduces our LoC.
This doesn't impair our ability to run tests because there we run with
GSETTINGS_BACKEND=memory
This was handled explicitly in the Call window.
By changing the logic to delay the emission of "ui-call-removed" we make sure
that the Call UI and the exported DBus object is consistent.
We also need to change the test cases to use run a GMainLoop because we now have
to wait until signal comes in.
This simplifies the code quite a bit by removing the supported protocols from
being determined dynamically via the loaded plugins.
It was previously used to add/remove a GListStore to origins_by_protocol.
This is a prerequisite for having per protocol dial actions.
This includes the following changes:
- Introduce a `providers` hash table to keep track of multiple CallProvider's
and remove the `provider` member
- Remove `calls_manager_get_provider()` and `calls_manager_set_provider()`
in favour of `calls_manager_add_provider()`, `calls_manager_remove_provider()`
and `calls_manager_has_provider()`
- Introduce a `origins` GListStore to keep track of available origins.
`origins` is updated in `items_changed_cb()` when the origins of any
CallsProvider are updated.
- Adapt to changes with respect to `calls_manager_get_origins()`.
- Introduce `origins_by_protocol` hash table to keep track of available origins
per protocol.
- Adjust tests
- We temporarily break country code lookup which was handled previously
with the "default-origin" mechanism. We will add it back to the CallsSettings
class which will provide a better application-wide mechanism.
This is a bit of a hack to get the country code property hooked up
and will require a rework when multiple provider support is being added.
As the default origin is not being used anywhere else in the code
it's currently not a problem that we're not tracking if the default
origin is being removed.
Additionally test-manager.c needed some adjustment.
And adapt to changes
It's easier to track changes if we are using GListModel than
a GList. Also, eventually we shall have multiple providers,
and we can use GtkFlattenListModel to merge multiple origins
without manually managing pointers ourself.
Since several widgets has APIs to handle GListModels, it will
also help us create widgets from GListModels easily.