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

DOuble click to place a call in the history tab

parent eee9c6f9
Branches
No related tags found
No related merge requests found
......@@ -334,8 +334,15 @@ void row_activated(GtkTreeView *tree_view,
GtkTreeViewColumn *column,
void * data)
{
call_t * selectedCall = call_get_selected(current_calls);
g_print("double click action\n");
call_t* selectedCall;
call_t* newCall;
selectedCall = call_get_selected( active_calltree );
if (selectedCall)
{
// Get the right event from the right calltree
if( active_calltree == current_calls )
{
switch(selectedCall->state)
{
......@@ -358,8 +365,25 @@ void row_activated(GtkTreeView *tree_view,
break;
}
}
}
else
{
newCall = g_new0( call_t, 1 );
newCall->to = g_strdup(call_get_number(selectedCall));
newCall->from = g_strconcat("\"\" <", call_get_number(selectedCall), ">",NULL);
newCall->state = CALL_STATE_DIALING;
newCall->callID = g_new0(gchar, 30);
g_sprintf(newCall->callID, "%d", rand());
newCall->_start = 0;
newCall->_stop = 0;
printf("call : from : %s to %s\n", newCall->from, newCall->to);
call_list_add(current_calls, newCall);
update_call_tree_add(current_calls, newCall);
sflphone_place_call(newCall);
switch_tab();
}
}
}
GtkWidget *
create_toolbar ()
......@@ -481,7 +505,6 @@ create_call_tree (calltab_t* tab)
tab->store = gtk_list_store_new (3,
GDK_TYPE_PIXBUF,// Icon
G_TYPE_STRING, // Description
G_TYPE_POINTER // Pointer to the Object
);
......
......@@ -239,5 +239,6 @@ stop_notification( void )
g_object_unref( notification );
notification = NULL;
}
notification = NULL;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment