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

736 commits

Author SHA1 Message Date
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