Mercurial > pidgin
diff finch/libgnt/gnttree.c @ 26440:8df78c06d10e
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.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 05 Apr 2009 08:42:00 +0000 |
parents | c67d43408daa |
children | 28795b39d745 |
line wrap: on
line diff
--- a/finch/libgnt/gnttree.c Sun Apr 05 08:22:22 2009 +0000 +++ b/finch/libgnt/gnttree.c Sun Apr 05 08:42:00 2009 +0000 @@ -28,7 +28,7 @@ #include <string.h> #include <ctype.h> -#define SEARCH_TIMEOUT 4000 /* 4 secs */ +#define SEARCH_TIMEOUT_S 4 /* 4 secs */ #define SEARCHING(tree) (tree->priv->search && tree->priv->search->len > 0) #define COLUMN_INVISIBLE(tree, index) (tree->columns[index].flags & GNT_TREE_COLUMN_INVISIBLE) @@ -821,7 +821,7 @@ gnt_bindable_perform_action_key(GNT_BINDABLE(tree), text); } g_source_remove(tree->priv->search_timeout); - tree->priv->search_timeout = g_timeout_add(SEARCH_TIMEOUT, search_timeout, tree); + tree->priv->search_timeout = g_timeout_add_seconds(SEARCH_TIMEOUT_S, search_timeout, tree); return TRUE; } else if (text[0] == ' ' && text[1] == 0) { /* Space pressed */ @@ -933,7 +933,7 @@ return FALSE; GNT_WIDGET_SET_FLAGS(GNT_WIDGET(tree), GNT_WIDGET_DISABLE_ACTIONS); tree->priv->search = g_string_new(NULL); - tree->priv->search_timeout = g_timeout_add(SEARCH_TIMEOUT, search_timeout, tree); + tree->priv->search_timeout = g_timeout_add_seconds(SEARCH_TIMEOUT_S, search_timeout, tree); return TRUE; }