# HG changeset patch # User Sadrul Habib Chowdhury # Date 1241100153 0 # Node ID bd18bb4915ba412d1fcfe6e1ba003da9d6d6d02f # Parent 70df8067d41ead6c8b7e2e67921a237d0f784a30 *** 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. diff -r 70df8067d41e -r bd18bb4915ba COPYRIGHT --- a/COPYRIGHT Thu Apr 30 05:19:41 2009 +0000 +++ b/COPYRIGHT Thu Apr 30 14:02:33 2009 +0000 @@ -19,6 +19,7 @@ Christopher Ayoup Alex Badea John Bailey +Arunan Balasubramaniam R. Tyler Ballance Chris Banal Luca Barbato diff -r 70df8067d41e -r bd18bb4915ba finch/gntblist.c --- 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 #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; } diff -r 70df8067d41e -r bd18bb4915ba finch/plugins/gntgf.c --- a/finch/plugins/gntgf.c Thu Apr 30 05:19:41 2009 +0000 +++ b/finch/plugins/gntgf.c Thu Apr 30 14:02:33 2009 +0000 @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -75,7 +76,7 @@ { toasters = g_list_remove(toasters, toast); gnt_widget_destroy(toast->window); - g_source_remove(toast->timer); + purple_timeout_remove(toast->timer); g_free(toast); } @@ -220,7 +221,7 @@ } gnt_widget_draw(window); - toast->timer = g_timeout_add(4000, (GSourceFunc)remove_toaster, toast); + toast->timer = purple_timeout_add_seconds(4, (GSourceFunc)remove_toaster, toast); toasters = g_list_prepend(toasters, toast); }