One example here:
Class:
https://github.com/synfig/synfig/blob/master/synfig-studio/src/gui/onemoment.h
https://github.com/synfig/synfig/blob/master/synfig-studio/src/gui/onemoment.cpp


Usage example:
https://github.com/synfig/synfig/blob/master/synfig-studio/src/gui/app.cpp#L2492

Notice that you just need to create the class instance and it will disappear 
when there aren't event pending or when you explicitly call onemoment.hide() 
once the stuff is done.

I hope it helps
Carlos




>________________________________
> De: Yannick <[email protected]>
>Para: [email protected] 
>Enviado: Martes 7 de Mayo de 2013 16:14
>Asunto: 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:
>
>basically:
>
>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!
>
>Yannick.
>
>
>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();
>contentDialog->show_all();
>waitingDialog->set_message("Please wait")
>waitingDialog->activate();
>waitingDialog->show(); 
>waitingDialog->show_all(); 
>waitingDialog->present();
>//waitingDialog->run(); --> only for MODAL dialog (I think...)
>    
>doSomethingElse();
>    
>waitingDialog->hide();
>delete(waitingDialog);
>
>
>
>_______________________________________________
>gtkmm-list mailing list
>[email protected]
>https://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
>
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to