diff options
author | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2009-04-30 14:02:33 +0000 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@pidgin.im> | 2009-04-30 14:02:33 +0000 |
commit | bf1b9dcd201e5b631a959930a5f0e58317125c31 (patch) | |
tree | 487ed7cefc0f022b78279324f3f97e3a29ee9e50 | |
parent | 11df7e5f8c50bc1cc6862e047613767b56b77e05 (diff) | |
download | pidgin-bf1b9dcd201e5b631a959930a5f0e58317125c31.tar.gz |
*** 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.
-rw-r--r-- | COPYRIGHT | 1 | ||||
-rw-r--r-- | finch/gntblist.c | 12 | ||||
-rw-r--r-- | finch/plugins/gntgf.c | 5 |
3 files changed, 10 insertions, 8 deletions
@@ -19,6 +19,7 @@ Kosta Arvanitis Christopher Ayoup Alex Badea John Bailey +Arunan Balasubramaniam R. Tyler Ballance Chris Banal Luca Barbato diff --git a/finch/gntblist.c b/finch/gntblist.c index 1c44ccf45c..064595506a 100644 --- a/finch/gntblist.c +++ b/finch/gntblist.c @@ -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 @@ reset_blist_window(GntWidget *window, gpointer null) } 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 @@ remove_typing_cb(gpointer null) 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 @@ status_selection_changed(GntComboBox *box, StatusBoxItem *old, StatusBoxItem *no /* 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 @@ status_text_changed(GntEntry *entry, const char *text, gpointer null) 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 @@ status_text_changed(GntEntry *entry, const char *text, gpointer null) 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 --git a/finch/plugins/gntgf.c b/finch/plugins/gntgf.c index f2e34cbbeb..1fea87003f 100644 --- a/finch/plugins/gntgf.c +++ b/finch/plugins/gntgf.c @@ -47,6 +47,7 @@ #include <blist.h> #include <conversation.h> #include <debug.h> +#include <eventloop.h> #include <util.h> #include <gnt.h> @@ -75,7 +76,7 @@ destroy_toaster(GntToast *toast) { 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 @@ notify(PurpleConversation *conv, const char *fmt, ...) } 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); } |