[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-mnstbs-mnub

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 11月 8日 (木) 09:38:43 JST


-------------------------
REMOTE_ADDR = 184.145.95.170
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-mnub
-------------------------
@@ -236,7 +236,7 @@
 
 You have seen that accelerator keys are tightly related to Gtk::AccelGroup object, which in our example program above, we created before creating menu items that can in addition to mouse clicks be selected also by pressing the assigned accelerator keys. The constructor for image menu items accept the accelerator group parameter, and the stock item identifies the accelerator key combination, but for other menu items you have to explicitly add the accelerator group, and identify the accelerator key combination by calling the Gtk::Widget#add_accelerator method. In either case the desired accelerator keys are associated with the menu item object we are constructing. If you remove an item to which you assigned accelerator group for a particular accelerator key, that accelerator key will no more react if user presses it. As you can see accelerator keys here are tied to menu items. 
 
-The second kind of accelerator key binding defined by using the Gtk::AccelGroup#connect(accel_key, accel_mods, accel_flags, closure), and Gtk::AccelGroup#connect(accel_key, accel_mods, accel_flags) {...} methods. As you see, in this case you do not identify the widget, to which the accelerator key you are defining will invoke the callback (closure or block).  
+The second kind of accelerator key binding is defined by using the Gtk::AccelGroup#connect(accel_key, accel_mods, accel_flags, closure), and Gtk::AccelGroup#connect(accel_key, accel_mods, accel_flags) {...} methods. As you see, in this case you do not identify the widget, to which the accelerator key you are defining will invoke the callback (closure or block).  
 
 It is important to realize, that if you want to use the accelerator keys for either of the two bindings described above, you need to add the accelerator group to the top window (Gtk::Window#add_accel_group).
 




ruby-gnome2-cvs メーリングリストの案内
Back to archive index