1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-16 16:56:09 +00:00
Commit graph

189 commits

Author SHA1 Message Date
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
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
Bob Ham
903782d90d call-window: Fix leak of initial CallHolder reference
Closes #20
2018-10-10 08:56:00 +00:00
Bob Ham
88e11d62b5 call-window: Don't maintain unneeded focus pointer
Closes #19
2018-10-10 08:56:00 +00:00
Bob Ham
f60187c547 call-window: Fix leak of references returned by g_list_model_get_item()
Closes #18
2018-10-10 08:56:00 +00:00
Bob Ham
8d3ec069eb call-window: Don't update visibility unnecessarily
We only need to update visibility when the number of calls changes.
2018-10-09 14:44:04 +00:00
Bob Ham
a33dbd139e main-window: Set up Provider in constructed callback 2018-10-08 10:46:00 +00:00
Bob Ham
9aa34cceff src: Give the Provider to the CallWindow on construction
This allows us to get rid of the signals on the MainWindow and
simplifies things dramatically.
2018-10-08 10:40:02 +00:00
Bob Ham
1843d72ad1 main-window: No need to store calls so remove holders here 2018-10-08 10:34:28 +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
Mohammed Sadiq
08f19de326 Add calls-application class 2018-10-04 18:33:47 +05:30
Bob Ham
b727916bc8 tests: Add tests for Origin and Calls 2018-10-03 14:21:28 +00:00
Bob Ham
58c3820f29 Merge branch 'i18n' into 'master'
Add i18n support

Closes #3

See merge request Librem5/calls!19
2018-10-03 10:26:10 +00:00
Claude Paroz
f45e4d613f Add i18n basic structure
Closes #3.
2018-10-03 12:21:41 +02:00
Bob Ham
8a96c79eff Merge branch 'wip/sadiq/history' into 'master'
history-box: Add empty view

See merge request Librem5/calls!23
2018-10-03 10:10:10 +00:00
purism
3e6ee6d293 main-window: Display the dialer on startup rather than empty history
When call history is implemented, this should be modified to only
display the dialer if the history is empty.
2018-10-02 17:19:10 +00:00
Bob Ham
0fcb4e59e9 Merge branch 'modem-warning' into 'master'
mm-provider: Clarify warning a bit

See merge request Librem5/calls!25
2018-10-03 09:31:31 +00:00
Guido Günther
5752101582 mm-provider: Clarify warning a bit
We're only looking for modems with voice capabilities. Warning that
there are no modems available at all might be confusing to the person
trying to track down a problem.
2018-10-01 12:05:39 +02:00
Adrien Plazas
7682aa1029 main-window: Move calls history before the new call box
This makes the calls history the page visible by default, matching the
final design.
2018-10-01 08:41:55 +02:00
Adrien Plazas
e0a1329218 main-window: Replace the stack switcher by a header bar
Drop the in-window content stack witcher and replace it by a header bar
containing both a CallsHistoryHeaderBar and a CallsNewCallHeaderBar.
2018-10-01 08:41:55 +02:00
Adrien Plazas
68cc256018 main-window: Add the 'new-call' and 'back' actions
These will be used by the header bar to switch between the call history
page and the new call page.
2018-10-01 08:41:55 +02:00
Adrien Plazas
b9d353dd58 Add CallsNewCallHeaderBar 2018-10-01 08:41:55 +02:00
Adrien Plazas
1a16271bcb Add CallsHistoryHeaderBar 2018-10-01 08:41:55 +02:00
Adrien Plazas
e58ce3f08d main-window: Add the 'about' action
This will be needed by the next commit to display an "About" dialog via
the corresponding entry in the app menu that will be added.

This also adds the PACKAGE_URL, PACKAGE_VERSION and VCS_TAG
configuration data.
2018-10-01 08:41:42 +02:00
Adrien Plazas
65d7943e88 main-window: Don't display calls 2018-10-01 08:18:28 +02:00
Adrien Plazas
09670ea9c8 Display calls in the call window. 2018-10-01 08:18:28 +02:00
Adrien Plazas
b547c344e5 Add CallsCallWindow 2018-10-01 08:18:28 +02:00
Adrien Plazas
7e2a1f376a main-window: Add the 'call-added' and 'call-removed' signals
These will be used in the next commit to notify of added and removed,
which will be needed to display the calls in a secondary window.
2018-10-01 08:18:28 +02:00
Adrien Plazas
bc6295f5fe main: Use APP_ID from config.h 2018-10-01 08:18:28 +02:00
Adrien Plazas
6a1ce14da1 meson: Add config.h
This will be used to factorize project-related information like APP_ID.
2018-10-01 08:18:28 +02:00
Bob Ham
b8b10ad961 Merge branch 'wip/sadiq/fixes' into 'master'
new-call: Set input hints and purpose of SearchEntry

See merge request Librem5/calls!20
2018-09-28 15:00:05 +00:00
purism
9951fbf812 mm-call: Set call state on construction 2018-09-27 08:46:47 +00:00
purism
1c37b39398 mm-call,call-display: Add more debugging output for state changes 2018-09-27 08:44:24 +00:00
purism
635b3f74b8 mm-origin: Delete remnant disconnected calls on startup 2018-09-27 08:42:24 +00:00
purism
0d7e73ca63 mm-call: Fix mapping of alerting/incoming call states 2018-09-27 08:42:13 +00:00