Skip to content

Commit

Permalink
Made cancelling video calls use the video button
Browse files Browse the repository at this point in the history
  • Loading branch information
Doom032 committed Jan 23, 2015
1 parent 6845da9 commit a356f40
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ui_buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ static void button_call_onpress(void)
break;
}

case CALL_RINGING:
case CALL_RINGING_VIDEO: {
case CALL_RINGING: {
tox_postmessage(TOX_CANCELCALL, f->callid, f - friend, NULL);
debug("Cancelling call: id = %u, friend = %u\n", f->callid, f - friend);
break;
Expand All @@ -153,7 +152,6 @@ static void button_call_updatecolor(BUTTON *b)

switch(f->calling) {
case CALL_RINGING:
case CALL_RINGING_VIDEO:
case CALL_INVITED: {
b->c1 = C_YELLOW;
b->c2 = C_YELLOW_LIGHT;
Expand All @@ -171,6 +169,7 @@ static void button_call_updatecolor(BUTTON *b)
/* fall through */
}

case CALL_RINGING_VIDEO:
case CALL_INVITED_VIDEO: {
b->c1 = C_GRAY;
b->c2 = C_GRAY;
Expand Down Expand Up @@ -207,6 +206,13 @@ static void button_video_onpress(void)
break;
}

case CALL_RINGING_VIDEO: {
tox_postmessage(TOX_CANCELCALL, f->callid, f - friend, NULL);
debug("Cancelling call: id = %u, friend = %u\n", f->callid, f - friend);
break;
}


case CALL_OK: {
tox_postmessage(TOX_CALL_VIDEO_ON, f - friend, f->callid, NULL);
debug("start sending video\n");
Expand All @@ -226,6 +232,7 @@ static void button_video_updatecolor(BUTTON *b)
FRIEND *f = sitem->data;

switch(f->calling) {
case CALL_RINGING_VIDEO:
case CALL_INVITED_VIDEO: {
b->c1 = C_YELLOW;
b->c2 = C_YELLOW_LIGHT;
Expand All @@ -244,7 +251,6 @@ static void button_video_updatecolor(BUTTON *b)
}

case CALL_RINGING:
case CALL_RINGING_VIDEO:
case CALL_INVITED: {
b->c1 = C_GRAY;
b->c2 = C_GRAY;
Expand Down

0 comments on commit a356f40

Please sign in to comment.