diff --git a/sflphone-client-gnome/src/callable_obj.c b/sflphone-client-gnome/src/callable_obj.c index 4b1d075c6c1b000c8421afaae9bc3593acb1ece8..8cff3894f7e88fe714cd8ab5a93ba3d0e567db67 100644 --- a/sflphone-client-gnome/src/callable_obj.c +++ b/sflphone-client-gnome/src/callable_obj.c @@ -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 ) diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 2eb489fa725500504404a34c4462174b0526d473..3b6237181f0eafcae7d3c3feacb2ab6392266c54 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -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); diff --git a/sflphone-client-gnome/src/contacts/history.c b/sflphone-client-gnome/src/contacts/history.c index 5ce53416f65c3120f79739d92033776cab2cba65..6d18b39471b02f8510022d7206dc9df6a88b1ade 100644 --- a/sflphone-client-gnome/src/contacts/history.c +++ b/sflphone-client-gnome/src/contacts/history.c @@ -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); diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c index 764516345a3158481170274b5e63ec80ca99a5da..b7e50863896d3712e0961fcfe35f4ed735e106cf 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.c +++ b/sflphone-client-gnome/src/contacts/searchbar.c @@ -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) ); diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index 5e83cbb0372300807823cb29fb8c0d403fa9c878..ad4fc09a2a5810a8c5fb9cb1e07045225f195e16 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -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(); diff --git a/sflphone-client-gnome/src/mainwindow.c b/sflphone-client-gnome/src/mainwindow.c index d481473024f30dfcfc20cb8d4455417d554bfed5..df5b9ce9e2d94746f1c600c1965c9a600876f4ad 100644 --- a/sflphone-client-gnome/src/mainwindow.c +++ b/sflphone-client-gnome/src/mainwindow.c @@ -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 || @@ -119,8 +118,7 @@ on_key_released (GtkWidget *widget, GdkEventKey *event, gpointer user_data UNUSE ) return FALSE; else - sflphone_keypad(event->keyval, event->string); - + sflphone_keypad(event->keyval, event->string); } return TRUE;