Date: Mon, 4 Oct 2004 13:55:18 +0200 From: Stefano Zacchiroli To: lablgtk at kaba.or.jp Subject: Re: overriding text view keyboard shortcut Message-ID: <20041004115518.GA6382 at fistandantilus.takhisis.org> References: <20041004092801.GA5587 at fistandantilus.takhisis.org> <20041004.122642.59485931.oandrieu at nerim.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041004.122642.59485931.oandrieu at nerim.net> On Mon, Oct 04, 2004 at 12:26:42PM +0200, Olivier Andrieu wrote: > Woah, using an EventBox is probably not the right way to do > this. Widgets key bindings can be customized via resource files (gtkrc > files), cf. the documentation on rc files : > http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html Thanks for your answer, I indeed wasn't aware of resource files. > LablGTK doesn't wrap many of these functions, only > GtkMain.Rc.add_default_file I think, but it should be enough to do > what you want. > > GTK2 ships with a Emacs keybindings set, it is in > /usr/share/themes/Emacs/gtk-2.0-key/gtkrc for me. I've copied and modified the gtkrc you suggest and added it with GtkMain.Rc.add_default_file, but still c-a binds to the select-all signal instead of move-cursor as specified in my gtkrc. I've tried specifying "highest" priority, but from the documentation it seems to me that it should work with the default "rc" priority as well. strace-ing my application reveals that my gtkrc is stat-ed but not open-ed. Is add_default_file properly bound by lablgtk2? Thanks for your answer Olivier, Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/ If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. -!-