b431b5
commit 674bc53c30c8ac40e021da660f2af533ab015587
b431b5
Author: Daiki Ueno <ueno@unixuser.org>
b431b5
Date:   Wed Jun 30 12:05:32 2010 +0900
72e0aa
b431b5
    Fix "Show language panel: Embedded in menu" behavior.
b431b5
    
b431b5
    Signed-off-by: Daiki Ueno <ueno@unixuser.org>
b431b5
b431b5
diff --git a/ui/gtk/languagebar.py b/ui/gtk/languagebar.py
b431b5
index f22080f..2fc1cb7 100644
b431b5
--- a/ui/gtk/languagebar.py
b431b5
+++ b/ui/gtk/languagebar.py
b431b5
@@ -29,6 +29,7 @@ from handle import Handle
b431b5
 from menu import menu_position,\
b431b5
     ImageMenuItem,\
b431b5
     Menu,\
b431b5
+    CheckMenuItem,\
b431b5
     RadioMenuItem,\
b431b5
     SeparatorMenuItem
b431b5
 from engineabout import EngineAbout
b431b5
@@ -378,6 +379,8 @@ class LanguageBar(gtk.Toolbar):
b431b5
                 item = ImageMenuItem(prop = prop)
b431b5
                 self.__set_item_icon(item, prop)
b431b5
             elif prop.type == ibus.PROP_TYPE_TOGGLE:
b431b5
+                item = CheckMenuItem(prop = prop)
b431b5
+            elif prop.type == ibus.PROP_TYPE_RADIO:
b431b5
                 item = RadioMenuItem(radio_group, prop = prop)
b431b5
                 radio_group = item
b431b5
             elif prop.type == ibus.PROP_TYPE_SEPARATOR:
b431b5
diff --git a/ui/gtk/menu.py b/ui/gtk/menu.py
b431b5
index b9a6b44..53fa39f 100644
b431b5
--- a/ui/gtk/menu.py
b431b5
+++ b/ui/gtk/menu.py
b431b5
@@ -59,7 +59,7 @@ class Menu(gtk.Menu, PropItem):
b431b5
                 item = SeparatorMenuItem()
b431b5
                 radio_group = None
b431b5
             elif prop.type == ibus.PROP_TYPE_MENU:
b431b5
-                item = gtk.ImageMenuItem()
b431b5
+                item = ImageMenuItem(prop)
b431b5
                 if prop.icon:
b431b5
                     size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
b431b5
                     item.set_image(icon.IconWidget(prop.icon, size[0]))
b431b5
@@ -238,6 +238,9 @@ class SeparatorMenuItem(gtk.SeparatorMenuItem, PropItem):
b431b5
        (gobject.TYPE_STRING, gobject.TYPE_INT)),
b431b5
     }
b431b5
 
b431b5
+    def __init__(self):
b431b5
+        gtk.SeparatorMenuItem.__init__(self)
b431b5
+        PropItem.__init__(self, None)
b431b5
 
b431b5
 
b431b5
 def menu_position(menu, button):