Haskell gtk2hs closing aboutDialogs

I'm having some trouble with the close buttons of aboutDialogs in gtk2hs. Here is my code

 aboutMenuAction <- xmlGetWidget xml castToMenuItem "menuAbout"
 onActivateLeaf aboutMenuAction $ do ad <- aboutDialogNew
                                     aboutDialogSetName ad "..."
                                     aboutDialogSetAuthors ad ["...","..."]
                                     widgetShowAll ad

This displays the aboutDialog fine, but the close button doesn't function at all. I wasn't able to find much about this, and have no idea how to get the close button functioning.

Cheers, Josh.

Answers


This works for me:

about = do
    ad <- aboutDialogNew
    aboutDialogSetName ad "Horde Test Program"
    aboutDialogSetVersion ad "1.0"
    aboutDialogSetAuthors ad $ ["Thomas M. DuBuisson "
        ++ "<Thomas.DuBuisson@gmail.com>"]
    aboutDialogSetComments ad $ ""
    dialogRun ad
    widgetDestroy ad

And to create that about dialog I have some buttons:

qa <- buttonNewFromStock stockAbout
onClicked qa $ about
-- ...
bb <- hButtonBoxNew
containerAdd bb qa

Disclaimer: For this program I took the carsim GTK demo as a starting point, so the code and even variable names probably still match that.


Need Your Help

Installing VCL component in Delphi & C++ Builder

delphi components c++builder vcl rad-studio

I created a VCL component in Delphi XE2 and want to install it in entire RAD studio (both Delphi &amp; C++ Builder).

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.