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

122 commits

Author SHA1 Message Date
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
Bob Ham 40b8793710 call-display: Add ugly, ugly hacks to enable speakerphone/mute buttons
We call pactl synchronously in order to (1) change the sink/source
port for speakerphone and (2) mute the sink/source for mute.  The
sink/source names are hardcoded.  This is all ugly and needs to not
exist.  This functionality should be in Wys, accessed over D-Bus, or
in some other, as-yet undefined component.
2019-12-10 11:03:53 +00:00
Bob Ham 8f2cddddcf Add -Wno-error=deprecated-declarations to build arguments
This works around the deprecation warning for HdyDialer.
2019-12-10 10:03:40 +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 6a7fbf0b59 Add phone number lookup using libfolks
The CallsBestMatchView and CallsPhoneNumberQuery classes are written
in Vala because they may be generally useful and to leave open the
possibility of adding them to libfolks itself, which is written in
Vala.
2019-10-29 13:21:45 +00:00
Bob Ham e7ba7d731c ringer: Use the GTK sound theme 2019-09-23 15:22:31 +01:00
Bob Ham 6a4dbe6b18 ui/main-window: Hide contacts pane
While we have no integration with Contacts, the contacts pane
shouldn't be visible.

Closes #83
2019-09-18 13:38:48 +01:00
Bob Ham 3201c8e69b Display call window over the phosh lockscreen
Closes #41
2019-09-06 14:58:08 +01:00
Bob Ham 38dd76c714 Use GtkApplication::register-session property to register
We can use GtkApplication to register with the GNOME session rather
than doing it ourselves, simplifying things in CallsApplication very
slightly and allowing us to remove session.{c,h}.
2019-09-02 09:52:12 +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 646682b878 Start up in daemon mode when GNOME starts
Hat tip to Guido for the session.{c,h} files.

Closes #45
2019-08-13 11:53:54 +01:00
Bob Ham fc16ec7a71 calls-application: Add --daemon option to not display main window 2019-08-08 13:51:17 +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 da298c0648 Record calls to an SQLite database via libgom
Closes use-cases#114
2019-07-22 14:37:41 +01:00
Bob Ham f12b411813 calls-call: Add calls_call_get_inbound function 2019-07-22 11:52:42 +01:00
David Boddie a27efedf7c Override the input method for entry widgets 2019-07-10 16:42:15 +02:00
Bob Ham d8cf2be9c6 Merge branch 'symbolic-switcher-icons' into 'master'
Switcher: symbolic icons, label capitalization

See merge request Librem5/calls!51
2019-07-09 10:04:56 +00:00
Bob Ham 4fcc846095 Merge branch 'recents-empty-state-label' into 'master'
Minor: Change recent calls empty state label

See merge request Librem5/calls!47
2019-07-09 09:58:10 +00:00
Bob Ham a80f816a67 util: Fix off-by-one in calls_entry_append
Append after the last character rather than insert before it.

Closes #70
2019-07-08 10:11:12 +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
Bob Ham 003adc709c Specify minimum libhandy version in meson and Debian packaging 2019-07-04 15:17:32 +01:00
Bob Ham b84370efe8 src: Remove extraneous classes, Calls{History,NewCall}HeaderBar
And add missing HDY type ensures.
2019-07-03 15:15:08 +01:00
Tobias Bernard aee2b247ca Switcher: symbolic icons, label capitalization 2019-07-03 14:55:09 +02:00
Bob Ham 251e3b0076 calls-main-window: Use HdyViewSwitcher and friends
Use HdyViewSwitcher to navigate between the dial pad, call history and
a contacts list.

Closes #56
2019-07-03 13:39:25 +01:00
Bob Ham 5937874c44 calls-call: Fix crash with null call state
Account for having a null (zero) call state in
calls_call_state_to_string.  This fixes a crash as a result of the
recent UI changes.
2019-07-01 15:04:03 +01:00
Bob Ham b0d9918f5a Update UI to better reflect the design
* Make the Answer button look nice and laid out properly.
* Merge the time and status labels, displaying simply the text
  "Calling..." until the call becomes active and then the call time
  afterwards.
* Fix info display bar in both the call and main windows so they use a
  GtkRevealer and work a lot better.
* Add a "new-call-symbolic" icon for the "Add call" button.
* General tweaks and clean-ups

Closes #55
Closes #35
2019-06-28 15:14:45 +01:00
Bob Ham 7ed3f5f16c calls-call: Add inbound property
This property signifies whether a call is to us from someone on the
network (inbound, TRUE) or from us to someone on the network
(outbound, FALSE).
2019-06-28 09:59:29 +01:00
Tobias Bernard 617822d6ce Minor: Change recent calls empty state label 2019-06-26 15:19:52 +00:00
Bob Ham 3160fbee15 Merge branch 'christopherdavis/change-about-label' into 'master'
history-header-bar: Change "About" to "About Calls"

See merge request Librem5/calls!45
2019-06-18 11:35:04 +00:00
Bob Ham 0947d7a1d1 Merge branch 'wip/sadiq/windows' into 'master'
window: hide windows on delete

See merge request Librem5/calls!44
2019-06-18 11:32:32 +00:00
Christopher Davis e0123e400e history-header-bar: Change "About" to "About Calls"
As a part of GNOME's initiative to move menus, "About" should be "About $APP_NAME" rather than "About".

See https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement#guidelines for reference
2019-02-19 23:08:24 -05: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
Bob Ham 400c2fc041 src: Remove mutual reference between call -holder and -selector-item 2018-11-30 16:48:25 +00: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
Bob Ham 7252962139 Add ringtone support using GSound 2018-11-09 16:30:40 +00:00
Bob Ham 5e636edb7d main: Remove needless cast to GtkApplication 2018-11-09 16:20:39 +00:00
Bob Ham 027c49e8bd src: Add old state as argument to CallsCall's state-changed signal 2018-11-09 16:19:23 +00:00
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 5c52bb7e57 src: Remove errant calls-ofono-object files
Not even sure how these crept into the repository.
2018-10-10 13:23:01 +00:00
Bob Ham 3917edbcdb call-window: Reference selector item widget in creation callback
The return value of this callback, used for the call selector flow
box, should have a reference added to it.  The callback's return value
is annotated as "transfer full".
2018-10-10 09:13:54 +00:00
Bob Ham ef976cee04 call-window: Remove display and holder in the right order
In the current order, the holder is finalized before we can get the
display, causing an error.  We just have to switch the two around
2018-10-10 09:13:54 +00:00
Bob Ham 224ab410d0 call-holder,call-selector-item: Dispose mutual references properly 2018-10-10 08:56:00 +00:00
Bob Ham e88156380e call-holder: Fix widget references
The display and selector item have floating references when created,
not normal references.  Therefore we need to sink both floating
references.
2018-10-10 08:56:00 +00:00