From 0ab84cc3ffe6129ae40ad436eb62fccbd52b00ad Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Sat, 13 Oct 2007 11:47:48 +0000 Subject: Use g_timeout_add_seconds when appropriated to avoid weaking the process 2007-10-13 Xavier Claessens * libempathy-gtk/empathy-main-window.c: * libempathy-gtk/empathy-presence-chooser.c: * libempathy-gtk/empathy-contact-list-view.c: * libempathy-gtk/empathy-contact-widget.c: * libempathy-gtk/empathy-chat.c: * libempathy-gtk/empathy-contact-list-store.c: * libempathy-gtk/empathy-chat-window.c: * libempathy/empathy-idle.c: * tests/contact-manager.c: Use g_timeout_add_seconds when appropriated to avoid weaking the process too much. svn path=/trunk/; revision=370 --- libempathy-gtk/empathy-contact-list-store.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'libempathy-gtk/empathy-contact-list-store.c') diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c index 6ca5c60a1..8638ce12e 100644 --- a/libempathy-gtk/empathy-contact-list-store.c +++ b/libempathy-gtk/empathy-contact-list-store.c @@ -43,11 +43,11 @@ * (e.g. online, offline or from normal to a busy state). */ -/* Time user is shown as active */ -#define ACTIVE_USER_SHOW_TIME 7000 +/* Time in seconds user is shown as active */ +#define ACTIVE_USER_SHOW_TIME 7 -/* Time after connecting which we wait before active users are enabled */ -#define ACTIVE_USER_WAIT_TO_ENABLE_TIME 5000 +/* Time in seconds after connecting which we wait before active users are enabled */ +#define ACTIVE_USER_WAIT_TO_ENABLE_TIME 5 #define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStorePriv)) @@ -220,9 +220,9 @@ empathy_contact_list_store_init (EmpathyContactListStore *store) priv = GET_PRIV (store); priv->show_avatars = TRUE; - priv->inhibit_active = g_timeout_add (ACTIVE_USER_WAIT_TO_ENABLE_TIME, - (GSourceFunc) contact_list_store_inibit_active_cb, - store); + priv->inhibit_active = g_timeout_add_seconds (ACTIVE_USER_WAIT_TO_ENABLE_TIME, + (GSourceFunc) contact_list_store_inibit_active_cb, + store); } static void @@ -984,9 +984,9 @@ contact_list_store_contact_update (EmpathyContactListStore *store, if (do_set_active) { data = contact_list_store_contact_active_new (store, contact, do_remove); - g_timeout_add (ACTIVE_USER_SHOW_TIME, - (GSourceFunc) contact_list_store_contact_active_cb, - data); + g_timeout_add_seconds (ACTIVE_USER_SHOW_TIME, + (GSourceFunc) contact_list_store_contact_active_cb, + data); } } -- cgit v1.2.3