Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-09 Thread Duncan Coutts
On Sun, 2007-07-08 at 16:40 -0400, Brandon S. Allbery KF8NH wrote: > On Jul 8, 2007, at 16:36 , D.V. wrote: > > > I finally got it to work with onResponse : I traced each possible > > response to see which one was fired when clicking the close button And what was the result? > Great, another

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread Brandon S. Allbery KF8NH
On Jul 8, 2007, at 16:36 , D.V. wrote: I finally got it to work with onResponse : I traced each possible response to see which one was fired when clicking the close button Great, another place where the documentation's wrong. :/ (onActivateLeaf vs. onActivateItem (and after- versions)

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread D . V .
I finally got it to work with onResponse : I traced each possible response to see which one was fired when clicking the close button onResponse aboutdialog $ \resp -> do putStrLn "onResponse!!!" case resp of ResponseNone-> putStrLn "ResponseNone" ResponseReject -

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread Brandon S. Allbery KF8NH
On Jul 8, 2007, at 16:24 , D.V. wrote: But I still can't react to that Close button that's automatically added to that About Dialog. Here's my latest (random) try : aboutdialog <- xmlGetWidget xml castToAboutDialog "aboutdialog1" onDelete aboutdialog $ \event -> do widgetHide aboutdial

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread D . V .
Oh ! Okay I tried and YOU ROCK ! Thanks a lot. Now it hides and comes back at will. But I still can't react to that Close button that's automatically added to that About Dialog. Here's my latest (random) try : aboutdialog <- xmlGetWidget xml castToAboutDialog "aboutdialog1" onDelete aboutdia

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread Brandon S. Allbery KF8NH
On Jul 8, 2007, at 16:00 , D.V. wrote: I'm not sure I understand xmlNewWithRootAndDomain, I'll make some tests. I found that it was necessary to load the window each time you need it. (you must re-load the XML each time) I was hoping I could only hide the dialog and not destroy it. As

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread D . V .
I'm not sure I understand xmlNewWithRootAndDomain, I'll make some tests. I found that it was necessary to load the window each time you need it. (you must re-load the XML each time) I was hoping I could only hide the dialog and not destroy it. ___ H

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread Brandon S. Allbery KF8NH
On Jul 8, 2007, at 15:37 , D.V. wrote: Is it possible to have multiple windows in a glade file, and display only one when the program starts, then show/hide the others as the need arises ? You can but it's not well documented. I found that it was necessary to load the window each time you ne

[Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-08 Thread D . V .
Is it possible to have multiple windows in a glade file, and display only one when the program starts, then show/hide the others as the need arises ? I can't find how... I have a main window with a menu. One entry shows the about dialog which is also defined in the glade file : aboutmenu <- x