1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-07-02 15:09:31 +00:00
Commit graph

11 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras 7a6b702a31 plugins: use g_autoptr for GError 2021-03-03 00:17:49 +00:00
Evangelos Ribeiro Tzaras 3f197149a8 codestyle: remove whitespaces 2021-03-03 00:17:49 +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
Mohammed Sadiq 5684d54bbd Let calls-provider be an abstract class
And adapt to changes.

A calls-mm-provider IS-A calls-provider (and so on)
2021-01-31 23:01:13 +00:00
Eugenio Paolantonio (g7) ddab47d288 ofono: call: ensure signals get disconnected on voice_call object destruction
The 'property-changed' and 'disconnect-reason' signals weren't disconnected on the
voice_call object cleanup, and callbacks would thus still be fired once a second
call happens, resulting in a crash.

Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
2021-01-12 02:22:17 +01:00
Daniel Abrecht 0d8470597b Don't localise property descriptions in calls-call and calls-origin properties 2020-12-07 17:25:33 +00:00
Daniel Abrecht 4e7a0b8151 Replace CallsOrigin getters with properties and add calls_origin_foreach_call method 2020-12-07 17:25:33 +00:00
Daniel Abrecht cad79a4834 Reintroduce GParamSpec props arrays & replace g_object_notify with g_object_notify_by_pspec 2020-03-18 09:57:01 +00:00
Daniel Abrecht a7a679c186 Convert calls call getters to readonly properties
This is part of a larger refactoring effort, with the goal to replace
all the get_*() member functions in provider abstraction interfaces with
GObject properties. See also: https://source.puri.sm/Librem5/calls/issues/6
2020-03-18 09:57:01 +00:00
Julian Sparber e911f391c6
Use correct parent class when chaining up overridden functions
How `g_type_class_peek ()` was used it didn't return the correct parent
class in most cases.
G_DEFINE_TYPE macro creates a pointer we can use to get the parent
class `n_p_parent_class`.
Because we didn't use the correct parent class the object initialisation
wasn't fully completed for some GtkWidgets.
See https://developer.gnome.org/gobject/stable/chapter-gobject.html#gobject-instantiation
for more information.

This commit makes use of the `n_p_parent_class pointer` created for this
specific use case where ever possible.

Fixes: https://source.puri.sm/Librem5/calls/issues/118
2020-02-19 12:49:58 +01:00
Bob Ham 460c0c6c3d Turn providers into plugins courtesy of libpeas
This is an initial, static implementation of plugins.  The
CallsApplication has a plugin name which can be changed with a new
--provider command line option.  This plugin name is used to
instantiate the appropriate plugin when the application is activated.
From then on, the plugin cannot change.

In future, we can expand this support to include loading multiple
plugins at once, configurable through some UI.  This will have
far-reaching implications though, and complicate things like
enumerating the provider hierarchy.  There is also no practical
benefit right now; the mm and ofono plugins can't be used at the same
time because ModemManager and oFono don't play nice together, and the
whole raison d'être of the dummy plugin is undermined if you can make
use of one of the others.  So for now, we just implement one static
plugin.
2018-11-23 15:51:46 +00:00