1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 14:49:30 +00:00
Commit graph

167 commits

Author SHA1 Message Date
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 4227e29009 calls-main-window: Bring back old error string when no modem is present
Calls can't tell the difference between no SIM and no modem
atm.

Closes: #159, #152
2020-09-10 08:58:25 +00:00
Guido Günther 91cdde3ac9 main-window: Allow the in app notification to wrap
Othewise we overflow the window. Center it too.
2020-09-10 08:58:25 +00:00
Evangelos Ribeiro Tzaras 9619ebb674 src/calls-call-window.c: Inhibit suspend during active call 2020-09-09 08:27:14 +00:00
Evangelos Ribeiro Tzaras c43bfe3ebb src/calls-notifier.c: Add call-back button 2020-09-08 16:08:51 +02: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
Arnaud Ferraris aadd3e3515 ui: call-display: wrap toggle buttons' labels
For some locales, the buttons' labels can be quite long, making the
window wider than the display.

Using a line wrap will solve this issue when there wouldn't be shorter
translation alternatives. This requires reducing the encryption indicator's
margins so the window height doesn't grow beyond the available display size.
2020-07-13 10:51:02 +02: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 9fc8ec5e1a Implement contact name lookup for call display
* src/calls-manager.h: Add lookup function to header
* src/calls-manager.c: Implement lookup function to be used for the call
  history, call notifier and call display
* src/calls-call-holder.c: Use calls_manager_get_contact_name ()
* src/calls-notifier.c: Use calls_manager_get_contact_name ()
2020-06-27 17:35:54 +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
Evangelos Ribeiro Tzaras b15c2876da record-store: Use g_autoptr(GError) to avoid having to g_error_free 2020-06-10 20:49:44 +02:00
Guido Günther 281ccbd8e6 Show notification on missed calls
Closes: #153
2020-06-09 13:44:57 +02:00
Guido Günther ecca21b0ed ringer: Use libfeedback
This triggers e.g. haptic feeback as well and can later on be used
for LED feedback.

We can drop the audio theme setting completely since feedbackd picks up
the global GNOME setting.

Since feedbackd currently does not cancel gsound's via a cancellable
this might make the phone ring a bit too long atm but that will be fixed
on the feedbackd side
(https://source.puri.sm/Librem5/feedbackd/-/issues/10)
2020-06-05 16:42:24 +02:00
Guido Günther f96ad96b3f ringer: Make more functions static 2020-06-05 16:37:01 +02:00
Guido Günther f7185ea70e build: Specifify glib versions
This avoids deprecation warnings due to GTimeVal used in
libebook-contacts.h

See https://tecnocode.co.uk/2019/08/24/gtimeval-deprecation-in-glib-2-61-2/

It's already fixed in newer eds so we can drop
this once we move to a newer stack.
2020-06-05 16:36:32 +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 fb73046e71 calls-contacts: Document lookup_phone_number
This makes sure we have clear ownership rules
2020-06-05 14:59:37 +02:00
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
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
Evangelos Ribeiro Tzaras 31fa887f04 Build "ugly code" in calls-call-display conditionally
* meson_options.txt: Added option librem5-hack, defaults to true
* src/meson.build: Added conditional define USE_UGLY_CODE which will be
  set when librem5-hack option is used
* src/calls-call-display.c: ifdef'ed ugly_hacks call
2020-05-15 22:59:00 +02:00
Julian Sparber 0b44f6471f
History: Make avatars 48px big
Signed-off-by: Julian Sparber <julian@sparber.net>
2020-03-31 16:31:38 +02: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 63e5bc8504
Add HdyAvatar
Signed-off-by: Julian Sparber <julian@sparber.net>
2020-03-31 12:00:18 +02:00
Julian Sparber a9bd1ebae6 MainWindow: show error message when making calls isn't possible 2020-03-30 15:00:06 +00: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 f603f5be51
Remove Enumerate and EnumerateParams class
This classes where fully replaced by Manager
2020-03-27 12:05:35 +01:00
Julian Sparber 1a2c2f3036
RecordStore: Use Manager 2020-03-27 12:05:34 +01:00
Julian Sparber 3d4b547d04
Ringer: Use Manager 2020-03-27 12:05:34 +01:00
Julian Sparber c5cb1a97ed
Ringer: fix parent instance 2020-03-27 12:05:34 +01:00
Julian Sparber 5828fad63b
CallWindow: use Manager
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 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 9055724f33
Add a CallsManager and move Provider handling to it
The manager is a central place for handling data e.g. calls history and
provider managment.

This introduces only the base for feature work. Therefore it manages
only the provider for now, but the manager isn't yet used anywhere.

The propagets events from the provider and origins. It also adds a new
signal called `error`. The `error` signal should be emited only when
something went wrong and we need to inform the user about it, containing
the message to be displayed to the user. Windows should connect to the
event and display a in-app-notification on error. This event isn't
emitted, because the plugins don't give us a usable error.
2020-03-27 12:05:32 +01: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 19632e428b
CallWindow: use in-app notification 2020-03-18 11:20:47 +01:00
Julian Sparber e7c248ea30
MainWindow: use in-app notification for messages
This replaces the infobar with a in-app notification.
2020-03-18 11:20:47 +01:00
Julian Sparber e7e95efcfb
Add class for in-app notification 2020-03-18 11:20:46 +01: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 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 a14f3fd7a0
CallHistory: Add a frame to the call history
GNOMEs HIG recommands frames around a List.
This also moves the ScrollBar to the edge of the window in the
CallHistory.

Signed-off-by: Julian Sparber <julian@sparber.net>
2020-03-11 11:51:44 +01:00
Bob Ham e7ef61e1b7 application: Add "--dial" command-line option
This option allows the specification of a much broader set of numbers
that tel: URIs, which are limited to global phone numbers in
international form and prohibit local numbers and other useful strings
like "*100#".

This functionality is implemented as a command-line option rather than
a "dial:" or "callto:" URI scheme for the same reason given in RFC
3966, section 7.3:

  '"Callto" was discarded because URI schemes locate a resource and do
  not specify an action to be taken.'
2020-02-26 09:37:34 +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
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 7d02dcbb66 call-display: Only mute the microphone with the Mute button
Don't mute the sink (the codec speaker feed), only mute the source
(the microphone feed).

Fixes #112
2020-01-20 12:08:19 +00: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