Skip to content
Snippets Groups Projects
Commit 9dbc5062 authored by pierre-luc's avatar pierre-luc
Browse files

[#1870] In call_state_cb (dbus.c:126), _time_stop was overridden by the actual time.

parent 2cc791d3
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,8 @@
*/
#include <callable_obj.h>
#include <sflphone_const.h>
#include <time.h>
gint is_callID_callstruct ( gconstpointer a, gconstpointer b)
{
......@@ -239,8 +241,9 @@ gchar* get_call_duration (callable_obj_t *obj)
if (start == end)
return g_markup_printf_escaped("<small>Duration:</small> 0:00");
duration = (int)end - (int)start;
duration = (int) difftime(end, start);
DEBUG("END: %d START: %d DURATION: %d", end, start, duration);
if( duration / 60 == 0 )
{
if( duration < 10 )
......
......@@ -157,14 +157,14 @@ calltree_reset (calltab_t* tab)
void
focus_on_calltree_out(){
DEBUG("set_focus_on_calltree_out \n");
DEBUG("set_focus_on_calltree_out");
// gtk_widget_grab_focus(GTK_WIDGET(sw));
focus_is_on_calltree = FALSE;
}
void
focus_on_calltree_in(){
DEBUG("set_focus_on_calltree_in \n");
DEBUG("set_focus_on_calltree_in");
// gtk_widget_grab_focus(GTK_WIDGET(sw));
focus_is_on_calltree = TRUE;
}
......@@ -614,7 +614,7 @@ void calltree_display (calltab_t *tab) {
}
else
ERROR ("calltree.c line 1050 . This is probably a bug in the application");
ERROR ("calltree.c line %d . This is probably a bug in the application", __LINE__);
gtk_widget_hide (active_calltree->tree);
......
......@@ -57,7 +57,7 @@ static GtkTreeModel* history_create_filter (GtkTreeModel* child)
{
GtkTreeModel* ret;
DEBUG("Create Filter\n");
DEBUG("Create Filter");
ret = gtk_tree_model_filter_new (child, NULL);
gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (ret), history_is_visible, NULL, NULL);
return GTK_TREE_MODEL (ret);
......
......@@ -115,14 +115,14 @@ static void text_changed_cb (GtkEntry *entry, GParamSpec *pspec)
void
focus_on_searchbar_out(){
DEBUG("set_focus_on_searchbar_out \n");
DEBUG("set_focus_on_searchbar_out");
// gtk_widget_grab_focus(GTK_WIDGET(sw));
focus_is_on_searchbar = FALSE;
}
void
focus_on_searchbar_in(){
DEBUG("set_focus_on_searchbar_in \n");
DEBUG("set_focus_on_searchbar_in");
// gtk_widget_grab_focus(GTK_WIDGET(sw));
focus_is_on_searchbar = TRUE;
}
......@@ -198,7 +198,6 @@ GtkWidget* history_searchbar_new (void)
gtk_widget_show_all (menu);
#else
searchbox = sexy_icon_entry_new();
image = gtk_image_new_from_stock( GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(searchbox), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
......
......@@ -121,9 +121,9 @@ call_state_cb (DBusGProxy *proxy UNUSED,
{
if(c->_state==CALL_STATE_CURRENT)
{
// peer hung up, the conversation was established, so _start has been initialized with the current time value
// peer hung up, the conversation was established, so _stop has been initialized with the current time value
DEBUG("call state current");
set_timestamp (&c->_time_start);
set_timestamp (&c->_time_stop);
calltree_update_call( history, c );
}
stop_notification();
......
......@@ -104,7 +104,6 @@ on_key_released (GtkWidget *widget, GdkEventKey *event, gpointer user_data UNUSE
{
DEBUG("On key released from Main Window : %s\n", gtk_widget_get_name(widget));
if (focus_is_on_searchbar == FALSE) {
// If a modifier key is pressed, it's a shortcut, pass along
if(event->state & GDK_CONTROL_MASK ||
......@@ -120,7 +119,6 @@ on_key_released (GtkWidget *widget, GdkEventKey *event, gpointer user_data UNUSE
return FALSE;
else
sflphone_keypad(event->keyval, event->string);
}
return TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment