Ruby & libglade & menu shortcut

Hello,

I’m trying to use libglade wirh Ruby.

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

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

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

I’ve define a handler ‘on_quit_activate’ which is normally activated
when
choosing the ‘Quit’ Menu item into the file menu. This handler is called
when
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 SourceForge.net’s Techsay panel and you’ll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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