Commit Graph
24 Commits
Author SHA1 Message Date
Mohammed Sadiq c30a41ffa9 Let calls-call be an abstract class
And adapt to changes.

A calls-mm-call IS-A calls-call (and so on)
2021-04-05 09:38:03 +05:30
Mohammed Sadiq a30e1eaa8f provider: Implement default methods
Simply return NULL when these methods are called.

If not implemented, calling these methods may result
in crash when the subclasses haven't implemented them.
2021-04-04 18:16:48 +05:30
Mohammed Sadiq faa35e90dc provider: Rename a variable
Provider is no longer an interface
2021-04-04 18:12:46 +05:30
Mohammed Sadiq dc7c676df8 provider: Avoid private data
We only have a dummy variable here
2021-04-03 07:22:27 +05:30
Mohammed SadiqandEvangelos Ribeiro Tzaras 994853910d application: Open only the first 'tel:' URI
Calls can't handle multiple calls, so there is no
point in handling all URIs.

Handle opening URI in activate(), which will be helpful
when we use local_command_line()

Also, this commit fixes presenting window on initial
launch of Calls with a “tel:” URI
2021-02-27 09:14:44 +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 SadiqandEvangelos Ribeiro Tzaras 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
Mohammed SadiqandEvangelos Ribeiro Tzaras 862e0b5f57 resources: Use standard icon path
GtkApplication by default appends "icons" to the app id and add that
to the icon search path.  So let's just use that instead of adding
custom one.

This commit also fixes missing icon for "Add call" button in active
call window
2021-01-23 20:17:14 +00:00
Mohammed SadiqandEvangelos Ribeiro Tzaras 945e2083e3 application: Remove unused code
constructed() was simply creating an action group which
is never used.
2021-01-20 11:00:51 +00:00
Mohammed SadiqandGuido Gunther 7c13d3f179 application: Simplify loading css
And fix a memory leak.
2021-01-20 10:10:50 +00:00
Mohammed Sadiq 0f88802cda new-call-box: Handle USSD commands 2020-11-03 08:19:03 +05:30
Mohammed Sadiq 1c89bf292c main-window: Add dialog to handle USSD 2020-11-03 08:19:03 +05:30
Mohammed Sadiq 949ef90e03 manager: Hook to ussd signals from provider 2020-11-03 08:19:03 +05:30
Mohammed Sadiq 6af2e26639 util: Add API to test for USSD command 2020-11-03 08:19:03 +05:30
Mohammed Sadiq 939a59735c mm-origin: Implement CallsUssd interface 2020-11-03 08:19:00 +05:30
Mohammed Sadiq 8103c3d477 Add calls-ussd interface 2020-11-02 10:00:46 +05:30
Mohammed Sadiq ba00b174f9 call-display: Use real ellipsis
See https://wiki.gnome.org/Design/OS/Typography
2020-05-31 19:24:25 +05:30
Mohammed Sadiq 8f9c683158 main-window: Don’t set program-name in about dialog
program-name will be retrieved with g_get_application_name().
Let’s not do it explicitly so that there is one less string
to translate
2020-05-31 19:18:52 +05:30
Mohammed SadiqandBob Ham 0634f49fc7 mm-provider: Fix a check to remove device
We want to remove the modem if the currently removed interface is
Voice.  It was previously removing the device if the removed
interface wasn’t Voice.

Fixes https://source.puri.sm/Librem5/calls/issues/94
2020-01-20 10:41:45 +00:00
Mohammed Sadiq d4b6e92fc1 new-call-box: Use null-terminated string to set as buffer text
gtk_entry_buffer_insert_text expects a null-terminated string.

This was found when testing with asan.
2019-01-31 10:32:44 +05:30
Mohammed Sadiq d62976a9a1 window: hide windows on delete
As calls is supposed to run always in background,
destroying window on close results in unintended issues.
Let's simply hide the window instead.
2019-01-29 11:36:38 +05:30
Mohammed Sadiq 08f19de326 Add calls-application class 2018-10-04 18:33:47 +05:30
Mohammed Sadiq 6bcb4db25d history-box: Add empty view 2018-09-24 07:38:06 +05:30
Mohammed Sadiq cbd15260b9 new-call: Set input hints and purpose of SearchEntry 2018-09-15 06:22:34 +05:30