Skip to content
Snippets Groups Projects
Commit bce5af68 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Disable hungup option on the contact tab

parent 5dcd9f57
Branches
Tags
No related merge requests found
...@@ -743,6 +743,7 @@ sflphone_place_call ( call_t * c ) ...@@ -743,6 +743,7 @@ sflphone_place_call ( call_t * c )
} }
// Update history // Update history
c->history_state = OUTGOING; c->history_state = OUTGOING;
g_print ("add in history\n");
call_list_add(history, c); call_list_add(history, c);
} }
} }
......
...@@ -319,7 +319,7 @@ toolbar_update_buttons () ...@@ -319,7 +319,7 @@ toolbar_update_buttons ()
gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(callButton), TRUE);
break; break;
case CALL_STATE_DIALING: case CALL_STATE_DIALING:
if( active_calltree != history ) gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE); if( active_calltree == current_calls ) gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE);
gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE); gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE);
g_object_ref(callButton); g_object_ref(callButton);
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton)); gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton));
...@@ -399,10 +399,12 @@ void row_activated(GtkTreeView *tree_view UNUSED, ...@@ -399,10 +399,12 @@ void row_activated(GtkTreeView *tree_view UNUSED,
GtkTreeViewColumn *column UNUSED, GtkTreeViewColumn *column UNUSED,
void * data UNUSED) void * data UNUSED)
{ {
g_print("double click action\n");
call_t* selectedCall; call_t* selectedCall;
call_t* new_call; call_t* new_call;
gchar *to, *from, *account_id; gchar *to, *from, *account_id;
g_print("double click action\n");
selectedCall = call_get_selected( active_calltree ); selectedCall = call_get_selected( active_calltree );
if (selectedCall) if (selectedCall)
...@@ -432,13 +434,15 @@ void row_activated(GtkTreeView *tree_view UNUSED, ...@@ -432,13 +434,15 @@ void row_activated(GtkTreeView *tree_view UNUSED,
break; break;
} }
} }
// if history
// If history or contact: double click action places a new call
else else
{ {
to = g_strdup(call_get_number(selectedCall)); to = g_strdup(call_get_number(selectedCall));
from = g_strconcat("\"\" <", call_get_number(selectedCall), ">",NULL); from = g_strconcat("\"\" <", call_get_number(selectedCall), ">",NULL);
account_id = g_strdup (selectedCall->accountID); account_id = g_strdup (selectedCall->accountID);
// Create a new call
create_new_call (to, from, CALL_STATE_DIALING, account_id, &new_call); create_new_call (to, from, CALL_STATE_DIALING, account_id, &new_call);
call_list_add(current_calls, new_call); call_list_add(current_calls, new_call);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment