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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2009年 5月 28日 (木) 20:52:50 JST


-------------------------
REMOTE_ADDR = 82.227.12.18
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-popup
-------------------------
@@ -31,12 +31,12 @@
  # user.
  def create_popup_menu(menu, progb)
    pulse  = Gtk::MenuItem.new("Pulse Progress")
-   separator = Gtk::HSeparator.new
+   separator = Gtk::MenuItem.new
    fill   = Gtk::MenuItem.new("Set as Complete")
    clear  = Gtk::MenuItem.new("_Clear Progress")
   
    menu.append(pulse)
-   # menu.append(separator) # <--- should probably work, but it doesn't
+   menu.append(separator)
    menu.append(fill)
    menu.append(clear)
   
@@ -100,7 +100,7 @@
 I also found it unnecessary to call Gtk::Menu#attach_to_widget(attach_widget){|attach_widgt, menu| ... } in this program example, as required by the  Andrew Klause's book and the C GTK+ example there, which I translated to Ruby for us here.
 
 {{image_right("dialog-warning.png")}}
-Separators are extremely important when designing a menu structure, because they organize menu items into groups so that the user can easily find the appropriate item. However, currently this feature either is not correctly documented or does not work.
+Separators are extremely important when designing a menu structure, because they organize menu items into groups so that the user can easily find the appropriate item. However, currently this feature either is badly documented (use a MenuItem with no label).
 
 === Pop-up Menu Callbacks
 
@@ -131,12 +131,12 @@
  # user.
  def create_popup_menu(menu, progb, window)
    pulse  = Gtk::MenuItem.new("Pulse Progress")
-   separator = Gtk::HSeparator.new
+   separator = Gtk::MenuItem.new
    fill   = Gtk::MenuItem.new("Set as Complete")
    clear  = Gtk::MenuItem.new("_Clear Progress")
    
    menu.append(pulse)
-   # menu.append(separator) # <--- should probably work, but it doesn't
+   menu.append(separator)
    menu.append(fill)
    menu.append(clear)
  




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