ibus/ibus-HEAD.patch

53 lines
1.9 KiB
Diff
Raw Normal View History

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