Please Help - Problem with message dialog



hi all,
i have a function in which i create and display an info message dialog. I have used this to display info while in the background file loading onto card occurs.I have used a thread to create this dialog box.
first time when i create this message dialog thread, the dialog is displayed and message dialog functions correctly.First time the parent is the main application window.
Second time i need to invoke this message dialog , the parent of this message dialog is then the child of a child dialog of the main application window..
Though the g_print statement are seen, i cannot see the message dialog second time.No other errors are observed.
I am not able to understand where my code is going wrong.
can anybody please help me?

this is the function i am using to create and show the message dialog window.
The dialog gets destroyed when the background function gets completed.
---------------------------------------------------------------------------------------------------------------
code --
---------------------------------------------------------------------------------------------------------------
static void function(GtkWidget* parent)
{
    message_dialog = gtk_message_dialog_new(GTK_WINDOW(parent),
                                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                                 GTK_MESSAGE_INFO,
                                                 GTK_BUTTONS_NONE,
                                                 "Loading .run File on Card..."
                                                );

    g_mutex_lock(msg_dlg_mutex);
    {
        init_msgdlg_fl = 1;
        g_print("\n\nMessage Dialog Has been Created\n\n");
      /*background function starts after message dialog creation*/
    }  
    g_mutex_unlock(msg_dlg_mutex);

    gtk_dialog_run (GTK_DIALOG (init_message_dialog));
   /*the background function sends a delete dialog event after completion of its task*/
    gtk_widget_destroy (init_message_dialog);
    g_print("\n\nMessage Dialog Has been Destroyed\n\n");
    init_msgdlg_fl = 0;
}
-------------------------------------------------------------------------------------------------
Thanks and Regards,
Renuka Kusurkar


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]