1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-04 23:51:17 +00:00
Commit graph

20 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
e80abf713a tests: Use g_test_init instead of gtk_test_init
gtk_test_init() ends up calling gtk_init() which tries opening
the default display. CI jobs sometimes seem to trip over this
even when run through xvfb-run. Therefore we use g_test_init()
instead.
2023-05-09 07:44:09 +00:00
Evangelos Ribeiro Tzaras
12161080bc test-manager: Remove unused include 2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
62f6f75667 test-manager: Remove unused variable 2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras
e5a6ace32d tests: Don't mock calls_contacts_provider_new()
Having set which folks backends to use the real function can be used
without causing any warnings leading to the build to fail.
2023-01-20 17:12:01 +01:00
Julian Sparber
270d145b65 tests: Use CALLS_PLUGIN_DIR to search for plugins in the build dir
There is no need to add a second variable to search for plugins, we can
use CALLS_PLUGIN_DIR directly.
2022-12-03 12:32:29 +01:00
Evangelos Ribeiro Tzaras
86a8f3ae22 Move provider plugins into a dedicated directory
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
2022-08-19 08:43:57 +00:00
Evangelos Ribeiro Tzaras
94fa13af4c settings: Convert to the singleton pattern
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
2022-05-13 19:58:07 +02:00
Evangelos Ribeiro Tzaras
3fe976505c manager: Delay UI Call removal and adjust to changes
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.
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
6f9b071bbc tests: manager: Switch to CallsUiCallData 2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
d75d4916af manager: Use state flags instead of an enum and adapt to changes
This gives us some more granularity and is overall a better fit than the states
previously used.

Closes #327
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras
15943b9776 manager: Hardcode supported protocols and adapt to changes
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.
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras
babd013bd7 Remove CallsCredentials and adapt to changes
The provider knows best which credentials it needs and CallsCredentials
was not generic to begin with, so get rid of it.
2021-07-20 10:17:17 +02:00
Evangelos Ribeiro Tzaras
f74f4b6469 test: manager: Expanded *has_provider() testing 2021-06-11 17:52:56 +02:00
Evangelos Ribeiro Tzaras
96a7d901c1 Fix old-style warnings all over the codebase
As caught by compiling with `-Wold-style-definition` and `-Wstrict-prototypes`.
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras
4990529c6c tests: manager: Add multiple provider tests
The test suite can be further expanded later. For now this suffices to
have some basic regression testing for multiple provider support in place.
2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
9c91a33604 test: manager: Use more appropriate g_assert_*() calls 2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras
0b2f146053 manager: support multiple providers
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.
2021-06-01 14:52:18 +02:00
Evangelos Ribeiro Tzaras
25d651c834 manager: set default origin
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.
2021-04-06 14:27:26 +00:00
Mohammed Sadiq
eda460ac15 provider: Use GListModel to track origins
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.
2021-02-25 08:44:56 +05:30
Julian Sparber
3e138eeccd
Manager: add test 2020-03-27 12:05:33 +01:00