diff finch/gntblist.c @ 25877:bd18bb4915ba

*** Plucked rev 143e16e9 (sadrul@pidgin.im): Save the world. Patch from Arunan Bala to save the world. But instead of saving the cheerleader, he's using g_timeout_add_seconds where possible in place of g_timeout_add. Closes #8831. *** Plucked rev 4a4ac072 (sadrul@pidgin.im): Update the copyright name, as requested. *** Plucked rev 91e51efe (sadrul@pidgin.im): Update the finch manual some. Refs #8577.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 30 Apr 2009 14:02:33 +0000
parents e0c8f689f60c
children 01f1929d0936
line wrap: on
line diff
--- a/finch/gntblist.c	Thu Apr 30 05:19:41 2009 +0000
+++ b/finch/gntblist.c	Thu Apr 30 14:02:33 2009 +0000
@@ -61,7 +61,7 @@
 #include <string.h>
 
 #define PREF_ROOT "/finch/blist"
-#define TYPING_TIMEOUT 4000
+#define TYPING_TIMEOUT_S 4
 
 #define SHOW_EMPTY_GROUP_TIMEOUT  60
 
@@ -2012,7 +2012,7 @@
 	}
 
 	if (ggblist->typing)
-		g_source_remove(ggblist->typing);
+		purple_timeout_remove(ggblist->typing);
 	remove_peripherals(ggblist);
 	if (ggblist->tagged)
 		g_list_free(ggblist->tagged);
@@ -2249,7 +2249,7 @@
 end:
 	g_free(escnewmessage);
 	if (ggblist->typing)
-		g_source_remove(ggblist->typing);
+		purple_timeout_remove(ggblist->typing);
 	ggblist->typing = 0;
 	return FALSE;
 }
@@ -2268,7 +2268,7 @@
 		/* Move the focus to the entry box */
 		/* XXX: Make sure the selected status can have a message */
 		gnt_box_move_focus(GNT_BOX(ggblist->window), 1);
-		ggblist->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, NULL);
+		ggblist->typing = purple_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL);
 	}
 	else if (now->type == STATUS_SAVED_ALL)
 	{
@@ -2294,7 +2294,7 @@
 		return FALSE;
 
 	if (ggblist->typing)
-		g_source_remove(ggblist->typing);
+		purple_timeout_remove(ggblist->typing);
 	ggblist->typing = 0;
 
 	if (text[0] == '\r' && text[1] == 0)
@@ -2304,7 +2304,7 @@
 		return TRUE;
 	}
 
-	ggblist->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, NULL);
+	ggblist->typing = purple_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL);
 	return FALSE;
 }