Yves Willems wrote:
> Hi all,
> 
>  
> 
> I have a multi threaded GTK app and want to show an error dialogue for an
> error that occurred on a thread different then the main thread.
> 
> When showing the dialogue on this thread, the 'waiting for OK' blocks the
> main thread and therefore freezes my GUI.
> 
> 
> Can anyone give me a hint how to tackle such a problem?

/* Thread that recieved the error */
text = g_strdup_printf ("The error that occurred");
g_idle_add (report_error_dialog, text);

/* Main Thread */
gboolean
report_error_dialog (gchar *text)
{
        /* Show "text" in dialog here */

        g_free (text);
        return FALSE;
}

Cheers,
                  -Tristan
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to