Ruby & libglade & menu shortcut


I’m trying to use libglade wirh Ruby.

I’ve defined a little main window (gnome application window) and I load
it like

class ApplicationWindow < Gtk:Window
def initialize( app_name , app_version )
super( “#{app_name} - #{app_version}” )
@glade = ‘grgl’ ,
‘gargoyle_main_window_bonobodock’ , nil
do |h|
method( h )
self.set_default_size( 400 , 200 )
self.add( @glade[ ‘gargoyle_main_window_bonobodock’ ] )

The ‘gargoyle_main_window_bonobodock’ is the default bonobodock widget
by glade when creating a new ‘Gnome Application Window’.

I’ve define a handler ‘on_quit_activate’ which is normally activated
choosing the ‘Quit’ Menu item into the file menu. This handler is called
choosing ‘Quit’ with the mouse but not when pressing ‘Ctrl-Q’, which is
normally the shortcut for ‘Quit’ ?

May I create Gtk::AccelGroup and add all AccelMap entry myself ? or is
there any
way to tell libglade to load the shortcut ?

Thanks all


  • Laurent Marzullo

Take Surveys. Earn Cash. Influence the Future of IT
Join’s Techsay panel and you’ll get the chance to share
opinions on IT & business topics through brief surveys - and earn cash

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs