1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-05-23 21:49:27 +00:00
Commit graph

48 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras 2f3f55c831 new-call-box: Don't leak CallsOrigin
get_selected_origin () does not need to take a reference on CallsOrigin
2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras ea5d7038e7 new-call-box: Use STR_IS_NULL_OR_EMPTY macro 2023-04-18 08:34:39 +00:00
Evangelos Ribeiro Tzaras e168170f9e new-call-box: Respect object lifecycle for signals 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras 673164803f new-call-box: Uncrustify 2023-02-01 08:48:35 +01:00
Evangelos Ribeiro Tzaras bb6b76107c build: Rename util.{c,h} to calls-util.{c,h}
"util" is a very generic name. This guards against accidentally
including similarly named headers from elsewhere.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras ee56c8e87c new-call-box: Add explicit include
util.h is included transitively, but explicit is better than implicit.
2023-01-22 07:33:02 +00:00
Evangelos Ribeiro Tzaras 8a16439cc8 new-call-box: Switch to using CuiDialpad
It has been in libcall-ui for some time, so let's use it.

This will also easy the transition to Gtk4 as it's one less widget we
have to worry about.
2022-10-13 13:24:19 +00:00
Evangelos Ribeiro Tzaras f8c65b9326 Revert "new-call-box: Clear entry after dialing"
This reverts commit 528fb11dcd.

It is cumbersome having to retype everything
if you've made a mistake when entering a number.
2022-09-01 17:52:52 +02:00
Evangelos Ribeiro Tzaras 36b10bc764 new-call-box: Don't auto select offline accounts 2022-06-21 12:19:38 +02:00
Evangelos Ribeiro Tzaras ee64b33e24 new-call-box: Fix memory leak
calls_new_call_box_dial was taking a reference it never released.
2022-06-21 11:52:40 +02:00
Evangelos Ribeiro Tzaras 581c82fcd7 new-call-box: Order includes alphabetically 2022-06-21 11:52:40 +02:00
Evangelos Ribeiro Tzaras 7ac862155b Uncrustify sources
Ran `find src plugins -iname '*.[c|h]' -print0 | xargs -0 uncrustify --no-backup`
with some minimal manual intervention.
2022-04-24 12:59:42 +02:00
Evangelos Ribeiro Tzaras 6d031e2ab6 new-call-box: Decide if numeric input is needed based on the origins protocol
The numeric addresses property conveys no additional information.
By changing the logic here we can get rid of the "numeric-addresses" property
alltogether.
2021-12-26 17:45:12 +01:00
Evangelos Ribeiro Tzaras 33ad4dbe86 Simplify country code handling 2021-09-27 08:46:09 +00:00
Evangelos Ribeiro Tzaras 528fb11dcd new-call-box: Clear entry after dialing
Closes #332
2021-09-20 03:31:28 +02:00
Evangelos Ribeiro Tzaras 876ffb1e8c new-call-box: Always update the UI when the list of origins changes
Otherwise this can lead to being stuck in numeric/non-numeric input mode.
2021-08-26 12:47:57 +00:00
Evangelos Ribeiro Tzaras 9c777b7db8 new-call-box: Hide empty results
Because the empty result looks weird.
2021-08-19 01:46:59 +02:00
Evangelos Ribeiro Tzaras b1c22e4310 new-call-box: Press enter to place a call
Connect to the "activate" signal and take appropriate action
for both numeric and non-numeric cases.
2021-08-19 01:44:06 +02:00
Evangelos Ribeiro Tzaras 3779aa1062 new-call-box: Set numeric input property based on selected origin 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras db848b2c9f new-call-box: Add entry for non-numeric inputs 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras e9661ce01c new-call-box: Introduce numeric-input-only property
This property will show the keypad for numeric inputs (i.e. telephone numbers)
or an entry allowing arbitrary inputs for SIP or other protocols.
2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras 179c844a80 calls-new-call-box: Only show origin combo box if there is a choice 2021-08-14 20:46:11 +02:00
Evangelos Ribeiro Tzaras 62711da7fc new-call-box: Simplify HdyComboRow binding 2021-08-13 02:13:27 +02:00
Evangelos Ribeiro Tzaras 6e371d2f3f resources: Use /org/gnome prefix and adapt to changes
In preparation to moving to GNOME all the IDs, DBus object paths, etc should
change.
2021-07-12 13:35:57 +00:00
Evangelos Ribeiro Tzaras dbb829be06 debug: Add G_LOG_DOMAIN to every file using g_debug() 2021-06-18 11:12:13 +02:00
Evangelos Ribeiro Tzaras 3f3b108cea new-call-box: Honour auto-use-default-origins setting 2021-06-01 14:52:23 +02:00
Evangelos Ribeiro Tzaras fecdc1fff8 cleanup: Fix calls_origin_get_name() related memory leaks
Document calls_origin_get_name() correctly as transfer-full.
Additionaly fix related memory leaks.
2021-05-28 13:18:24 +02:00
Evangelos Ribeiro Tzaras c2c3f64102 codestyle: new-call-box 2021-04-25 18:12:59 +02:00
Evangelos Ribeiro Tzaras d67e690f33 new-call-box: Connect signals only if origins non-NULL
Fixes #252
2021-04-03 06:41:54 +00:00
Evangelos Ribeiro Tzaras 5b34342134 new-call-box: make sure to call origin_count_changed_cb
Otherwise the model changes happening before hooking up will be missed
(which results in the model not being bound to HdyComboRow).
2021-02-27 09:45:06 +01: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
Evangelos Ribeiro Tzaras 5d4b84470c code style: consistent whitespaces for g_autoptr 2021-02-11 00:43:18 +01:00
Evangelos Ribeiro Tzaras d7cd299d9c new-call-box: clear entry on longpress 2021-01-20 12:35:34 +00:00
Mohammed Sadiq 0f88802cda new-call-box: Handle USSD commands 2020-11-03 08:19:03 +05:30
Adrien Plazas 6dba2c453b Port to libhandy 1
This ports Calls to libhandy 1 and drops the embedded HdyAvatar in favor
of the libhandy one.

Fixes https://source.puri.sm/Librem5/calls/-/issues/172
2020-10-06 14:06:51 +00:00
Julian Sparber ffa3e724dd
Use CallsManager in MainWindow and NewCallBox
This removes the status message at the end of the NewCallBox, since it
will be replaced by a permanent InfoBar.

As a side effect this removes also the disconnect message when a call
ends.
Fixes: https://source.puri.sm/Librem5/calls/issues/119
2020-03-27 12:05:33 +01: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
Julian Sparber 06481155fd
NewCallBox+CallDisplay: UI facelift
This adds a style.css file to allow the use of custom css

Fixes https://source.puri.sm/Librem5/calls/issues/115:
- Making the phone number larger
- Moving the delete button to the bottom
- Rounding all buttons, and making the grid buttons circular
- Making the call button a bit less wide
2020-01-28 17:58:01 +01:00
Julian Sparber 497fe072fc
Replace HdyDialer with HdyKeypad and bump libhandy to 0.0.12
HdyDialer was deprecated and therefore is replaced with HdyKeypad.
HdyDialer used a `gchr *` to store the entered phone number. On every
button press the entire text of the display entry was replaced with the new
string, which messed up selection and cursor position.
HdyKeypad connects directly to a GtkEntry and inserts each
button press the same way as a keyboard stroke would do.

In the case of the `call display` entry every new digit is appended to the
end of the input and therefore it also moves the cursor to the end of the
entry. Instead of making the Entry not editable, only the events which
would remove text form the entry are blocked, via the `delete-text`
signal. And the signal `insert-text` is used to block unwanted chars
from beeing inserted.

Same as for the `call display` entry also the `new call box` entry is
made editable and the signal `insert-text` is used to block unwanted
chars. All other user action possible on a entry arn't blocked
e.g. repositioning the cursor.

The advantage of making the Entry editable is that we can show
the cursor position.
It also allows the user to select the position where new digits are
inserted in the `new call box`.
On a button press the focus is set to the Entry to give the correct
feedback to the user.

This centers the text on the entry, as required by the design.
This also makes the delete button remove only one char at the time, to
move closer to the desired UX.
Related: https://source.puri.sm/Librem5/calls/issues/58

Fixes: https://source.puri.sm/Librem5/calls/issues/82
2020-01-27 14:27:06 +01:00
Bob Ham df74a80594 calls-new-call-box: Allow entering of "+" symbol
Use the "number" property of the dial pad for the dialed number which
takes care of cycling buttons. While we're at it, also make the clear
button external to the number entry box, enlarging it and turning it
into a backspace button.

Closes #12
2019-08-22 16:05:24 +01:00
Bob Ham cb2831eca4 Support opening of tel: URIs
Closes #73
2019-08-06 11:29:05 +01:00
Bob Ham 3c22bc9154 Hook up Recent Calls list to database
Closes use-cases#113
Closes use-cases#115
2019-08-01 14:39:55 +01:00
Bob Ham 719b3e752f calls-call-display: Add a display of dial pad digits
Closes #57
2019-07-04 15:32:40 +01: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
Bob Ham 74c3987ce1 src: Generalise Provider object enumeration with calls_enumerate() 2018-11-01 11:14:49 +00:00
Bob Ham c203f470fe Fix modem addition/removal and deal with ModemManager appearing/vanishing
Modems being added or removed were not working.  To fix this, we pay
attention to the "object-removed" event and not just
"interface-removed".

Also, to deal with ModemManager appearing and vanishing, we add a
GDBus watch on ModemManager's D-Bus object.

Finally, we provide appropriate UI feedback when it's not possible to
make a call.

Closes #15
Closes #16
2018-10-19 10:24:00 +00:00
Bob Ham f4eae98458 main-window,new-call-box: Move origin store from MainWindow to NewCallBox
The main window has no need to store origins now so this simplifies
things dramatically.
2018-10-08 10:16:04 +00:00
Adrien Plazas 22d79bfbbf Add CallsNewCallBox 2018-08-29 09:05:57 +02:00