DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XdSlStox1D3QGfTpNTRPeE1df2mpejYS42PVZu3JWo84wymqNMtnFcmeiTne2o0q1MpZMuV9tkfLvgNweKpYpP5u+hJuAsZdWQAdvBtI9jQ8JCTZEvmnVI2K81aX+pFmeoaPVctUmLa8uxWE3T/lavU2xouf0/dFBGlE/Z6oXIE= Message-ID: <90823c940610091301p30cc7a77i7693d69cd6d13cd1 at mail.gmail.com> Date: Tue, 10 Oct 2006 00:01:11 +0400 From: "Dmitry Bely" To: "Olivier Andrieu" Subject: Re: Button accelerators Cc: lablgtk at math.nagoya-u.ac.jp In-Reply-To: <17706.41325.334205.592636 at karryall.dnsalias.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <90823c940610091016i2ec702c6i8085fa434cb6a82e at mail.gmail.com> <17706.41325.334205.592636@karryall.dnsalias.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Length: 755 On 10/9/06, Olivier Andrieu wrote: > > I have a dialog with OK and Cancel buttons: > > > > Now I would like to add Enter/ESC accelerators to Ok and Cancel > > buttons respectively. How to do that? > > For enter, it's easy : > ,---- > | dialog#set_default_response `OK > `---- Well, if GEdit.entry is active this does not work. > For esc, it's a bit more complicated. It should work out of the box on > a C gtk+ app, but not with lablgtk. It should be fixed in GTK+ 2.10 > (it's bug #101293 in the GNOME bugzilla) but for previous versions you > need to manually connect a signal : > ,---- > | dialog#connect#close (fun () -> d#response `CANCEL) > `---- This works, thank you, but how to get the same for Enter? - Dmitry Bely