[Bug 63402] Avatar image caching is not asynchronous

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 18 06:02:39 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=63402

--- Comment #15 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
(In reply to comment #14)
> > I'd prefer this to wait for whichever signal you emit last (which I think is
> > notify::avatar-file here).
> 
> How can I do that?

Something like this (pseudocode):

    static void
    notify_avatar_file_cb (GObject *object,
        GParamSpec *spec,
        gboolean *notified)
    {
      g_assert (!*notified);
      *notified = TRUE;
    }

    gboolean notified = FALSE;
    gulong notify_id;

    notify_id = g_signal_connect (contact, "notify::avatar-file",
        G_CALLBACK (notify_avatar_file_cb), &notified);

    while (!notified)
      g_main_context_iteration (NULL, TRUE);

    disconnect (contact, notify_id);

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list