aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-subscription-editor.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-30 02:04:54 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-10-30 03:22:35 +0800
commitbc0d5d40ed39c92dcdf62ae891a2e99c25237d74 (patch)
treea07763eeaa20602bd4c0620b2fe67c443c52d29c /mail/em-subscription-editor.c
parentd3e0f96c73dde49acde92f6347b9e362d85e94aa (diff)
downloadgsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar
gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.gz
gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.bz2
gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.lz
gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.xz
gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.tar.zst
gsoc2013-evolution-bc0d5d40ed39c92dcdf62ae891a2e99c25237d74.zip
Bug 710797 - Name all the timeouts added with g_timeout_add()
Diffstat (limited to 'mail/em-subscription-editor.c')
-rw-r--r--mail/em-subscription-editor.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index e210652d37..77fb6b2bb1 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -1187,8 +1187,11 @@ subscription_editor_update_view (EMSubscriptionEditor *editor)
}
static gboolean
-subscription_editor_timeout_cb (EMSubscriptionEditor *editor)
+subscription_editor_timeout_cb (gpointer user_data)
{
+ EMSubscriptionEditor *editor;
+
+ editor = EM_SUBSCRIPTION_EDITOR (user_data);
subscription_editor_update_view (editor);
editor->priv->timeout_id = 0;
@@ -1234,11 +1237,12 @@ subscription_editor_entry_changed_cb (GtkEntry *entry,
text = gtk_entry_get_text (entry);
- if (text != NULL && *text != '\0')
- editor->priv->timeout_id = g_timeout_add_seconds (
- 1, (GSourceFunc) subscription_editor_timeout_cb, editor);
- else
+ if (text != NULL && *text != '\0') {
+ editor->priv->timeout_id = e_named_timeout_add_seconds (
+ 1, subscription_editor_timeout_cb, editor);
+ } else {
subscription_editor_update_view (editor);
+ }
}
static void