/* Returns: TRUE if a source was found and removed.  */
gboolean g_source_remove_by_user_data(gpointer user_data)
/* Returns: TRUE if a source was found and removed.  */
gboolean g_source_remove_by_user_data(gpointer user_data)
{
  GSource *source;
  source = g_main_context_find_source_by_user_data (NULL, user_data);
  if (source)
    {
      g_source_destroy (source);
      return TRUE;
    }
  else
    return FALSE;
}