mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-12 15:47:35 +00:00
ringer: use quiet profile for non-primary calls
This commit is contained in:
parent
30f30decd4
commit
78c0fb1ed7
1 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,10 @@ struct _CallsRinger
|
||||||
{
|
{
|
||||||
GObject parent_instance;
|
GObject parent_instance;
|
||||||
|
|
||||||
|
/* call_count keeps track of total ongoing calls.
|
||||||
|
* ring_count keeps track of ringing calls.
|
||||||
|
*/
|
||||||
|
unsigned call_count;
|
||||||
unsigned ring_count;
|
unsigned ring_count;
|
||||||
gboolean playing;
|
gboolean playing;
|
||||||
LfbEvent *event;
|
LfbEvent *event;
|
||||||
|
@ -73,6 +77,10 @@ start (CallsRinger *self)
|
||||||
|
|
||||||
if (self->event)
|
if (self->event)
|
||||||
{
|
{
|
||||||
|
if (self->call_count > self->ring_count)
|
||||||
|
{
|
||||||
|
lfb_event_set_feedback_profile (self->event, "quiet");
|
||||||
|
}
|
||||||
g_object_ref (self);
|
g_object_ref (self);
|
||||||
lfb_event_trigger_feedback_async (self->event,
|
lfb_event_trigger_feedback_async (self->event,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -190,6 +198,8 @@ update_count (CallsRinger *self,
|
||||||
CallsCall *call,
|
CallsCall *call,
|
||||||
short delta)
|
short delta)
|
||||||
{
|
{
|
||||||
|
self->call_count += delta;
|
||||||
|
|
||||||
if (is_ring_state (calls_call_get_state (call)))
|
if (is_ring_state (calls_call_get_state (call)))
|
||||||
{
|
{
|
||||||
self->ring_count += delta;
|
self->ring_count += delta;
|
||||||
|
|
Loading…
Reference in a new issue