Message Dialog From Threaded Function
- From: André Casteliano <digitalcoder terra com br>
 
- To: gtk-app-devel-list gnome org
 
- Subject: Message Dialog From Threaded Function
 
- Date: Mon, 9 Dec 2002 22:28:49 -0200
 
Hi all,
why this not work ?
 -- SNIP --
if (!printer_device) { // err opening printer port
        gdk_threads_enter ();
        dialog = gtk_message_dialog_new (GTK_WINDOW (win_princ), GTK_DIALOG_MODAL,
                        GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error opening printer port %s.\n"
                        "Err: %s", PRINTER_PORT, 
                        g_locale_to_utf8(strerror(errno), -1, NULL, NULL, NULL));
                
        gtk_dialog_run (GTK_DIALOG (dialog));
        gtk_widget_destroy (dialog);
        gdk_threads_leave ();
        return NULL;
}
 -- SNIP --
This code is inside a thread function called from pthread_create ()
The message dialog is displayed correctly but when the user click on 'OK' button this not desappear.
What's wrong ?
PS: sorry for my bad english :)
-- 
Andre Casteliano
+-=-=[ digitalcoder users sourceforge net]=-=-+
[ Linux User: # 178853  Machine: # 79923      ]
[ Linux Heavy User - Powered by Slackware 8.1 ]
+-=-=[ www.geocities.com/andrecasteliano ]=-=-+
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]