1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-14 04:15:37 +00:00
Commit graph

562 commits

Author SHA1 Message Date
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
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
Mohammed Sadiq
6bcb4db25d history-box: Add empty view 2018-09-24 07:38:06 +05:30
Mohammed Sadiq
cbd15260b9 new-call: Set input hints and purpose of SearchEntry 2018-09-15 06:22:34 +05:30
Bob Ham
13a1944a69 Merge branch 'partial-ui-overhaul' into 'master'
Partial UI Overhaul

See merge request Librem5/calls!11
2018-08-29 16:44:50 +00:00
Guido Günther
7bc5f0ed90 main: Set program name to APP_ID
This makes sure we end up with the correct xdg app_id in Wayland:

before:

    [943832,359] -> xdg_toplevel@27.set_app_id("calls")

after:

    [1180814,499] -> xdg_toplevel@27.set_app_id("sm.puri.Calls")

Closes #8
2018-08-29 13:32:09 +02:00
Guido Günther
e0ef7f6f59 main: Factor out the appliction ID 2018-08-29 13:30:51 +02:00
Adrien Plazas
6d921bd667 main-window: Fix the title 2018-08-29 09:05:57 +02:00
Adrien Plazas
b05c6e34e2 main-window: Use a new call box
Replace the custom inplementation of a call box by a CallsNewCallBox
which is used to dial new calls and not to send DTMF tones as the call
display can now handle that.
2018-08-29 09:05:57 +02:00
Adrien Plazas
22d79bfbbf Add CallsNewCallBox 2018-08-29 09:05:57 +02:00
Adrien Plazas
a07b0b8382 main-window: Drop the new call expander
It is not needed anymore as the call display can send DTMF tones itself,
so instead let the dial pad always be available to send new calls.
2018-08-29 09:05:57 +02:00
Adrien Plazas
6182961f07 call-display: Add a dial pad overlay
Put the call display in an GtkOverlay and add a dial pad sending DTMF
tones as an overlay. Also make the dial pad overlay be triggered by the
dial pad button.
2018-08-29 09:05:57 +02:00
Adrien Plazas
0d98e17b05 main-window: Use CallsHistoryBox
This helps the window to be only a glue in between the actual UI
elements instead of handling a lot of the UI.
2018-08-29 09:05:57 +02:00
Adrien Plazas
70bafc2091 Add CallsHistoryBox 2018-08-29 09:05:57 +02:00
Bob Ham
0e293fc128 Add ModemManager provider 2018-08-03 14:22:12 +00:00
Adrien Plazas
90f3933e95 Drop the CALLS_SET_OBJECT_PROPERTY() macro
Replace it by g_set_object() as it does the same thing.
2018-08-03 11:30:18 +02:00
Adrien Plazas
3ebf58548c Drop the CALLS_FREE_PTR_PROPERTY() macro
Replace it by g_free() as it does the same thing.
2018-08-03 11:30:09 +02:00
Adrien Plazas
52f7f2da6f Drop the CALLS_DISPOSE_OBJECT() macro
Replace it by g_clear_object() as it does the same thing.
2018-08-03 11:29:56 +02:00
Adrien Plazas
e707894923 party: Replace the default party avatar
Replace the 'face-smile' icon by the better fitting
'avatar-default-symbolic' icon.
2018-07-31 10:20:38 +02:00
Adrien Plazas
c68b76fa63 call-display: Add an encryption indicator
This matches the final design.
2018-07-31 10:14:49 +02:00
Adrien Plazas
4616d6cafa Initialize CallsEncryptionIndicator
This is needed for that type to be used in the next commit.
2018-07-31 10:14:49 +02:00
Adrien Plazas
1dca8d34fb Add CallsEncryptionIndicator
This will be used in the next commit to let a call display indicate
whether the call is encrypted or not.
2018-07-31 10:14:49 +02:00
Adrien Plazas
7c974d38ed call-display: Make the buttons match the new design
Add 'mute' and 'dial pad' buttons, drop the 'hold' button, change the
size of the central buttons, make them use icons and drop the now
useless group size.
2018-07-31 10:14:49 +02:00
Adrien Plazas
b104483d3a call-display: Move hang up button at the bottom
Also make it match the final design.
2018-07-31 10:14:49 +02:00
Adrien Plazas
c5b1a3a923 call-display: Replace name by primary and secondary info
This better matches the final design and displays the most relevant
information available first.
2018-07-31 10:13:32 +02:00
Adrien Plazas
1a3d34bb2b call-display: Make time larger and give it some margin
This matches the final design.
2018-07-27 15:45:24 +02:00
Adrien Plazas
152c89ea79 call-display: Display two digits for minutes
This matches the final design.
2018-07-27 15:45:24 +02:00
Adrien Plazas
509f4227d9 call-display: Center and set the desired size
This will make the call display look closer to the final designs.
2018-07-27 12:56:28 +02:00
Adrien Plazas
76300d7d9d call-display: Drop a useless placeholder 2018-07-27 10:14:45 +02:00
Adrien Plazas
f511c342ca call-display: Drop useless packing information
Drop information that matches the default behavior as it ends up
creating noise when refactoring.
2018-07-27 10:14:45 +02:00
Bob Ham
b17ee0c16e Add initial unit tests for Provider
Largely cribbed from libhandy, thanks due to Guido.
2018-06-11 16:29:33 +01:00
Bob Ham
4d453f4b5b dummy-{provider,origin,calls}: Fix up dummy provider
* Implement CallsMessageSource
* Fix Provider object creation
* Add calls_dummy_provider_add_origin
2018-06-11 12:48:20 +01:00
Bob Ham
7da2f512f3 dummy-provider: Fix get_origins to return a copy of the origin list 2018-06-11 12:26:59 +01:00
Bob Ham
c2d7f08c42 ofono-origin: Remove commented-out junk 2018-05-31 11:13:41 +00:00
Bob Ham
443613991c ofono-{call,origin}: Send DTMF tones for active calls
The oFono DTMF support doesn't match our model; you can only send
tones to the network and not to a particular call.  The telephony
standards dictate that only a single call can be active at a time so
we just get the call to emit a "tone" signal if the call is in the
active state and get the origin to listen for the signal.
2018-05-31 10:43:10 +00:00
Bob Ham
dd815fa86f call: Allow for the inability to stop DTMF tones
Some implementations, like oFono, only allow fixed-length tones to be
sent to the network, not started and stopped at will.  To account for
this, we make the tone_start member function nullable and add a new
function, calls_call_tone_stoppable, to determine whether there is a
stop function.
2018-05-31 10:20:17 +00:00
Bob Ham
c62fc29b5f meson: install Calls binary and make libgdbofono static 2018-05-29 10:04:17 +01:00
Bob Ham
e81567786c Preliminary documentation of provider interfaces
* Preliminary documentation of CallsCall and CallsMessageSource
* Documentation and cleaning up of CallsCallData
* Add data files and meson rules to create gtk-doc documentation
* Move some macros from util.h to calls-message-source.h
2018-05-23 09:59:28 +01:00
Bob Ham
5abe9cad4e main-window.ui: Make sure message text wraps 2018-05-21 16:47:18 +01:00
Bob Ham
081cd360b8 meson: get rid of topdir_includes variable 2018-05-21 14:19:20 +01:00
Bob Ham
07eb23da0f Initial import of cleaned Calls working tree 2018-05-17 14:16:51 +01:00