1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-11 06:19:33 +00:00
Commit graph

47 commits

Author SHA1 Message Date
Anton Lazarev ee3abc009a treewide: Replace libhandy with libadwaita
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
2024-04-06 08:15:24 -07: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 a52a2a39f8 record-row: Defer enabling popup actions until displaying
There is no need to enable or disable actions until the popover
is actually presented.

This also get's rid of having to be notified of changes to the
"can-add-contact" property which led to a segfault as the signal handler
was not properly cleared.

Fixes: #535

As the "can-add-contact" property is now always checked,
the menu item will be properly shown.

Fixes: #485
2022-12-31 18:37:08 +01:00
Evangelos Ribeiro Tzaras 757351b39c record-row: Add SMS action
Add a menu entry in the history popover to open the default "sms" URI
handler.

Closes: #182
2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras 01f3757ce1 record-row: Simplify add-action logic
Get rid of some code by avoiding special casing
and potentially fix an issue (WIP).
2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras 0d6095b42a record-row: Use STR_IS_NULL_OR_EMPTY macro 2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras 8e23d77508 record-row: Chain up early to constructed() 2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras d94792f3c5 record-row: Rename callback to conform to on_* naming scheme 2022-08-05 10:30:06 +02:00
Evangelos Ribeiro Tzaras 37eba7b66f record-row: Remove unused code 2022-08-05 10:30:06 +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 134c4af9c7 record-row: Avoid raising critical
When the record has a NULL id there won't be a CallsBestMatch we can use to bind
properties.
2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras 5b171bf2c5 record-row: Handle calls with NULL id gracefully
Shuffles some code around so that the property bindings are at the end.
This allows us to return early if there is a NULL contact (as is the case
for anonymous callers).
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras cd075d9269 record-row: Use primary info instead of name property
RECHECK if bestmatch can ever have a NULL id!
2022-02-18 10:55:53 +01:00
Evangelos Ribeiro Tzaras 896af6f8af record-row: Fix passing widget instead of string as action target
When introducing the per protocol dial actions we started setting the widget
self->target as the action target instead of the target property of
self->record.

Bizzarely we only sometimes got greeted with a critical:

11:30:20.5184                 GLib[887977]:CRITICAL: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed

Thread 1 "gnome-calls" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff7ea400e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1417
1417	../../../glib/gmessages.c: No such file or directory.
(gdb) bt
    at ../../../glib/gmessages.c:2898

Fixes: 687dd7ff383476523ae0a8a38879a171cb0b9a5a
Closes #398
2022-02-01 23:28:50 +01:00
Evangelos Ribeiro Tzaras 423ce4668e record-row: Remove unnecessary G_OBJECT cast 2022-02-01 23:28:50 +01:00
Evangelos Ribeiro Tzaras b00deccdcb record-row: Use per protocol dial action
This allows us to deactivate actions if there is no origin that can handle them.

Closes #293
2022-01-31 17:08:38 +00:00
Evangelos Ribeiro Tzaras 827594dc2e record-row: Add context menu entry for adding a new contact
Fixes #157
2022-01-18 02:12:37 +00:00
Evangelos Ribeiro Tzaras 4df3ea005d record-row: Only create popover when needed
Creating a popover for each CallsCallRecordRow comes with a big performance
hit when scrolling the history, so we should avoid doing this.

Fixes #198
2021-12-10 18:12:30 +01:00
Evangelos Ribeiro Tzaras 42b5b9d600 record-row: Use API to query call icon name
This makes sure we don't need to allocate icon string names for each record.
2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras 625b26be32 record-row: Codestyle 2021-12-07 11:05:12 +01:00
Evangelos Ribeiro Tzaras f206b7d257 call: Rename property from "number" to "id"
The term number is not necessarily accurate when dealing with f.e. SIP.
2021-12-05 09:49:05 +01:00
Evangelos Ribeiro Tzaras 989a52fac5 record-row: Removed unused define 2021-11-25 19:14:42 +01:00
Evangelos Ribeiro Tzaras 76ec1e6941 record-row: Use avatars in history
Fixes #147
2021-11-18 12:15:25 +01:00
Evangelos Ribeiro Tzaras 57ec06a6f5 record-row: Take timezone into account for displaying in the UI
Since the database uses UTC times we have to take the timezone offset into
account when displaying times in the UI.

Fixes #163
2021-10-15 18:14:39 +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
Julian Sparber 293227ff3c CallsCallRecordRow: Cleanup contact setup 2021-02-03 23:58:31 +00:00
Julian Sparber f61ae1cba1 Contacts: replace CallsContacts with CallsContactsProvider 2021-02-03 23:28:56 +01:00
Evangelos Ribeiro Tzaras 9f295a729b record-row: hide copy number menu item
for anonymous callers
2021-01-20 11:47:33 +00:00
Evangelos Ribeiro Tzaras 78a47918be record-row: Allow copying number from context menu 2021-01-20 11:47:33 +00:00
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
Guido Günther b95de5c9e0 calls-call-record-row: Ignore anonymous callsers
These have an empty string which leads to

    Error parsing phone number `': Keine Telefonnumme
2020-07-22 06:52:07 +00:00
Guido Günther 1f8435f4dd call-record-row: Use g_autoptr for the GError 2020-07-22 06:52:07 +00:00
Guido Günther 803cec41a5 calls-call-record-row: Set call back button insensitive for anonymous caller
They can't be called back, we don't have a number

See: #144
2020-07-02 12:10:10 +02:00
Guido Günther 0bc8c7bc4e calls-call-record-row: Print 'Anonymous caller' on empty numbers
If no number is present use `Anonymous caller` instead of an
empty label in the call history.

See: #144
2020-07-02 12:10:10 +02:00
Evangelos Ribeiro Tzaras 0f0d10e3f2 Make CallsContacts a singleton
Since passing a CallsContacts pointer down to every class it needs, started to
become laborous - especially since the intermediates classes don't need
the reference themselves - it was made a singleton

* src/calls-contacts.c: Added calls_contacts_get_default () function and
  removed calls_contacts_new ()
* src/calls-contacts.h: Added _get_default () prototype and removed the
  _new () prototype
* src/calls-application.c: Use calls_contacts_get_default () now
* src/calls-history-box.c: Removed self->contacts completely
* src/calls-history-box.h: Got rid of CallsContacts argument in _new()
* src/calls-main-window.c: Removed self->contacts completely
* src/calls-main-window.h: Got rid of CallsContacts argument in _new()
* src/calls-call-record-row.c: Use calls_contacts_get_default () now
* src/calls-call-record-row.h: Got rid of CallsContacts argument in
  _new()
* src/calls-call-holder.c: Use calls_contacts_get_default () now
* src/calls-call-holder.h: Got rid of CallsContacts argument in _new()
* src/calls-call-window.c: Removed self->contacts completely
* src/calls-call-window.h: Got rid of CallsContacts argument in _new()
* src/calls-notifier.c: Use calls_contacts_get_default () now
* src/calls-notifier.h: Got rid of CallsContacts argument in _new()
2020-06-23 17:43:19 +02:00
Evangelos Ribeiro Tzaras 4bf5cd5232 Implement delete call with context menu on longpress
* src/ui/call-record-row.ui: Add menu, GtkPopover. Surround existing
  elements with GtkEventBox to capture longpress/rightclicks
* src/calls-call-record-row.c: Provide functions emiting "call-delete"
  signal, add widgets from ui file
* src/calls-record.c: Add "call-delete" signal
* src/calls-history-box.c: Add callback for "call-delete" signal
* src/calls-record-store.c: Add callback for "call-delete" signal
* src/util.c: Add convenience function calls_find_in_store for finding
  items in ListModel
* src/util.h: Add declaration of calls_find_in_store
2020-06-10 20:49:44 +02:00
Guido Günther 09cbdf4181 calls-call-record-row: Ref the returned contact
calls_contacts_lookup_phone_number is transfer-none
2020-06-05 14:59:37 +02:00
Guido Günther 956916ae1f Drop translations from property names and descriptions
They're never used anywhere.

Closes: #155, #121
2020-05-29 13:11:44 +00:00
Julian Sparber 4f03ab0441
History: use HdyAvatar
This disables the custom avatar. It will be added back later.

Signed-off-by: Julian Sparber <julian@sparber.net>
2020-03-31 16:31:38 +02:00
Julian Sparber f63936d772
HistoryBox: remove new-call property
The property wasn't removed correctly in f1f848c5f3

Signed-off-by: Julian Sparber <julian@sparber.net>
2020-03-30 11:35:58 +02:00
Julian Sparber f1f848c5f3 CallHistory: Don't pass the CallsNewCallBox to the CallsHistory
Since we now have a "dial" action we can uses it also in the History,
this way we don't need to pass arond the NewCallBox.
2020-03-19 16:54:33 +00:00
Julian Sparber 62a327a0ae CallHistory: Use dial action for recall button 2020-03-19 16:54:33 +00:00
Julian Sparber a91da3f84b
CallHistory: Disable selecting/activating rows and ellipzise
This makes the name in each row ellipzise in the middle.

Signed-off-by: Julian Sparber <julian@sparber.net>
2020-03-11 11:51:46 +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
Bob Ham cc41df44d6 Add initial avatar support
We change the code for dealing with contacts quite significantly,
adding a new class, CallsBestMatch, in order to encapsulate a lot of
the functionality that was in CallsCallRecordRow.

At present avatars are not rounded and there are no auto-generated
avatars for contacts with no avatar.  This work is awaiting discussion
of Apps_Issues#164.
2019-12-10 14:46:31 +00:00
Bob Ham 9fe575053d Use libfolks phone number lookup in call record display
Closes #85
2019-10-29 14:54:45 +00: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