Non modal dialog : how?

Hello all,

I have been looking for a solution for many days but I am really stuck with
this very simple issue:

I want to display a MessageDialog saying only "Please wait" (no button)
while executing another command then automatically destroy this dialog when
the command has finished:


1-create and show messageDialog
2-do something else
3-hide or destroy messageDialog

Thus I want this MessageDialog NOT to be modal (otherwise it won't reach the
"do something else" before being closed).

The problem I face is the following:
- if I use waitingDialog->run(); then the dialog is modal (even if I set the
bool modal=false; at creation of the dialog)
- if I use waitingDialog->show() or showall(); then the dialog appears but
it is ALL BLANK, without any widget (the text I defined at creation of the
dialog or using the setMessage function does not appear). How strange!

I tried to call show() on the Box content_area of the dialog but that does
not work either.

Strangely, I cannot find much information about non modal dialogs on the web.

Any help would be greatly appreciated. Thanks!


here is the code with everything I tried, unsuccessfully:

Gtk::MessageDialog *waitingDialog = new Gtk::MessageDialog(*this, "Please
wait", false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_NONE, false);
Gtk::Box *contentDialog = waitingDialog->get_content_area();
waitingDialog->set_message("Please wait")
//waitingDialog->run(); --> only for MODAL dialog (I think...)

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