1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-25 05:09:30 +00:00

mm-call,call-display: Add more debugging output for state changes

This commit is contained in:
purism 2018-09-27 08:37:14 +00:00
parent 635b3f74b8
commit 1c37b39398
2 changed files with 14 additions and 10 deletions

View file

@ -177,6 +177,7 @@ call_state_changed_cb (CallsCallDisplay *self,
calls_call_state_to_string (state_str, state);
gtk_label_set_text (self->status, state_str->str);
g_debug ("Call state changed to `%s'", state_str->str);
g_string_free (state_str, TRUE);
switch (state)

View file

@ -151,22 +151,23 @@ set_disconnect_reason (CallsMMCall *self,
struct CallsMMCallStateMap
{
MMCallState mm;
CallsCallState calls;
MMCallState mm;
CallsCallState calls;
const gchar *name;
};
static const struct CallsMMCallStateMap STATE_MAP[] = {
#define row(MMENUM,CALLSENUM) \
{ MM_CALL_STATE_##MMENUM, CALLS_CALL_STATE_##CALLSENUM } \
#define row(MMENUM,CALLSENUM) \
{ MM_CALL_STATE_##MMENUM, CALLS_CALL_STATE_##CALLSENUM, #MMENUM } \
row (DIALING, DIALING),
row (DIALING, DIALING),
row (RINGING_OUT, ALERTING),
row (RINGING_IN, INCOMING),
row (ACTIVE, ACTIVE),
row (HELD, HELD),
row (WAITING, INCOMING),
row (TERMINATED, DISCONNECTED),
row (RINGING_IN, INCOMING),
row (ACTIVE, ACTIVE),
row (HELD, HELD),
row (WAITING, INCOMING),
row (TERMINATED, DISCONNECTED),
#undef row
@ -191,6 +192,8 @@ state_changed_cb (CallsMMCall *self,
{
if (map_row->mm == mm_new)
{
g_debug ("MM call state changed to `%s'",
map_row->name);
change_state (self, map_row->calls);
return;
}