RE: best way to use multiple windows

2005-07-19 Thread Foster, Gareth
> Isn't that dangerous if exceptions are thrown? Why not let > the compiler > do the dirty work? Remember that just the gtkmm instances like a > Gtk::Dialog are created on the stack, but they create their > underlaying > GTK+ objects on the heap. This method seems to be the C++ way for me. > > B

Re: best way to use multiple windows

2005-07-18 Thread Armin Burgmeier
John Taber wrote: > Well, it is heap vs stack - I am not sure which is really better for > "normal" gui applications. But I have always created my dialogs as > pointers - it just seems more traditional c++. Isn't that dangerous if exceptions are thrown? Why not let the compiler do the dirty work?

Re: best way to use multiple windows

2005-07-18 Thread John Taber
Armin Burgmeier wrote: John Taber wrote: Well, it is heap vs stack - I am not sure which is really better for "normal" gui applications. But I have always created my dialogs as pointers - it just seems more traditional c++. Isn't that dangerous if exceptions are thrown? Why not let the compi

Re: best way to use multiple windows

2005-07-18 Thread John Taber
Well, it is heap vs stack - I am not sure which is really better for "normal" gui applications. But I have always created my dialogs as pointers - it just seems more traditional c++. MyPopupDialog *dlg = new MyPopupDialog(...) { //set dialog to modal (but it can sometimes get hidden by other /

Re: best way to use multiple windows

2005-07-17 Thread Armin Burgmeier
Hi, my approach to this is to derive such windows from Gtk::Dialog and to add two buttons with Gtk::RESPONSE_OK and Gtk::RESPONSE_CANCEL. To show the dialog, simply do MyDialog dialog(*this, foo, bar); if(dialog.run() == Gtk::RESPONSE_OK) { // Take settings into main app } Gtk::Dialog::run blo

Re: best way to use multiple windows

2005-07-17 Thread Murray Cumming
On Sun, 2005-07-17 at 18:31 +0200, Antonio Coralles wrote: > However, i would not be surprised if that leads to a SIGSEGV, as the > window, and m_sig_hide will be deleted before the function exits libsigc++ copes with that. -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com www.openismus.c

Re: best way to use multiple windows

2005-07-17 Thread Antonio Coralles
Thiago Guzella wrote: > Greetings everyone, > > > I am writing a simple GTKmm (btw, GTKmm 2.4) application, which has a > main window, a menu, etc, using glade (just to place the widgets). > Some options in the menu (such as "preferences") are required to open > a modal window, with apply and reve

best way to use multiple windows

2005-07-17 Thread Thiago Guzella
Greetings everyone, I am writing a simple GTKmm (btw, GTKmm 2.4) application, which has a main window, a menu, etc, using glade (just to place the widgets). Some options in the menu (such as "preferences") are required to open a modal window, with apply and revert buttons, allowing the user to tw