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

Merge branch 'history_addons' into search_bar

parents 74ac1b0b 2ec7f41d
Branches
Tags
No related merge requests found
......@@ -335,8 +335,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)
{
......@@ -359,8 +366,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 ()
......@@ -482,7 +506,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
);
......@@ -594,8 +617,7 @@ update_call_tree (calltab_t* tab, call_t * c)
gchar * duration="";
if(c->state == CALL_STATE_TRANSFERT)
{
description = g_markup_printf_escaped("<b>%s</b>\n"
"%s\n<i>Transfert to:</i> %s",
description = g_markup_printf_escaped("<b>%s</b> <i>%s</i>\n<i>Transfert to:</i> %s",
call_get_number(c),
call_get_name(c),
c->to);
......
......@@ -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