[Haskell-cafe] Gtk2Hs, Glade,
Multiple windows/dialog in one interface file.
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Sun Jul 8 16:38:05 EDT 2007
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 aboutdialog
> return True
> onResponse aboutdialog $ \resp -> do
> case resp of
> ResponseClose -> widgetHide aboutdialog
> otherwise -> return ()
That looks reasonable to me, unfortunately I'd guess the dialog
already got dealt with in the stock Close button handler. You might
need to dig inside the AboutDialog and install your own onClicked
handler on the Close button.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe
mailing list