Commit 201aeb15 authored by Alexandre Savard's avatar Alexandre Savard

[#2447] Bind offHold/onHold actions to button in gtk client

parent 9a290fc9
...@@ -442,6 +442,9 @@ sflphone_pick_up() ...@@ -442,6 +442,9 @@ sflphone_pick_up()
sflphone_on_hold () sflphone_on_hold ()
{ {
callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree);
DEBUG("sflphone_on_hold");
if(selectedCall) if(selectedCall)
{ {
switch(selectedCall->_state) switch(selectedCall->_state)
...@@ -458,12 +461,18 @@ sflphone_on_hold () ...@@ -458,12 +461,18 @@ sflphone_on_hold ()
break; break;
} }
} }
else if (selectedConf) {
dbus_hold_conference(selectedConf);
}
} }
void void
sflphone_off_hold () sflphone_off_hold ()
{ {
DEBUG("sflphone_off_hold");
callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree);
if(selectedCall) if(selectedCall)
{ {
switch(selectedCall->_state) switch(selectedCall->_state)
...@@ -476,7 +485,12 @@ sflphone_off_hold () ...@@ -476,7 +485,12 @@ sflphone_off_hold ()
break; break;
} }
} }
else if (selectedConf) {
dbus_unhold_conference(selectedConf);
}
/*
if(dbus_get_is_recording(selectedCall)) if(dbus_get_is_recording(selectedCall))
{ {
DEBUG("Currently recording!"); DEBUG("Currently recording!");
...@@ -485,6 +499,7 @@ sflphone_off_hold () ...@@ -485,6 +499,7 @@ sflphone_off_hold ()
{ {
DEBUG("Not recording currently"); DEBUG("Not recording currently");
} }
*/
} }
......
...@@ -385,6 +385,7 @@ switch_account( GtkWidget* item , gpointer data UNUSED) ...@@ -385,6 +385,7 @@ switch_account( GtkWidget* item , gpointer data UNUSED)
call_hold (void* foo UNUSED) call_hold (void* foo UNUSED)
{ {
callable_obj_t * selectedCall = calltab_get_selected_call(current_calls); callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
conference_obj_t * selectedConf = calltab_get_selected_conf();
if(selectedCall) if(selectedCall)
{ {
...@@ -397,6 +398,28 @@ call_hold (void* foo UNUSED) ...@@ -397,6 +398,28 @@ call_hold (void* foo UNUSED)
sflphone_on_hold(); sflphone_on_hold();
} }
} }
else if (selectedConf) {
switch(selectedConf->_state) {
case CONFERENCE_STATE_HOLD:
{
selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
sflphone_conference_off_hold(selectedConf);
}
break;
case CONFERENCE_STATE_ACTIVE_ATACHED:
case CONFERENCE_STATE_ACTIVE_DETACHED: {
selectedConf->_state = CONFERENCE_STATE_HOLD;
sflphone_conference_on_hold(selectedConf);
}
break;
default:
break;
}
}
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment