openldev wrote:
The reason that the children aren't shown when you don't call run() is because that function calls show_all() on the dialog. You will have to call that yourself (possibly on the dialog's internal Gtk::VBox.
I tried show_all() on every widget, even on every button itself, but how can it be different, no effect.
By the way, it's not a dialog but a Gtk::window.
Quote:
gtk_run() also creates a new main loop to implement the modal aspect of the dialog, so that would be a problem with your application. You shouldn't use run(), but use the response signal method. Then, use destroy() to make your windows go away rather than hide(), since hide() will only take them from the user's view, rather than destroy them. You can then use your Gtk::main::quit() function to exit the application.
Yes, I always thought that hide() just "simulates" an exit. But there is no destroy()-method. Actually there is a destroy_() method but it's protected and not public.
Quote:
To someone that is new to GTK+, it seems like a pain to quit the application, but it really does make perfect sense in terms of the underlying GLib main loop. The main loop is the reason that you have signals/events in GTK+. In fact, you can compile against just GLib, and use its main loop directly, which is used by GTK+'s main loop for the internal structure.
That sounds a little bit tricky.